murarth/rusti

can't build/run master

Closed this issue · 6 comments

jozic commented

i cloned rusti repo, have nightly rust installed, but can't build rusti

eplatonov@eplatonov-vb-mint ~/projects/github/rusti (master) $ cargo clean 
eplatonov@eplatonov-vb-mint ~/projects/github/rusti (master) $ rustc --version
rustc 1.8.0-nightly (c8fc4817d 2016-02-22)
eplatonov@eplatonov-vb-mint ~/projects/github/rusti (master) $ cargo --version 
cargo 0.9.0-nightly (93fb4c0 2016-02-22)
eplatonov@eplatonov-vb-mint ~/projects/github/rusti (master) $ cargo build 
   Compiling libc v0.2.4
   Compiling winapi-build v0.1.1
   Compiling kernel32-sys v0.2.1
   Compiling regex-syntax v0.2.2
   Compiling memchr v0.1.7
   Compiling aho-corasick v0.4.0
   Compiling log v0.3.4
   Compiling advapi32-sys v0.1.2
   Compiling getopts v0.2.14
   Compiling winapi v0.2.5
   Compiling regex v0.1.46
   Compiling rand v0.3.12
   Compiling tempfile v1.1.3
   Compiling env_logger v0.3.2
   Compiling rusti v0.0.1 (file:///home/eplatonov/projects/github/rusti)
error: linking with `cc` failed: exit code: 1
note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/eplatonov/projects/github/rusti/target/debug/rusti.0.o" "-o" "/home/eplatonov/projects/github/rusti/target/debug/rusti" "-Wl,--gc-sections" "-pie" "-nodefaultlibs" "-L" "/home/eplatonov/projects/github/rusti/target/debug" "-L" "/home/eplatonov/projects/github/rusti/target/debug/deps" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-Wl,-Bdynamic" "/home/eplatonov/projects/github/rusti/target/debug/librusti.rlib" "/home/eplatonov/projects/github/rusti/target/debug/deps/libenv_logger-2fedde90a22290a6.rlib" "/home/eplatonov/projects/github/rusti/target/debug/deps/libgetopts-852fe11dd444cf81.rlib" "/home/eplatonov/projects/github/rusti/target/debug/deps/liblog-87d547eff707fc8e.rlib" "/home/eplatonov/projects/github/rusti/target/debug/deps/libregex-e2957abba0c5c748.rlib" "/home/eplatonov/projects/github/rusti/target/debug/deps/libregex_syntax-695a6c2a2c33e892.rlib" "/home/eplatonov/projects/github/rusti/target/debug/deps/libtempfile-7a516df1b247e424.rlib" "/home/eplatonov/projects/github/rusti/target/debug/deps/librand-12e778fcd5eb28e9.rlib" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "rustc_driver-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "rustc_passes-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "rustc_typeck-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "rustc_lint-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "rustc_privacy-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "syntax_ext-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "rustc_plugin-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "rustc_resolve-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "rustc_borrowck-fd663c41" "/home/eplatonov/projects/github/rusti/target/debug/deps/libaho_corasick-32050201217e44e8.rlib" "/home/eplatonov/projects/github/rusti/target/debug/deps/libmemchr-940d9877eaa7970c.rlib" "/home/eplatonov/projects/github/rusti/target/debug/deps/liblibc-adb8b8e7aaa2f93f.rlib" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "rustc_metadata-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "rustc_trans-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "rustc_platform_intrinsics-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "rustc_mir-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "rustc-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "rbml-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "rustc_data_structures-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "rustc_back-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "flate-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "getopts-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "arena-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "fmt_macros-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "graphviz-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "rustc_front-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "syntax-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "term-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "serialize-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "log-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "rustc_llvm-fd663c41" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-l" "std-fd663c41" "-l" "readline" "-l" "pthread" "-l" "rt" "-l" "dl" "-l" "m" "-l" "dl" "-l" "pthread" "-l" "gcc_s" "-l" "pthread" "-l" "c" "-l" "m" "-l" "rt" "-l" "compiler-rt"
note: /usr/bin/ld: cannot find -lreadline
collect2: error: ld returned 1 exit status

error: aborting due to previous error
Could not compile `rusti`.

To learn more, run the command again with --verbose.

is there something I'm missing?

Yes. You're missing libreadline. On systems with APT installed (Debian, Ubuntu, Mint), it can be installed with the command (as root) apt-get install libreadline6.

jozic commented

unfortunately this didn't help

eplatonov@eplatonov-vb-mint ~/projects/github/rusti (master) $ sudo apt-get install libreadline6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libreadline6 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

cargo build still fails with same error

Hm. Try libreadline6-dev?

jozic commented

this helped, thanks!
do you think this should be mentioned somewhere in README?

I've just merged a PR to add such a note. Helpful people all around. :D

jozic commented

:) nice!