-
Notifications
You must be signed in to change notification settings - Fork 166
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
vulkaninfo: suppress -isystem being passed #1077
base: main
Are you sure you want to change the base?
Conversation
During the process of updating vulkan-tools in buildroot I ran into the following build failure: [ 50%] Building CXX object vulkaninfo/CMakeFiles/vulkaninfo.dir/vulkaninfo.cpp.o In file included from /home/alex/lsrc/tests/buildroot.git/builds/arm64/host/aarch64-buildroot-linux-gnu/include/c++/14.2.0/bits/stl_algo.h:71, from /home/alex/lsrc/tests/buildroot.git/builds/arm64/host/aarch64-buildroot-linux-gnu/include/c++/14.2.0/algorithm:61, from /home/alex/lsrc/tests/buildroot.git/builds/arm64/build/vulkan-tools-1.4.307/vulkaninfo/./vulkaninfo.h:31, from /home/alex/lsrc/tests/buildroot.git/builds/arm64/build/vulkan-tools-1.4.307/vulkaninfo/generated/vulkaninfo.hpp:28, from /home/alex/lsrc/tests/buildroot.git/builds/arm64/build/vulkan-tools-1.4.307/vulkaninfo/vulkaninfo.cpp:34: /home/alex/lsrc/tests/buildroot.git/builds/arm64/host/aarch64-buildroot-linux-gnu/include/c++/14.2.0/cstdlib:79:15: fatal error: stdlib.h: No such file or directory 79 | #include_next <stdlib.h> | ^~~~~~~~~~ compilation terminated. make[2]: *** [vulkaninfo/CMakeFiles/vulkaninfo.dir/build.make:76: vulkaninfo/CMakeFiles/vulkaninfo.dir/vulkaninfo.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:116: vulkaninfo/CMakeFiles/vulkaninfo.dir/all] Error 2 make: *** [Makefile:136: all] Error 2 The underlying reason was -isystem being passed to the build which I think resets the include path for system includes. This might be a bug in cmake but from looking at the CMake source I found some examples that set: NO_SYSTEM_FROM_IMPORTED 1 as a target property which seems to do the job. This doesn't seem to affect the normal non-cross build although I wouldn't expect you need to pass -isystem anyway. Signed-off-by: Alex Bennée <[email protected]>
Author stsquad not on autobuild list. Waiting for curator authorization before starting CI build. |
1 similar comment
Author stsquad not on autobuild list. Waiting for curator authorization before starting CI build. |
CI Vulkan-Tools build queued with queue ID 372256. |
CI Vulkan-Tools build # 1620 running. |
CI Vulkan-Tools build # 1620 passed. |
Usually cross platform builds do not need such a change. Can you post your toolchain file, or at least the main bits of it? Not being able to find the standard library makes me think the C compiler is being used instead of the C++. |
The build configure steps are:
The toolchain.cmake contains:
|
@charles-lunarg was the toolchain as you expected? |
During the process of updating vulkan-tools in buildroot I ran into the following build failure:
[ 50%] Building CXX object vulkaninfo/CMakeFiles/vulkaninfo.dir/vulkaninfo.cpp.o
In file included from /home/alex/lsrc/tests/buildroot.git/builds/arm64/host/aarch64-buildroot-linux-gnu/include/c++/14.2.0/bits/stl_algo.h:71,
from /home/alex/lsrc/tests/buildroot.git/builds/arm64/host/aarch64-buildroot-linux-gnu/include/c++/14.2.0/algorithm:61,
from /home/alex/lsrc/tests/buildroot.git/builds/arm64/build/vulkan-tools-1.4.307/vulkaninfo/./vulkaninfo.h:31,
from /home/alex/lsrc/tests/buildroot.git/builds/arm64/build/vulkan-tools-1.4.307/vulkaninfo/generated/vulkaninfo.hpp:28,
from /home/alex/lsrc/tests/buildroot.git/builds/arm64/build/vulkan-tools-1.4.307/vulkaninfo/vulkaninfo.cpp:34:
/home/alex/lsrc/tests/buildroot.git/builds/arm64/host/aarch64-buildroot-linux-gnu/include/c++/14.2.0/cstdlib:79:15: fatal error: stdlib.h: No such file or directory
79 | #include_next <stdlib.h>
| ^~~~~~~~~~
compilation terminated.
make[2]: *** [vulkaninfo/CMakeFiles/vulkaninfo.dir/build.make:76: vulkaninfo/CMakeFiles/vulkaninfo.dir/vulkaninfo.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:116: vulkaninfo/CMakeFiles/vulkaninfo.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
The underlying reason was -isystem being passed to the build which I think resets the include path for system includes. This might be a bug in cmake but from looking at the CMake source I found some examples that set: NO_SYSTEM_FROM_IMPORTED 1 as a target property which seems to do the job.
This doesn't seem to affect the normal non-cross build although I wouldn't expect you need to pass -isystem anyway.