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

Generic_GCC can't find GCC 13's omp.h #120347

Open
adamnovak opened this issue Dec 18, 2024 · 1 comment
Open

Generic_GCC can't find GCC 13's omp.h #120347

adamnovak opened this issue Dec 18, 2024 · 1 comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl'

Comments

@adamnovak
Copy link

I'm using Binder with LLVM 14.0.5. It seems like it builds and uses a bunch of Clang, and the bits of Clang it uses are having a lot of trouble finding my omp.h. Here's my log:

BINDER COMMAND: binder/./build/llvm-14.0.5/llvm-14.0.5.Linux-5.15.49-linuxkit-aarch64-with-glibc2.39.release/bin/binder --root-module bdsg --prefix /mnt/libbdsg-bindings-fix/libbdsg/bdsg/cmake_bindings/ --bind bdsg --config config.cfg all_cmake_includes.hpp -- -std=c++14 -I/mnt/libbdsg-bindings-fix/libbdsg/bdsg/include  -I/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/DYNAMIC/include -I/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/pybind11/include -I/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/hopscotch-map/include -I/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/sdsl-lite/include -I/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/mio/include -I/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/libhandlegraph/src/include -I/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/sparsepp -I/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/BBHash -DNDEBUG -v
clang version 14.0.5 (https://github.com/RosettaCommons/binder.git d5ef611f80cc91848db1fbd09d26b97013aa4db5)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir:
Found candidate GCC installation: /../lib/gcc/aarch64-linux-gnu/13
Selected GCC installation: /../lib/gcc/aarch64-linux-gnu/13
Candidate multilib: .;@m64
Selected multilib: .;@m64
clang version 14.0.5 (https://github.com/RosettaCommons/binder.git d5ef611f80cc91848db1fbd09d26b97013aa4db5)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /mnt/libbdsg-bindings-fix/libbdsg/binder/build/llvm-14.0.5/llvm-14.0.5.Linux-5.15.49-linuxkit-aarch64-with-glibc2.39.release/bin
Found candidate GCC installation: /usr/lib/gcc/aarch64-linux-gnu/13
Selected GCC installation: /usr/lib/gcc/aarch64-linux-gnu/13
Candidate multilib: .;@m64
Selected multilib: .;@m64
clang Invocation:
 "/mnt/libbdsg-bindings-fix/libbdsg/binder/build/llvm-14.0.5/llvm-14.0.5.Linux-5.15.49-linuxkit-aarch64-with-glibc2.39.release/bin/clang-tool" "-cc1" "-triple" "aarch64-unknown-linux-gnu" "-fsyntax-only" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "all_cmake_includes.hpp" "-mrelocation-model" "static" "-mframe-pointer=non-leaf" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "generic" "-target-feature" "+neon" "-target-feature" "+v8a" "-target-abi" "aapcs" "-fallow-half-arguments-and-returns" "-debugger-tuning=gdb" "-v" "-fcoverage-compilation-dir=/mnt/libbdsg-bindings-fix/libbdsg" "-resource-dir" "/mnt/libbdsg-bindings-fix/libbdsg/binder/build/llvm-14.0.5/llvm-14.0.5.Linux-5.15.49-linuxkit-aarch64-with-glibc2.39.release/lib/clang/14.0.5" "-I" "/mnt/libbdsg-bindings-fix/libbdsg/bdsg/include" "-I" "/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/DYNAMIC/include" "-I" "/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/pybind11/include" "-I" "/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/hopscotch-map/include" "-I" "/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/sdsl-lite/include" "-I" "/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/mio/include" "-I" "/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/libhandlegraph/src/include" "-I" "/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/sparsepp" "-I" "/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/BBHash" "-D" "NDEBUG" "-internal-isystem" "/usr/lib/gcc/aarch64-linux-gnu/13/../../../../include/c++/13" "-internal-isystem" "/usr/lib/gcc/aarch64-linux-gnu/13/../../../../include/aarch64-linux-gnu/c++/13" "-internal-isystem" "/usr/lib/gcc/aarch64-linux-gnu/13/../../../../include/c++/13/backward" "-internal-isystem" "/mnt/libbdsg-bindings-fix/libbdsg/binder/build/llvm-14.0.5/llvm-14.0.5.Linux-5.15.49-linuxkit-aarch64-with-glibc2.39.release/lib/clang/14.0.5/include" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/usr/lib/gcc/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/include" "-internal-externc-isystem" "/usr/include/aarch64-linux-gnu" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-std=c++14" "-fdeprecated-macro" "-fdebug-compilation-dir=/mnt/libbdsg-bindings-fix/libbdsg" "-ferror-limit" "19" "-fno-signed-char" "-fgnuc-version=4.2.1" "-fcxx-exceptions" "-fexceptions" "-fcolor-diagnostics" "-target-feature" "+outline-atomics" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-x" "c++-header" "/mnt/libbdsg-bindings-fix/libbdsg/all_cmake_includes.hpp"

clang -cc1 version 14.0.5 based upon LLVM 14.0.5 default target aarch64-unknown-linux-gnu
ignoring nonexistent directory "/usr/lib/gcc/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/include"
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /mnt/libbdsg-bindings-fix/libbdsg/bdsg/include
 /mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/DYNAMIC/include
 /mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/pybind11/include
 /mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/hopscotch-map/include
 /mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/sdsl-lite/include
 /mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/mio/include
 /mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/libhandlegraph/src/include
 /mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/sparsepp
 /mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/BBHash
 /usr/lib/gcc/aarch64-linux-gnu/13/../../../../include/c++/13
 /usr/lib/gcc/aarch64-linux-gnu/13/../../../../include/aarch64-linux-gnu/c++/13
 /usr/lib/gcc/aarch64-linux-gnu/13/../../../../include/c++/13/backward
 /mnt/libbdsg-bindings-fix/libbdsg/binder/build/llvm-14.0.5/llvm-14.0.5.Linux-5.15.49-linuxkit-aarch64-with-glibc2.39.release/lib/clang/14.0.5/include
 /usr/local/include
 /usr/include/aarch64-linux-gnu
 /usr/include
End of search list.
Process input file /mnt/libbdsg-bindings-fix/libbdsg/all_cmake_includes.hpp
/mnt/libbdsg-bindings-fix/libbdsg/all_cmake_includes.hpp:88:10: fatal error: 'omp.h' file not found
#include <omp.h>
         ^~~~~~~
Generate bindings, pass 1...
Generate bindings, pass 2...
Generate bindings, pass 3...
Generate bindings, pass 4...
Generate bindings, pass 5...
Generate bindings, pass 6...
Sorting Binders...
Sorting Binders... Done.
Writing code...
Writing code... Done.
1 error generated.

The driver (?) successfully finds the right GCC installation with has the C++ STL that I want to be used in the bindings that Binder will generate (/usr/lib/gcc/aarch64-linux-gnu/13). But the final include search path doesn't end up featuring /usr/lib/gcc/aarch64-linux-gnu/13/include/, where omp.h actually lives.

It seems like that directory should be found by Generic_GCC::AddMultilibIncludeArgs, since I think this is a multilib-specific include directory (though it's also version specific). But I think that that's actually coming up with the /usr/lib/gcc/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/include, which ends in the triple and /include like the function seems to be going for, but which doesn't actually exist.

How is Generic_GCC meant to be finding the directory with the triple-specific, GCC-version-specific omp.h in it?

I haven't tried newer Clang versions here; it's possible this logic has changed and works in newer versions. But I looked over the code and it wasn't clear in the current version how this directory is meant to be found either. There's no real difference in the one non-c++-specific include-finding function.

@EugeneZelenko EugeneZelenko added clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' and removed new issue labels Dec 18, 2024
@llvmbot
Copy link
Member

llvmbot commented Dec 18, 2024

@llvm/issue-subscribers-clang-driver

Author: Adam Novak (adamnovak)

I'm using Binder with LLVM 14.0.5. It seems like it builds and uses a bunch of Clang, and the bits of Clang it uses are having a lot of trouble finding my `omp.h`. Here's my log:
BINDER COMMAND: binder/./build/llvm-14.0.5/llvm-14.0.5.Linux-5.15.49-linuxkit-aarch64-with-glibc2.39.release/bin/binder --root-module bdsg --prefix /mnt/libbdsg-bindings-fix/libbdsg/bdsg/cmake_bindings/ --bind bdsg --config config.cfg all_cmake_includes.hpp -- -std=c++14 -I/mnt/libbdsg-bindings-fix/libbdsg/bdsg/include  -I/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/DYNAMIC/include -I/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/pybind11/include -I/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/hopscotch-map/include -I/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/sdsl-lite/include -I/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/mio/include -I/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/libhandlegraph/src/include -I/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/sparsepp -I/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/BBHash -DNDEBUG -v
clang version 14.0.5 (https://github.com/RosettaCommons/binder.git d5ef611f80cc91848db1fbd09d26b97013aa4db5)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir:
Found candidate GCC installation: /../lib/gcc/aarch64-linux-gnu/13
Selected GCC installation: /../lib/gcc/aarch64-linux-gnu/13
Candidate multilib: .;@<!-- -->m64
Selected multilib: .;@<!-- -->m64
clang version 14.0.5 (https://github.com/RosettaCommons/binder.git d5ef611f80cc91848db1fbd09d26b97013aa4db5)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /mnt/libbdsg-bindings-fix/libbdsg/binder/build/llvm-14.0.5/llvm-14.0.5.Linux-5.15.49-linuxkit-aarch64-with-glibc2.39.release/bin
Found candidate GCC installation: /usr/lib/gcc/aarch64-linux-gnu/13
Selected GCC installation: /usr/lib/gcc/aarch64-linux-gnu/13
Candidate multilib: .;@<!-- -->m64
Selected multilib: .;@<!-- -->m64
clang Invocation:
 "/mnt/libbdsg-bindings-fix/libbdsg/binder/build/llvm-14.0.5/llvm-14.0.5.Linux-5.15.49-linuxkit-aarch64-with-glibc2.39.release/bin/clang-tool" "-cc1" "-triple" "aarch64-unknown-linux-gnu" "-fsyntax-only" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "all_cmake_includes.hpp" "-mrelocation-model" "static" "-mframe-pointer=non-leaf" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "generic" "-target-feature" "+neon" "-target-feature" "+v8a" "-target-abi" "aapcs" "-fallow-half-arguments-and-returns" "-debugger-tuning=gdb" "-v" "-fcoverage-compilation-dir=/mnt/libbdsg-bindings-fix/libbdsg" "-resource-dir" "/mnt/libbdsg-bindings-fix/libbdsg/binder/build/llvm-14.0.5/llvm-14.0.5.Linux-5.15.49-linuxkit-aarch64-with-glibc2.39.release/lib/clang/14.0.5" "-I" "/mnt/libbdsg-bindings-fix/libbdsg/bdsg/include" "-I" "/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/DYNAMIC/include" "-I" "/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/pybind11/include" "-I" "/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/hopscotch-map/include" "-I" "/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/sdsl-lite/include" "-I" "/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/mio/include" "-I" "/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/libhandlegraph/src/include" "-I" "/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/sparsepp" "-I" "/mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/BBHash" "-D" "NDEBUG" "-internal-isystem" "/usr/lib/gcc/aarch64-linux-gnu/13/../../../../include/c++/13" "-internal-isystem" "/usr/lib/gcc/aarch64-linux-gnu/13/../../../../include/aarch64-linux-gnu/c++/13" "-internal-isystem" "/usr/lib/gcc/aarch64-linux-gnu/13/../../../../include/c++/13/backward" "-internal-isystem" "/mnt/libbdsg-bindings-fix/libbdsg/binder/build/llvm-14.0.5/llvm-14.0.5.Linux-5.15.49-linuxkit-aarch64-with-glibc2.39.release/lib/clang/14.0.5/include" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/usr/lib/gcc/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/include" "-internal-externc-isystem" "/usr/include/aarch64-linux-gnu" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-std=c++14" "-fdeprecated-macro" "-fdebug-compilation-dir=/mnt/libbdsg-bindings-fix/libbdsg" "-ferror-limit" "19" "-fno-signed-char" "-fgnuc-version=4.2.1" "-fcxx-exceptions" "-fexceptions" "-fcolor-diagnostics" "-target-feature" "+outline-atomics" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-x" "c++-header" "/mnt/libbdsg-bindings-fix/libbdsg/all_cmake_includes.hpp"

clang -cc1 version 14.0.5 based upon LLVM 14.0.5 default target aarch64-unknown-linux-gnu
ignoring nonexistent directory "/usr/lib/gcc/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/include"
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include &lt;...&gt; search starts here:
 /mnt/libbdsg-bindings-fix/libbdsg/bdsg/include
 /mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/DYNAMIC/include
 /mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/pybind11/include
 /mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/hopscotch-map/include
 /mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/sdsl-lite/include
 /mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/mio/include
 /mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/libhandlegraph/src/include
 /mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/sparsepp
 /mnt/libbdsg-bindings-fix/libbdsg/bdsg/deps/BBHash
 /usr/lib/gcc/aarch64-linux-gnu/13/../../../../include/c++/13
 /usr/lib/gcc/aarch64-linux-gnu/13/../../../../include/aarch64-linux-gnu/c++/13
 /usr/lib/gcc/aarch64-linux-gnu/13/../../../../include/c++/13/backward
 /mnt/libbdsg-bindings-fix/libbdsg/binder/build/llvm-14.0.5/llvm-14.0.5.Linux-5.15.49-linuxkit-aarch64-with-glibc2.39.release/lib/clang/14.0.5/include
 /usr/local/include
 /usr/include/aarch64-linux-gnu
 /usr/include
End of search list.
Process input file /mnt/libbdsg-bindings-fix/libbdsg/all_cmake_includes.hpp
/mnt/libbdsg-bindings-fix/libbdsg/all_cmake_includes.hpp:88:10: fatal error: 'omp.h' file not found
#include &lt;omp.h&gt;
         ^~~~~~~
Generate bindings, pass 1...
Generate bindings, pass 2...
Generate bindings, pass 3...
Generate bindings, pass 4...
Generate bindings, pass 5...
Generate bindings, pass 6...
Sorting Binders...
Sorting Binders... Done.
Writing code...
Writing code... Done.
1 error generated.

The driver (?) successfully finds the right GCC installation with has the C++ STL that I want to be used in the bindings that Binder will generate (/usr/lib/gcc/aarch64-linux-gnu/13). But the final include search path doesn't end up featuring /usr/lib/gcc/aarch64-linux-gnu/13/include/, where omp.h actually lives.

It seems like that directory should be found by Generic_GCC::AddMultilibIncludeArgs, since I think this is a multilib-specific include directory (though it's also version specific). But I think that that's actually coming up with the /usr/lib/gcc/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/include, which ends in the triple and /include like the function seems to be going for, but which doesn't actually exist.

How is Generic_GCC meant to be finding the directory with the triple-specific, GCC-version-specific omp.h in it?

I haven't tried newer Clang versions here; it's possible this logic has changed and works in newer versions. But I looked over the code and it wasn't clear in the current version how this directory is meant to be found either. There's no real difference in the one non-c++-specific include-finding function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl'
Projects
None yet
Development

No branches or pull requests

3 participants