dlecan / rust-crosscompiler-arm

Docker images for Rust dedicated to cross compilation for ARM v6 and more
MIT License
50 stars 16 forks source link

Error linking with `arm-linux-gnueabihf-gcc-with-link-search` #4

Closed shaunmulligan closed 7 years ago

shaunmulligan commented 7 years ago

@dlecan first of all, thanks for building this awesome project, its really great. I have been playing around trying to get an arm build of librespot, but haven't had much luck. I added the dependencies to the dockerfile libprotoc-dev:armhf and libssl-dev:armhf and their x86 versions for good measure, but it doesn't seem to be able to complete the build.

I get this error if I have the x86 dependencies added in:

error: linking with `arm-linux-gnueabihf-gcc-with-link-search` failed: exit code: 1

and with only the armhf dependencies:

   Compiling protobuf_build v0.1.1 (https://github.com/plietar/rust-protobuf-build.git#24d5a01c)
Build failed, waiting for other jobs to finish...
error: failed to run custom build command for `protobuf_build v0.1.1 (https://github.com/plietar/rust-protobuf-build.git#24d5a01c)`
process didn't exit successfully: `/source/target/debug/build/protobuf_build-e2686571b24530af/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "`\"pkg-config\" \"--libs\" \"--cflags\" \"protobuf\"` did not exit successfully: exit code: 1\n--- stdout\nPackage protobuf was not found in the pkg-config search path.\nPerhaps you should add the directory containing `protobuf.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'protobuf\' found\n"', ../src/libcore/result.rs:837
note: Run with `RUST_BACKTRACE=1` for a backtrace.

I'm not really sure how to debug this further. I haven't had much experience with linkers and gcc, so any pointers on how to get librespot to build, it would be much appreciated.

dlecan commented 7 years ago

Thank you for reporting this.

Several issues with the Docker image:

I need to investigate this.

shaunmulligan commented 7 years ago

@dlecan thanks, this is so awesome! I'll test it tomorrow :)

dlecan commented 7 years ago

@shaunmulligan after investigations, in order to build rust-protobuf-build itself (librespot dependency):

I didn't try to build librespot itself, you may need additionnal dependencies (portaudio ?).