-
Notifications
You must be signed in to change notification settings - Fork 444
Open
Description
Checklist
- I've looked through the issues and pull requests for similar reports
Describe your issue
Trying to cross-compile a project using bindgen, the package I depend on is found, but the reported path is wrong.
It turns out that when using pkg-config, the library is found thanks to PKG_CONFIG_PATH variable, but the flags returned do not include the target in path.
When entering the container:
# pkg-config --cflags openssl
-I/usr/local/include
# ls /usr/local/include
(nothing)
#
The project I try to build is using rrd, for which I have an open PR to fix the build: cygnus9/rrd-rust#17
This works on a real FreeBSD host.
I am not familiar with the concept of sysroot, so I may miss something.
What target(s) are you cross-compiling for?
x86_64-unknown-freebsd
Which operating system is the host (e.g computer cross is on) running?
- macOS
- Windows
- Linux / BSD
- other OS (specify in description)
What architecture is the host?
- x86_64 / AMD64
- arm32
- arm64 (including Mac M1)
What container engine is cross using?
- docker
- podman
- other container engine (specify in description)
cross version
cross 0.2.5
Example
git clone https://github.com/schodet/rrd-rust.git -b pkg-config-include-path
cd rrd-rust/librrd-sys
edit Cross.toml
cross build --target x86_64-unknown-freebsdWith Cross.toml:
[target.x86_64-unknown-freebsd]
pre-build = ["""
export FREEBSD_MIRROR=$(/freebsd-fetch-best-mirror.sh) &&
/freebsd-setup-packagesite.sh &&
/freebsd-install-package.sh pkgconf rrdtool
"""]Result:
...
src/gen/wrapper.h:1:10: fatal error: 'rrd.h' file not found
Additional information / notes
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels