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

Cross compiling getting error gnu/stubs-32.h: No such file or directory #8

Closed
Rhvarrier opened this issue Jun 11, 2022 · 5 comments
Closed

Comments

@Rhvarrier
Copy link

While trying to cross compile raspberry pi I'm getting the following error message
In file included from /home/Raspi/qt6_build/sysroot/usr/include/features.h:485, from /home/Raspi/CrossCompiler/cross-pi-gcc-10.2.0-0/arm-linux-gnueabihf/include/c++/10.2.0/arm-linux-gnueabihf/bits/os_defines.h:39, from /home/Raspi/CrossCompiler/cross-pi-gcc-10.2.0-0/arm-linux-gnueabihf/include/c++/10.2.0/arm-linux-gnueabihf/bits/c++config.h:518, from /home/Raspi/CrossCompiler/cross-pi-gcc-10.2.0-0/arm-linux-gnueabihf/include/c++/10.2.0/bits/stl_algobase.h:59, from /home/Raspi/CrossCompiler/cross-pi-gcc-10.2.0-0/arm-linux-gnueabihf/include/c++/10.2.0/memory:63, from /home/Raspi/qt6_build/qt/build/src/plugins/platformthemes/gtk3/QGtk3ThemePlugin_autogen/EWIEGA46WW/moc_qgtk3dialoghelpers.cpp:9, from /home/Raspi/qt6_build/qt/build/src/plugins/platformthemes/gtk3/QGtk3ThemePlugin_autogen/mocs_compilation.cpp:2: /usr/include/x86_64-linux-gnu/gnu/stubs.h:7:11: fatal error: gnu/stubs-32.h: No such file or directory 7 | # include <gnu/stubs-32.h>
I don't understand why cmake is searching for include files in usr/include/x86_64-linux-gnu/gnu/ even though the cross compiler seems to be configured correctly

@PhysicsX
Copy link
Owner

Probably because of different version of OS? Could you please share history and OS version for raspberry pi.

@Rhvarrier
Copy link
Author

After further investigation it seems that the following line are missing in the CMake Toolchain file provided:
set(ENV{PKG_CONFIG_PATH} "") set(ENV{PKG_CONFIG_LIBDIR} ${CMAKE_SYSROOT}/usr/lib/pkgconfig:${CMAKE_SYSROOT}/usr/share/pkgconfig) set(ENV{PKG_CONFIG_SYSROOT_DIR} ${CMAKE_SYSROOT})

After adding these line the issue was resolved

@PhysicsX PhysicsX reopened this Jun 11, 2022
@PhysicsX
Copy link
Owner

Are you using different toolchain? I did not see this issue?

@Rhvarrier
Copy link
Author

Yes I'm using gcc-10.2 for armv6

@PhysicsX
Copy link
Owner

Nice. That is why you see this issues. Are you able to compile it successfully ? If it is so, could you please share the exact link of the toolchain ? And is there any additional steps that you have done ? I have not tried it with default toolchain, I can try and add to the page for other people.

thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants