-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
errors building llvm from sources using ninja #6
Comments
Hello, |
Ciao, Lorenzo! |
You' re welcome! So yes, send your commands with x64 Native Tools Command Prompt for VS 2019 |
Hi Pavel!
Your build fails in the very first file. It seems that the std::errc enumeration is missing. This indicates that your libc++ version is too old. LLVM requires a C++14 compatible library (std::errc was introduces with C++11, so the error is a bit surprising).
From the error message, I also see that you are using MinGW. Honestly, I do not know how well LLVM works when compiled with MinGW. While MinGW itself provides the required level of gcc/g++ compiler, the support for this platform is experimental (at least to my knowledge).
Regards,
Kai
From: PavelKotov1 ***@***.***
Sent: Saturday, 16 October 2021 17:30
To: PacktPublishing/Learn-LLVM-12
Cc: Subscribed
Subject: [PacktPublishing/Learn-LLVM-12] errors building llvm from sources using ninja (#6)
Hello, dear friends!
I am trying to build from sources and install llvm on windows 10.
Installed all the prerequisites first.
Then: git clone https://github.com/llvm/llvm-project.git
cd llvm-project
mkdir build
cd build
cmake –G Ninja -DLLVM_ENABLE_PROJECTS=clang ../llvm
ninja
The output of the last command is as follows:
[1/4233] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/CachePruning.cpp.obj FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/CachePruning.cpp.obj C:\MinGW\bin\c++.exe -DGTEST_HAS_RTTI=0 -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Support -IC:/llvm-project/llvm/lib/Support -Iinclude -IC:/llvm-project/llvm/include -isystem "C:/Program Files (x86)/GnuWin32/include" -Wa,-mbig-obj -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -Wmisleading-indentation -g -std=c++14 -fno-exceptions -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/CachePruning.cpp.obj -MF lib\Support\CMakeFiles\LLVMSupport.dir\CachePruning.cpp.obj.d -o lib/Support/CMakeFiles/LLVMSupport.dir/CachePruning.cpp.obj -c C:/llvm-project/llvm/lib/Support/CachePruning.cpp In file included from C:/llvm-project/llvm/lib/Support/CachePruning.cpp:16:0: C:/llvm-project/llvm/include/llvm/Support/Errc.h:65:23: error: 'not_supported' is not a member of 'std::errc' not_supported = int(std::errc::not_supported), ^~~ [2/4233] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ARMAttributeParser.cpp.obj FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/ARMAttributeParser.cpp.obj C:\MinGW\bin\c++.exe -DGTEST_HAS_RTTI=0 -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Support -IC:/llvm-project/llvm/lib/Support -Iinclude -IC:/llvm-project/llvm/include -isystem "C:/Program Files (x86)/GnuWin32/include" -Wa,-mbig-obj -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -Wmisleading-indentation -g -std=c++14 -fno-exceptions -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/ARMAttributeParser.cpp.obj -MF lib\Support\CMakeFiles\LLVMSupport.dir\ARMAttributeParser.cpp.obj.d -o lib/Support/CMakeFiles/LLVMSupport.dir/ARMAttributeParser.cpp.obj -c C:/llvm-project/llvm/lib/Support/ARMAttributeParser.cpp In file included from C:/llvm-project/llvm/lib/Support/ARMAttributeParser.cpp:12:0: C:/llvm-project/llvm/include/llvm/Support/Errc.h:65:23: error: 'not_supported' is not a member of 'std::errc' not_supported = int(std::errc::not_supported), ^~~ [3/4233] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/CodeGenCoverage.cpp.obj FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/CodeGenCoverage.cpp.obj C:\MinGW\bin\c++.exe -DGTEST_HAS_RTTI=0 -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Support -IC:/llvm-project/llvm/lib/Support -Iinclude -IC:/llvm-project/llvm/include -isystem "C:/Program Files (x86)/GnuWin32/include" -Wa,-mbig-obj -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -Wmisleading-indentation -g -std=c++14 -fno-exceptions -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/CodeGenCoverage.cpp.obj -MF lib\Support\CMakeFiles\LLVMSupport.dir\CodeGenCoverage.cpp.obj.d -o lib/Support/CMakeFiles/LLVMSupport.dir/CodeGenCoverage.cpp.obj -c C:/llvm-project/llvm/lib/Support/CodeGenCoverage.cpp In file included from C:/llvm-project/llvm/lib/Support/CodeGenCoverage.cpp:17:0: C:/llvm-project/llvm/include/llvm/Support/Mutex.h:29:12: error: 'recursive_mutex' in namespace 'std' does not name a type std::recursive_mutex impl; ^~~~~~~~~~~~~~~ C:/llvm-project/llvm/include/llvm/Support/Mutex.h: In member function 'bool llvm::sys::SmartMutex<mt_only>::lock()': C:/llvm-project/llvm/include/llvm/Support/Mutex.h:35:11: error: 'impl' was not declared in this scope impl.lock(); ^~~~ C:/llvm-project/llvm/include/llvm/Support/Mutex.h: In member function 'bool llvm::sys::SmartMutex<mt_only>::unlock()': C:/llvm-project/llvm/include/llvm/Support/Mutex.h:48:11: error: 'impl' was not declared in this scope impl.unlock(); ^~~~ C:/llvm-project/llvm/include/llvm/Support/Mutex.h: In member function 'bool llvm::sys::SmartMutex<mt_only>::try_lock()': C:/llvm-project/llvm/include/llvm/Support/Mutex.h:62:18: error: 'impl' was not declared in this scope return impl.try_lock(); ^~~~ ninja: build stopped: subcommand failed.
Could you please help me?
Thanks in advance!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#6> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAGKDU7A4W7CXXUP6653JVLUHHVEPANCNFSM5GEBQAEA> .
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub> . Image removed by sender.
|
hello, dear friends Lorenzo and Kai!
To be quite honest, i did not do anything to make ninja use MinGW. Does ninja use it by defaul? How could I make ninja use any other available toolset? And what is the default behaviour? Thanks again for your help! And please explain the toolset issue! |
Hello, dear friends!
I am trying to build from sources and install llvm on windows 10.
Installed all the prerequisites first.
Then: git clone https://github.com/llvm/llvm-project.git
cd llvm-project
mkdir build
cd build
cmake –G Ninja -DLLVM_ENABLE_PROJECTS=clang ../llvm
ninja
The output of the last command is as follows:
[1/4233] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/CachePruning.cpp.obj FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/CachePruning.cpp.obj C:\MinGW\bin\c++.exe -DGTEST_HAS_RTTI=0 -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Support -IC:/llvm-project/llvm/lib/Support -Iinclude -IC:/llvm-project/llvm/include -isystem "C:/Program Files (x86)/GnuWin32/include" -Wa,-mbig-obj -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -Wmisleading-indentation -g -std=c++14 -fno-exceptions -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/CachePruning.cpp.obj -MF lib\Support\CMakeFiles\LLVMSupport.dir\CachePruning.cpp.obj.d -o lib/Support/CMakeFiles/LLVMSupport.dir/CachePruning.cpp.obj -c C:/llvm-project/llvm/lib/Support/CachePruning.cpp In file included from C:/llvm-project/llvm/lib/Support/CachePruning.cpp:16:0: C:/llvm-project/llvm/include/llvm/Support/Errc.h:65:23: error: 'not_supported' is not a member of 'std::errc' not_supported = int(std::errc::not_supported), ^~~ [2/4233] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ARMAttributeParser.cpp.obj FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/ARMAttributeParser.cpp.obj C:\MinGW\bin\c++.exe -DGTEST_HAS_RTTI=0 -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Support -IC:/llvm-project/llvm/lib/Support -Iinclude -IC:/llvm-project/llvm/include -isystem "C:/Program Files (x86)/GnuWin32/include" -Wa,-mbig-obj -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -Wmisleading-indentation -g -std=c++14 -fno-exceptions -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/ARMAttributeParser.cpp.obj -MF lib\Support\CMakeFiles\LLVMSupport.dir\ARMAttributeParser.cpp.obj.d -o lib/Support/CMakeFiles/LLVMSupport.dir/ARMAttributeParser.cpp.obj -c C:/llvm-project/llvm/lib/Support/ARMAttributeParser.cpp In file included from C:/llvm-project/llvm/lib/Support/ARMAttributeParser.cpp:12:0: C:/llvm-project/llvm/include/llvm/Support/Errc.h:65:23: error: 'not_supported' is not a member of 'std::errc' not_supported = int(std::errc::not_supported), ^~~ [3/4233] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/CodeGenCoverage.cpp.obj FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/CodeGenCoverage.cpp.obj C:\MinGW\bin\c++.exe -DGTEST_HAS_RTTI=0 -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Support -IC:/llvm-project/llvm/lib/Support -Iinclude -IC:/llvm-project/llvm/include -isystem "C:/Program Files (x86)/GnuWin32/include" -Wa,-mbig-obj -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -Wmisleading-indentation -g -std=c++14 -fno-exceptions -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/CodeGenCoverage.cpp.obj -MF lib\Support\CMakeFiles\LLVMSupport.dir\CodeGenCoverage.cpp.obj.d -o lib/Support/CMakeFiles/LLVMSupport.dir/CodeGenCoverage.cpp.obj -c C:/llvm-project/llvm/lib/Support/CodeGenCoverage.cpp In file included from C:/llvm-project/llvm/lib/Support/CodeGenCoverage.cpp:17:0: C:/llvm-project/llvm/include/llvm/Support/Mutex.h:29:12: error: 'recursive_mutex' in namespace 'std' does not name a type std::recursive_mutex impl; ^~~~~~~~~~~~~~~ C:/llvm-project/llvm/include/llvm/Support/Mutex.h: In member function 'bool llvm::sys::SmartMutex<mt_only>::lock()': C:/llvm-project/llvm/include/llvm/Support/Mutex.h:35:11: error: 'impl' was not declared in this scope impl.lock(); ^~~~ C:/llvm-project/llvm/include/llvm/Support/Mutex.h: In member function 'bool llvm::sys::SmartMutex<mt_only>::unlock()': C:/llvm-project/llvm/include/llvm/Support/Mutex.h:48:11: error: 'impl' was not declared in this scope impl.unlock(); ^~~~ C:/llvm-project/llvm/include/llvm/Support/Mutex.h: In member function 'bool llvm::sys::SmartMutex<mt_only>::try_lock()': C:/llvm-project/llvm/include/llvm/Support/Mutex.h:62:18: error: 'impl' was not declared in this scope return impl.try_lock(); ^~~~ ninja: build stopped: subcommand failed.
Could you please help me?
Thanks in advance!
The text was updated successfully, but these errors were encountered: