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

PKG_CONFIG_ALLOW_SYSTEM_CFLAGS and cross-compiling #97

Open
plauche opened this issue Oct 28, 2019 · 0 comments
Open

PKG_CONFIG_ALLOW_SYSTEM_CFLAGS and cross-compiling #97

plauche opened this issue Oct 28, 2019 · 0 comments

Comments

@plauche
Copy link

plauche commented Oct 28, 2019

Hi!

I recently ran into a very strange cross-compiling issue and tracked it down to the changes in #93. My crate depends on other crates which use pkg-config to locate system libraries. Things are all well and good in the native build environment, however having this flag enabled by default is causing me grief when cross-compiling.

My linker is not too keen on having /usr/include passed along as an include folder:

cargo:warning=arm-buildroot-linux-gnueabihf-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I' '/usr/include'

The changelog says that PGK_CONFIG_ALLOW_SYSTEM_CFLAGS is enabled by default, so I'm assuming that means there is a way to disable it.

My question - Can I disable this via configuration in Cargo.toml?
I don't have direct access to the crates which are actually using pkg-config for library location.

Currently I'm just pinning this crate to 0.3.15 in one of my Cargo.toml files so that 0.3.16 is not used.

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

1 participant