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

compilation error when compiling to arm #374

Open
alexou2 opened this issue Mar 21, 2024 · 5 comments
Open

compilation error when compiling to arm #374

alexou2 opened this issue Mar 21, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@alexou2
Copy link

alexou2 commented Mar 21, 2024

Describe the bug
i get a pkg config error when i try to compile my code to armv7-unknown-linux-gnueabihf

Expected behavior
the code should compile without an errors

Actual behavior
when i compile my code for armv7-unknown-linux-gnueabihf, get this error: pkg_config failed: pkg-config has not been configured to support cross-compilation..

Additional context
I am compiling from x86 linux

@alexou2 alexou2 added the bug Something isn't working label Mar 21, 2024
@qwandor
Copy link
Collaborator

qwandor commented Mar 22, 2024

Have you set up pkg-config for cross compilation? You'll need libdbus to link against, at least. cross is one way to do this, you'll want something like this Dockerfile.

@alexou2
Copy link
Author

alexou2 commented Mar 22, 2024

I was able to set up pkg-config for cross compilation, but now i get this linker error: /usr/lib/gcc-cross/arm-linux-gnueabihf/11/../../../../arm-linux-gnueabihf/bin/ld: cannot find -ldbus-1: No such file or directory collect2: error: ld returned 1 exit status

@qwandor
Copy link
Collaborator

qwandor commented Mar 22, 2024

btleplug on Linux depends on libdbus, so you'll need to have it available to link against for your target architecture. How to do that depends on what distribution you are using. Using cross and a Docker container as I suggested above will make this simpler.

@alexou2
Copy link
Author

alexou2 commented Mar 23, 2024

now I get this error when compiling with cross The system library dbus-1required by cratelibdbus-sys was not found.

@qwandor
Copy link
Collaborator

qwandor commented Mar 24, 2024

Did you install libdbus-1-dev in the Docker container for cross, using the Dockerfile I linked or otherwise?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants