-
Notifications
You must be signed in to change notification settings - Fork 179
vulkaninfo: suppress -isystem being passed #1077
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
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? |
|
Unfortunately, I cannot recreate the build as I don't have all the setup steps required to get the buildroot folder in the way that the compiler/project expects. Cross compilation is not my forte and I'm not able to invest hours in figuring out the exact build setup used. I am very suspicious of not being able to find the C standard libraries meaning something about the toolchain or system setup is running afoul. Side note, you are using the 1.3.262 header version, which is over a year old (thus possibly has had some issues already fixed) and also not an SDK version (where LunarG does additional verification) of the components. It may be worth using a newer version for that reason. I also will say that I have very little interest in merging the requested change. This looks like a workaround for a build/packaging/cmake issue rather than something that is integral for building vulkaninfo. |
|
I'll try with the latest SDK. You don't have to merge but best practice for buildroot is to submit upstream and track just in case a better solution is suggested. |
|
Still fails with 1.4.310 - I note that Yocto doesn't seem to need to do this: https://git.yoctoproject.org/poky/plain/meta/recipes-graphics/vulkan/vulkan-tools_1.3.296.0.bb but they haven't moved past 1.3.296 (buildroot was previously on 1.3.262). |
I see. That makes a lot more sense now - happy to let this PR live while the issue is still present. |
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.