Ogeon / rust-on-raspberry-pi

[OUTDATED] Instructions for how to cross compile Rust projects for the Raspberry Pi
292 stars 15 forks source link

Can not ld library #20

Closed vincent-zhu closed 8 years ago

vincent-zhu commented 8 years ago

I need some c library to compile my project. First, I run into error of "data.tar.gz" missing. While I changed run.sh and get it solved. `ar p $i data.tar.xz | unxz | tar x;

ar p $i data.tar.gz | tar zx;`

Then I run into such error.

error: linking withgcc-sysrootfailed: exit code: 1 note: "gcc-sysroot" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-L" "/home/cross/pi-rust/lib/rustlib/arm-unknown-linux-gnueabihf/lib" "/home/cross/project/target/arm-unknown-linux-gnueabihf/release/musician.0.o" "-o" "/home/cross/project/target/arm-unknown-linux-gnueabihf/release/musician" "-Wl,--gc-sections" "-pie" "-Wl,-O1" "-nodefaultlibs" "-L" "/home/cross/project/target/arm-unknown-linux-gnueabihf/release" "-L" "/home/cross/project/target/arm-unknown-linux-gnueabihf/release/deps" "-L" "/home/cross/pi-rust/lib/rustlib/arm-unknown-linux-gnueabihf/lib" "-Wl,-Bstatic" "-Wl,-Bdynamic" "/home/cross/project/target/arm-unknown-linux-gnueabihf/release/deps/libgst-81229148d70a8b14.rlib" "/home/cross/pi-rust/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libstd-9026086f.rlib" "/home/cross/pi-rust/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libcollections-9026086f.rlib" "/home/cross/pi-rust/lib/rustlib/arm-unknown-linux-gnueabihf/lib/librustc_unicode-9026086f.rlib" "/home/cross/pi-rust/lib/rustlib/arm-unknown-linux-gnueabihf/lib/librand-9026086f.rlib" "/home/cross/pi-rust/lib/rustlib/arm-unknown-linux-gnueabihf/lib/liballoc-9026086f.rlib" "/home/cross/pi-rust/lib/rustlib/arm-unknown-linux-gnueabihf/lib/liballoc_jemalloc-9026086f.rlib" "/home/cross/pi-rust/lib/rustlib/arm-unknown-linux-gnueabihf/lib/liblibc-9026086f.rlib" "/home/cross/pi-rust/lib/rustlib/arm-unknown-linux-gnueabihf/lib/libcore-9026086f.rlib" "-l" "gstvideo-1.0" "-l" "gstapp-1.0" "-l" "gstbase-1.0" "-l" "gstreamer-1.0" "-l" "gobject-2.0" "-l" "glib-2.0" "-l" "dl" "-l" "pthread" "-l" "gcc_s" "-l" "pthread" "-l" "c" "-l" "m" "-l" "rt" "-l" "util" "-l" "compiler-rt" note: /home/cross/pi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lgstvideo-1.0 /home/cross/pi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lgstapp-1.0 /home/cross/pi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lgstbase-1.0 /home/cross/pi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lgstreamer-1.0 collect2: error: ld returned 1 exit status

I confirmed all required debs has been placed under dep folders.

vincent-zhu commented 8 years ago

Deb used attached.

debs.zip

Ogeon commented 8 years ago

I wonder if this is related to #18. Have you tried to run it in verbose mode?

Ogeon commented 8 years ago

Did you solve it?

vincent-zhu commented 8 years ago

No, I tried and still got error missing library.

Now I use rust arm version directly.

2016-06-24 14:54 GMT+08:00 Erik Hedvall notifications@github.com:

Did you solve it?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Ogeon/rust-on-raspberry-pi/issues/20#issuecomment-228271499, or mute the thread https://github.com/notifications/unsubscribe/AFZ-wSwisjYhiO5MtDdDhDGp2QpybSZ6ks5qO38YgaJpZM4I7ddN .

Ogeon commented 8 years ago

Alright.