-
Notifications
You must be signed in to change notification settings - Fork 422
Description
Checklist
- I've looked through the issues and pull requests for similar reports
Describe your issue
I have multiple issues compiling for arm-unknown-linux-gnueabihf. Building my project yields
thread 'main' panicked at 'Unable to find libudev: Failure { command: "\"pkg-config\" \"--libs\" \"--cflags\" \"libudev\"", output: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "Package libudev was not found in the pkg-config search path.\nPerhaps you should add the directory containing libudev.pc into the PKG_CONFIG_PATH environment variable\nNo package \'libudev\' found\n" } }'
libudev-dev is installed correctly inside the image. Re-adding the lineENV PKG_CONFIG_PATH="/usr/lib/arm-linux-gnueabihf/pkgconfig/:${PKG_CONFIG_PATH}"
that was removed in #734 to my own Dockerfile fixes this for me, but leaves me with another error:
warning: etc/hidapi/linux/hid.c:44:10: fatal error: libudev.h: No such file or directory
warning: #include <libudev.h>
warning: ^~~~~~~~~~~
warning: compilation terminated.
I solved this by copying the header file into /x-tools/arm-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf/sysroot/usr/include/libudev.h
. I believe that this is not a good solution. Is there a way to fix this in the base dockerfile itself?
What target(s) are you cross-compiling for?
aarch64-unknown-linux-gnu, arm-unknown-linux-gnueabihf, armv7-unknown-linux-gnueabihf, i686-unknown-linux-gnu, x86_64-unknown-linux-gnu
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.22.0
Example
No response
Additional information / notes
All other architectures(armv7, aarch64, i686, x86) build without issues with just some commands to install "libudev-dev" in the pre-built section of my Cross.toml file, e.g.:
[target.armv7-unknown-linux-gnueabihf]
pre-build = [
"dpkg --add-architecture armhf",
"apt-get update",
"apt-get install -y libudev-dev:armhf"
]