-
-
Notifications
You must be signed in to change notification settings - Fork 101
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-compiler 8.2.0 doesn't have {sysroot}/usr/include in its header search path #3
Comments
@avilleret Can share the |
it's in AUR repo : https://aur.archlinux.org/packages/arm-linux-gnueabihf-gcc/ |
@avilleret I thought you're using custom Cross-Compiler similar this repo. , The main reason behind this bug/error is that the Official Cross Compiler install files directly to the default system root directory, i.e So, unfortunately, if you want to use GCC 8.2.0 Cross-Compiler with Cmake on your system, you yourself have compiled & installed it from source to the root directory of your machine. |
@avilleret They're working on a fix here(in progress): https://gitlab.kitware.com/cmake/cmake/merge_requests/2716 |
it is indeed possible to use your Crosscompiler build with CMake (and I thanks you a lot for sharing)
I was unsure if its a bug (or a feature) of CMake or if it's a lake of configuration on your side. |
when crosscompiling, this happen when `avahi-client/avahi.h` is the `${CMAKE_SYSROOT]/usr/include/` folder. And that default folder is not added automatically to headers search path. This might be related to abhiTronix/raspberry-pi-cross-compilers#3 (comment). Btw I have to install avahi libs in /opt/avahi and add this folder to `CMAKE_PREFIX_PATH`.
with your 8.2.0 compiler I got :
while with the 8.1.0 I installed from archlinux repo I have :
Please note that in the second case,
#include <...> search starts here:
lists/home/antoine/dev/ofnode/sysroot/usr/include
while the first (8.2.0) doesn't.While I can manually add the include path with a
-I
flag, it makes this compiler hard to use with CMake which strips off "${CMAKE_SYSROOT}/usr/include".see related issue here : https://gitlab.kitware.com/cmake/cmake/issues/17966
The text was updated successfully, but these errors were encountered: