Skip to content
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

multiple errors trying to build llvm from sources using ninja #4734

Closed
PavelKotov1 opened this issue Oct 10, 2021 · 6 comments
Closed

multiple errors trying to build llvm from sources using ninja #4734

PavelKotov1 opened this issue Oct 10, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@PavelKotov1
Copy link

PavelKotov1 commented Oct 10, 2021

Hello, dear friends!
I am not sure if it is a bug or something else, so please just bear with me since i am very new to the subject.
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/4267] Building C object lib/Support/CMakeFiles/LLVMSupport.dir/regstrlcpy.c.obj
[2/4267] Building C object lib/Support/CMakeFiles/LLVMSupport.dir/regfree.c.obj
[3/4267] Building C object lib/Support/CMakeFiles/LLVMSupport.dir/regexec.c.obj
[4/4267] Building C object lib/Support/CMakeFiles/LLVMSupport.dir/regerror.c.obj
[5/4267] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/xxhash.cpp.obj
[6/4267] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Z3Solver.cpp.obj
[7/4267] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/TrigramIndex.cpp.obj
[8/4267] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ToolOutputFile.cpp.obj
[9/4267] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/TimeProfiler.cpp.obj
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/TimeProfiler.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/TimeProfiler.cpp.obj -MF lib\Support\CMakeFiles\LLVMSupport.dir\TimeProfiler.cpp.obj.d -o lib/Support/CMakeFiles/LLVMSupport.dir/TimeProfiler.cpp.obj -c C:/llvm-project/llvm/lib/Support/TimeProfiler.cpp
C:/llvm-project/llvm/lib/Support/TimeProfiler.cpp:31:13: error: 'mutex' in namespace 'std' does not name a type
 static std::mutex Mu;
             ^~~~~
C:/llvm-project/llvm/lib/Support/TimeProfiler.cpp: In member function 'void llvm::TimeTraceProfiler::write(llvm::raw_pwrite_stream&)':
C:/llvm-project/llvm/lib/Support/TimeProfiler.cpp:128:21: error: 'mutex' is not a member of 'std'
     std::lock_guard<std::mutex> Lock(Mu);
                     ^~~
C:/llvm-project/llvm/lib/Support/TimeProfiler.cpp:128:21: error: 'mutex' is not a member of 'std'
C:/llvm-project/llvm/lib/Support/TimeProfiler.cpp:128:31: error: template argument 1 is invalid
     std::lock_guard<std::mutex> Lock(Mu);
                               ^
C:/llvm-project/llvm/lib/Support/TimeProfiler.cpp:128:38: error: 'Mu' was not declared in this scope
     std::lock_guard<std::mutex> Lock(Mu);
                                      ^~
C:/llvm-project/llvm/lib/Support/TimeProfiler.cpp:128:33: warning: unused variable 'Lock' [-Wunused-variable]
     std::lock_guard<std::mutex> Lock(Mu);
                                 ^~~~
C:/llvm-project/llvm/lib/Support/TimeProfiler.cpp: In function 'void llvm::timeTraceProfilerCleanup()':
C:/llvm-project/llvm/lib/Support/TimeProfiler.cpp:275:19: error: 'mutex' is not a member of 'std'
   std::lock_guard<std::mutex> Lock(Mu);
                   ^~~
C:/llvm-project/llvm/lib/Support/TimeProfiler.cpp:275:19: error: 'mutex' is not a member of 'std'
C:/llvm-project/llvm/lib/Support/TimeProfiler.cpp:275:29: error: template argument 1 is invalid
   std::lock_guard<std::mutex> Lock(Mu);
                             ^
C:/llvm-project/llvm/lib/Support/TimeProfiler.cpp:275:36: error: 'Mu' was not declared in this scope
   std::lock_guard<std::mutex> Lock(Mu);
                                    ^~
C:/llvm-project/llvm/lib/Support/TimeProfiler.cpp:275:31: warning: unused variable 'Lock' [-Wunused-variable]
   std::lock_guard<std::mutex> Lock(Mu);
                               ^~~~
C:/llvm-project/llvm/lib/Support/TimeProfiler.cpp: In function 'void llvm::timeTraceProfilerFinishThread()':
C:/llvm-project/llvm/lib/Support/TimeProfiler.cpp:284:19: error: 'mutex' is not a member of 'std'
   std::lock_guard<std::mutex> Lock(Mu);
                   ^~~
C:/llvm-project/llvm/lib/Support/TimeProfiler.cpp:284:19: error: 'mutex' is not a member of 'std'
C:/llvm-project/llvm/lib/Support/TimeProfiler.cpp:284:29: error: template argument 1 is invalid
   std::lock_guard<std::mutex> Lock(Mu);
                             ^
C:/llvm-project/llvm/lib/Support/TimeProfiler.cpp:284:36: error: 'Mu' was not declared in this scope
   std::lock_guard<std::mutex> Lock(Mu);
                                    ^~
C:/llvm-project/llvm/lib/Support/TimeProfiler.cpp:284:31: warning: unused variable 'Lock' [-Wunused-variable]
   std::lock_guard<std::mutex> Lock(Mu);
                               ^~~~
[10/4267] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Timer.cpp.obj
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/Timer.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/Timer.cpp.obj -MF lib\Support\CMakeFiles\LLVMSupport.dir\Timer.cpp.obj.d -o lib/Support/CMakeFiles/LLVMSupport.dir/Timer.cpp.obj -c C:/llvm-project/llvm/lib/Support/Timer.cpp
In file included from C:/llvm-project/llvm/lib/Support/Timer.cpp:24: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();
                  ^~~~
[11/4267] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Triple.cpp.obj
**ninja: build stopped: subcommand failed.**

Could somebody help me figure out what is going on? And again i appologize in advance if i posted my question in the wrong area.
Thanks in advance!

@PavelKotov1 PavelKotov1 added the bug Something isn't working label Oct 10, 2021
@alexbatashev
Copy link
Contributor

Please, follow community guidelines to submit bugs in upstream LLVM project: https://llvm.org/docs/HowToSubmitABug.html

@PavelKotov1
Copy link
Author

PavelKotov1 commented Oct 10, 2021

Please, follow community guidelines to submit bugs in upstream LLVM project:

Dear Alex, could you help me to figure out how to do that? There is SO much on that page that i am simply lost. As i said, i am new to llvm and pretty much have no idea where my issue belongs.
maybe you could just move my question where it needs to be?
Thanks in advance.

@alexbatashev
Copy link
Contributor

@PavelKotov1 this repository is a fork by Intel of the upstream LLVM. We do not accept bug reports in the upstream project. believe the first four paragraphs from the link I provided explain how to submit a bug to LLVM.

@MrSidims
Copy link
Contributor

Basically, here is a bug-report tool for llvm.org project: https://bugs.llvm.org/
Also you might subscribe and ask question in the special mailing list.

@PavelKotov1
Copy link
Author

my question IS NOT a BUG REPORT.
IT IS A QUESTION.
BUT THANKS ANYWAY.

@WhateverKJA
Copy link

WhateverKJA commented Oct 10, 2021

my question IS NOT a BUG REPORT. IT IS A QUESTION. BUT THANKS ANYWAY.

Please calm down. Everyone answered politely. This is not the place to ask questions about LLVM nor your LLVM build errors, do you understand that?

Furthermore you opened this issue as a bug, so...

Have a nice day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants