japaric-archived / ruststrap

[SUPERSEDED] by https://github.com/warricksothr/RustBuild
MIT License
96 stars 17 forks source link

librustc_driver not found #27

Closed jonalmeida closed 9 years ago

jonalmeida commented 9 years ago

After taking a compiled binary, putting it on a fresh install of Raspbian, I get this error. Below are my configurations & details:

Raspbian image: 2015-01-31-raspbian.img

Rust binary tar file:

Binary location:

pi@raspberrypi ~/rust/bin $ ls rust-gdb rustc rustdoc pi@raspberrypi ~/rust/bin $ pwd /home/pi/rust/bin

PATH:

pi@raspberrypi ~/rust $ echo $PATH /home/pi/rust/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games

Output from execution:

pi@raspberrypi ~/rust $ rustc --version rustc: error while loading shared libraries: librustc_driver-4e7c5e5c.so: cannot open shared object file: No such file or directory

Great work with the build scripts! :)

EDIT: Updated with two builds that don't work.

Novacha commented 9 years ago

You will need to specify the library path (the lib folder next to the bin folder). This means that you should be able to run the following command:

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:lib bin/rustc -V

where rustc is located at bin/rustc.

jonalmeida commented 9 years ago

Ah yes! I forgot to do that. Thanks @Novacha !

Closing..