-
Notifications
You must be signed in to change notification settings - Fork 13.5k
llvm build failure for openmp #59537
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
Comments
@llvm/issue-subscribers-openmp |
What version is your compiler? The |
I tried again with GCC 10.3 and got: [ 4%] Building CXX object openmp/libomptarget/src/CMakeFiles/omptarget.dir/api.cpp.o
In file included from /nobackupnfs1/jcbecker/llvm-project/openmp/libomptarget/src/api.cpp:13:
In file included from /nobackupnfs1/jcbecker/llvm-project/openmp/libomptarget/include/device.h:19:
In file included from /nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/list:60:
In file included from /nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/stl_algobase.h:61:
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/cpp_type_traits.h:542:5: error: unknown type name '_GLIBCXX20_CONSTEXPR'
_GLIBCXX20_CONSTEXPR
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/cpp_type_traits.h:543:21: error: expected ';' at end of declaration
inline _Iterator
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/cpp_type_traits.h:544:18: error: unknown type name '_Iterator'
__miter_base(_Iterator __it)
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/cpp_type_traits.h:544:5: error: a type specifier is required for all declarations
__miter_base(_Iterator __it)
^
In file included from /nobackupnfs1/jcbecker/llvm-project/openmp/libomptarget/src/api.cpp:13:
In file included from /nobackupnfs1/jcbecker/llvm-project/openmp/libomptarget/include/device.h:19:
In file included from /nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/list:60:
In file included from /nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/stl_algobase.h:64:
In file included from /nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/stl_pair.h:59:
In file included from /nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/move.h:57:
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:521:8: error: expected ';' after struct
{ } _GLIBCXX_DEPRECATED_SUGGEST("std::is_null_pointer");
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:521:9: error: a type specifier is required for all declarations
{ } _GLIBCXX_DEPRECATED_SUGGEST("std::is_null_pointer");
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:696:27: error: expected unqualified-id
_GLIBCXX20_DEPRECATED("use is_standard_layout && is_trivial instead")
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:696:27: error: expected ')'
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:696:26: note: to match this '('
_GLIBCXX20_DEPRECATED("use is_standard_layout && is_trivial instead")
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2648:5: error: unknown type name '_GLIBCXX20_CONSTEXPR'
_GLIBCXX20_CONSTEXPR
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2650:5: error: no variable template matches partial specialization
_Require<__not_<__is_tuple_like<_Tp>>,
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2652:31: error: expected ';' at end of declaration
is_move_assignable<_Tp>>
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2653:10: error: unknown type name '_Tp'
swap(_Tp&, _Tp&)
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2653:16: error: unknown type name '_Tp'
swap(_Tp&, _Tp&)
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2654:51: error: use of undeclared identifier '_Tp'
noexcept(__and_<is_nothrow_move_constructible<_Tp>,
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2655:45: error: expected '(' for function-style cast or type construction
is_nothrow_move_assignable<_Tp>>::value);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2655:48: error: no member named 'value' in the global namespace
is_nothrow_move_assignable<_Tp>>::value);
~~^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2653:5: error: a type specifier is required for all declarations
swap(_Tp&, _Tp&)
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2658:5: error: unknown type name '_GLIBCXX20_CONSTEXPR'
_GLIBCXX20_CONSTEXPR
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2660:5: error: no variable template matches partial specialization
__enable_if_t<__is_swappable<_Tp>::value>
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[5]: *** [openmp/libomptarget/src/CMakeFiles/omptarget.dir/api.cpp.o] Error 1
make[4]: *** [openmp/libomptarget/src/CMakeFiles/omptarget.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [runtimes/runtimes-stamps/runtimes-build] Error 2
make[1]: *** [runtimes/CMakeFiles/runtimes.dir/all] Error 2
make: *** [all] Error 2 |
Was this a clean build, that is with previous installations and the build directory deleted? Sometimes CMake will cache problematic variables, or files from the old installation will be used when we want them to be rebuilt. |
no - I'll start clean, tx |
Did a clean cmake followed by [ 0%] Building CXX object openmp/libomptarget/src/CMakeFiles/omptarget.dir/api.cpp.o
In file included from /nobackupnfs1/jcbecker/llvm-project/openmp/libomptarget/plugins/common/elf_common/elf_common.cpp:12:
In file included from /nobackupnfs1/jcbecker/llvm-project/openmp/libomptarget/plugins/common/elf_common/elf_common.h:16:
In file included from /nobackupnfs1/jcbecker/llvm-project/openmp/libomptarget/include/omptargetplugin.h:17:
In file included from /nobackupnfs1/jcbecker/llvm-project/openmp/libomptarget/include/omptarget.h:17:
In file included from /nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/deque:60:
In file included from /nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/stl_algobase.h:61:
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/cpp_type_traits.h:542:5: error: unknown type name '_GLIBCXX20_CONSTEXPR'
_GLIBCXX20_CONSTEXPR
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/cpp_type_traits.h:543:21: error: expected ';' at end of declaration
inline _Iterator
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/cpp_type_traits.h:544:18: error: unknown type name '_Iterator'
__miter_base(_Iterator __it)
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/cpp_type_traits.h:544:5: error: a type specifier is required for all declarations
__miter_base(_Iterator __it)
^
In file included from /nobackupnfs1/jcbecker/llvm-project/openmp/libomptarget/src/api.cpp:13:
In file included from /nobackupnfs1/jcbecker/llvm-project/openmp/libomptarget/include/device.h:19:
In file included from /nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/list:60:
In file included from /nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/stl_algobase.h:61:
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/cpp_type_traits.h:542:5: error: unknown type name '_GLIBCXX20_CONSTEXPR'
_GLIBCXX20_CONSTEXPR
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/cpp_type_traits.h:543:21: error: expected ';' at end of declaration
inline _Iterator
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/cpp_type_traits.h:544:18: error: unknown type name '_Iterator'
__miter_base(_Iterator __it)
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/cpp_type_traits.h:544:5: error: a type specifier is required for all declarations
__miter_base(_Iterator __it)
^
In file included from /nobackupnfs1/jcbecker/llvm-project/openmp/libomptarget/plugins/common/elf_common/elf_common.cpp:12:
In file included from /nobackupnfs1/jcbecker/llvm-project/openmp/libomptarget/plugins/common/elf_common/elf_common.h:16:
In file included from /nobackupnfs1/jcbecker/llvm-project/openmp/libomptarget/include/omptargetplugin.h:17:
In file included from /nobackupnfs1/jcbecker/llvm-project/openmp/libomptarget/include/omptarget.h:17:
In file included from /nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/deque:60:
In file included from /nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/stl_algobase.h:64:
In file included from /nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/stl_pair.h:59:
In file included from /nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/move.h:57:
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:521:8: error: expected ';' after struct
{ } _GLIBCXX_DEPRECATED_SUGGEST("std::is_null_pointer");
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:521:9: error: a type specifier is required for all declarations
{ } _GLIBCXX_DEPRECATED_SUGGEST("std::is_null_pointer");
^
[ 0%] Building LLVM bitcode Workshare.cpp-gfx1103.bc
[ 0%] Building LLVM bitcode Workshare.cpp-gfx1101.bc
[ 0%] Building LLVM bitcode Workshare.cpp-gfx1030.bc
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:696:27: error: expected unqualified-id
_GLIBCXX20_DEPRECATED("use is_standard_layout && is_trivial instead")
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:696:27: error: expected ')'
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:696:26: note: to match this '('
_GLIBCXX20_DEPRECATED("use is_standard_layout && is_trivial instead")
^
In file included from /nobackupnfs1/jcbecker/llvm-project/openmp/libomptarget/src/api.cpp:13:
In file included from /nobackupnfs1/jcbecker/llvm-project/openmp/libomptarget/include/device.h:19:
In file included from /nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/list:60:
In file included from /nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/stl_algobase.h:64:
In file included from /nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/stl_pair.h:59:
In file included from /nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/bits/move.h:57:
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:521:8: error: expected ';' after struct
{ } _GLIBCXX_DEPRECATED_SUGGEST("std::is_null_pointer");
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:521:9: error: a type specifier is required for all declarations
{ } _GLIBCXX_DEPRECATED_SUGGEST("std::is_null_pointer");
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:696:27: error: expected unqualified-id
_GLIBCXX20_DEPRECATED("use is_standard_layout && is_trivial instead")
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:696:27: error: expected ')'
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:696:26: note: to match this '('
_GLIBCXX20_DEPRECATED("use is_standard_layout && is_trivial instead")
^
[ 0%] Building the OMPD GDB plugin
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2648:5: error: unknown type name '_GLIBCXX20_CONSTEXPR'
_GLIBCXX20_CONSTEXPR
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2650:5: error: no variable template matches partial specialization
_Require<__not_<__is_tuple_like<_Tp>>,
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2652:31: error: expected ';' at end of declaration
is_move_assignable<_Tp>>
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2653:10: error: unknown type name '_Tp'
swap(_Tp&, _Tp&)
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2653:16: error: unknown type name '_Tp'
swap(_Tp&, _Tp&)
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2654:[ 0%] Built target ompd_gdb_plugin
51: error: use of undeclared identifier '_Tp'
noexcept(__and_<is_nothrow_move_constructible<_Tp>,
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2655:45: error: expected '(' for function-style cast or type construction
is_nothrow_move_assignable<_Tp>>::value);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2655:48: error: no member named 'value' in the global namespace
is_nothrow_move_assignable<_Tp>>::value);
~~^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2653:5: error: a type specifier is required for all declarations
swap(_Tp&, _Tp&)
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2658:5: error: unknown type name '_GLIBCXX20_CONSTEXPR'
_GLIBCXX20_CONSTEXPR
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2660:5: error: no variable template matches partial specialization
__enable_if_t<__is_swappable<_Tp>::value>
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2648:5: error: unknown type name '_GLIBCXX20_CONSTEXPR'
_GLIBCXX20_CONSTEXPR
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2650:5: error: no variable template matches partial specialization
_Require<__not_<__is_tuple_like<_Tp>>,
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2652:31: error: expected ';' at end of declaration
is_move_assignable<_Tp>>
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2653:10: error: unknown type name '_Tp'
swap(_Tp&, _Tp&)
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2653:16: error: unknown type name '_Tp'
swap(_Tp&, _Tp&)
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2654:51: error: use of undeclared identifier '_Tp'
noexcept(__and_<is_nothrow_move_constructible<_Tp>,
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2655:45: error: expected '(' for function-style cast or type construction
is_nothrow_move_assignable<_Tp>>::value);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2655:48: error: no member named 'value' in the global namespace
is_nothrow_move_assignable<_Tp>>::value);
~~^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2653:5: error: a type specifier is required for all declarations
swap(_Tp&, _Tp&)
^
[ 0%] Building LLVM bitcode Configuration.cpp-gfx1101.bc
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2658:5: error: unknown type name '_GLIBCXX20_CONSTEXPR'
_GLIBCXX20_CONSTEXPR
^
/nasa/pkgsrc/toss3/2021Q2/gcc10/include/c++/type_traits:2660:5: error: no variable template matches partial specialization
__enable_if_t<__is_swappable<_Tp>::value>
^
fatal error: too many errors emitted, stopping now [-ferror-limit=] |
Can you attach the full log here? |
Compilation fails at the end. Log starting from where error begins is below. Consolidate compiler generated dependencies of target yaml2obj
|
I tried locally with GCC 10 but cannot reproduce the error you observed. It'll be more helpful if you can attach the full log, including CMake configure and |
OK. Did git pull on llvm-project followed by cmake and make. Outputs from both commands attached. |
How did you make |
I didn't realize I needed to do anything. Where do I specify GCC_INSTALL_PREFIX? |
I mentioned earlier to pass |
Hmm, based on your initial description, it looks like you were using the system GCC 4.8.5. Later it became GCC 10.3. |
correct - I forgot to load the module on the initial issue |
The module system usually causes a lot of problems when certain tools prefer to look at the system's binaries rather than whatever |
Yeah, that's the tricky part. AFAIK, |
Success! My ultimate goal of this was to build OpenMP target offload for NVIDIA and AMD GPU's. Although I did not specify nvptx or amdgpu as LLVM_TARGETS_TO_BUILD, it looks like those might have been built (runtime.txt attached with make -j8 output). Do I need to do anything else? Thanks! |
Glad to hear it. All targets are built by default unless specified otherwise. Right now we should be able to build both the AMD and NVIDIA offloading support even without a valid ROCm / CUDA installation. Here's a useful program that returns // clang test.c -fopenmp --offload-arch=<arch>
#include <omp.h>
int main() {
int isDevice = 0;
#pragma omp target map(from : isDevice)
{ isDevice = omp_is_initial_device(); }
return isDevice;
} Let me know if this works for you. |
I asked because my cmake specified However the make output contains lines like: |
also, my cmake had: and I was wondering if I needed to add : openmp |
|
Not sure what's wrong but... jcbecker@pfe26 514$ cmake -G "Unix Makefiles" CMake Error: The source directory "/nobackupnfs1/jcbecker/llvm-project/build" does not appear to contain CMakeLists.txt. |
|
got both targets to build - thanks |
@jhuber6 , I tried your test.c program above, and added a print statement to print isDevice before returning. I compiled it with: $ clang test.c -fopenmp -fopenmp-targets=nvptx64 $ ./a.out You had indicated that it should return 0, so it seems like offloading is not working. Please advise |
Do you have a functioning install of CUDA or ROCm with a compatible GPU on the system? One of the following should at least indicate the presence of a GPU for starters, |
@jeffcbecker I don't think the discussion is about the ticket anymore. I'll close it. In addition, for those questions of using OpenMP target offloading, https://discourse.llvm.org/c/runtimes/openmp/ is a better place. GitHub issue is more for bug report. |
@jhuber6 I still see
as of 69243cd. I don't get these when using Mold-git as my linker. |
That's caused by |
Sure, I'll open a new issue. Filed it here: #59660 |
On x86/Linux, did the following
Build gets to 98% complete, and has the following error
The text was updated successfully, but these errors were encountered: