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

Android support #6

Closed
kvark opened this issue Nov 9, 2020 · 2 comments
Closed

Android support #6

kvark opened this issue Nov 9, 2020 · 2 comments

Comments

@kvark
Copy link

kvark commented Nov 9, 2020

Hitting an assert when building: https://github.com/gfx-rs/gfx/pull/3470/checks?check_run_id=1372587404#step:5:83

thread 'main' panicked at 'called Result::unwrap() on an Err value: CrossCompilation', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/khronos-egl-2.1.1/build.rs:7:10

@timothee-haudebourg
Copy link
Owner

This comes from the pkg_config crate that is used in build.rs to find the EGL lib. It seems not happy with your cross compilation environment.

According to the doc, you need to set the PKG_CONFIG_ALLOW_CROSS environment variable to ignore this error:

The pkg-config command usually doesn't support cross-compilation, and this crate prevents it from selecting incompatible versions of libraries. Setting PKG_CONFIG_ALLOW_CROSS=1 disables this protection, which is likely to cause linking errors, unless pkg-config has been configured to use appropriate sysroot and search paths for the target platform.

If I understand well, since version 0.3.19 it is enabled by default if either PKG_CONFIG or PKG_CONFIG_SYSROOT_DIR are set (see #86).

@kvark
Copy link
Author

kvark commented Nov 17, 2020

Thank you for the info! Trying this out in gfx-rs/gfx#3480

@kvark kvark closed this as completed Nov 17, 2020
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