Racer fail to build on Mint 18.3


#1

I have been unable to build racer both from cargo install racer and by downloading the source code from github.

This is the result when I try to build it.

davraine@anthony-XPS-15 ~ $ cargo install racer
Updating registry https://github.com/rust-lang/crates.io-index
Installing racer v2.0.12
Compiling term v0.4.6
Compiling bitflags v0.7.0
Compiling winapi-build v0.1.1
Compiling vec_map v0.8.0
Compiling regex-syntax v0.3.9
Compiling utf8-ranges v0.1.3
Compiling ansi_term v0.10.2
Compiling bitflags v1.0.1
Compiling winapi v0.2.8
Compiling strsim v0.6.0
Compiling lazy_static v0.2.11
Compiling libc v0.2.34
Compiling unicode-width v0.1.4
Compiling log v0.3.8
Compiling unicode-xid v0.0.3
Compiling rustc-serialize v0.3.24
Compiling kernel32-sys v0.2.2
Compiling textwrap v0.9.0
error: linking with cc failed: exit code: 1
|
= note: “cc” “-Wl,–as-needed” “-Wl,-z,noexecstack” “-m64” “-L” “/home/davraine/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib” “/tmp/cargo-install.yslq62nMcqxC/release/build/kernel32-sys-31f6e30eb98258c7/build_script_build-31f6e30eb98258c7.build_script_build0.rust-cgu.o” “-o” “/tmp/cargo-install.yslq62nMcqxC/release/build/kernel32-sys-31f6e30eb98258c7/build_script_build-31f6e30eb98258c7” “/tmp/cargo-install.yslq62nMcqxC/release/build/kernel32-sys-31f6e30eb98258c7/build_script_build-31f6e30eb98258c7.crate.allocator.rust-cgu.o” “-Wl,–gc-sections” “-pie” “-Wl,-z,relro,-z,now” “-Wl,-O1” “-nodefaultlibs” “-L” “/tmp/cargo-install.yslq62nMcqxC/release/deps” “-L” “/home/davraine/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib” “-Wl,-Bstatic” “/tmp/cargo-install.yslq62nMcqxC/release/deps/libbuild-4fb1577bee2eab67.rlib” “/home/davraine/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-fe0b1b991511fcaa.rlib” “/home/davraine/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librand-3d7b10e850a67e89.rlib” “/home/davraine/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-28484309357fd6f1.rlib” “/home/davraine/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_system-751808ba756769d5.rlib” “/home/davraine/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-8cb97051d8238386.rlib” “/home/davraine/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-25cc9b024a02d330.rlib” “/home/davraine/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-d42e80cee81b06ce.rlib” “/home/davraine/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-78c21267a2dc15c1.rlib” “/home/davraine/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_unicode-0e1b544c94586415.rlib” “/home/davraine/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-0c5e3d6c117f8c44.rlib” “/home/davraine/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-bd7cc5ada1e908e0.rlib” “-Wl,-Bdynamic” “-l” “dl” “-l” “rt” “-l” “pthread” “-l” “pthread” “-l” “gcc_s” “-l” “c” “-l” “m” “-l” “rt” “-l” “pthread” “-l” “util”
= note: /usr/bin/ld: cannot find Scrt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: cannot find -ldl
/usr/bin/ld: cannot find -lrt
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lc
/usr/bin/ld: cannot find -lm
/usr/bin/ld: cannot find -lrt
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lutil
/usr/bin/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status

error: aborting due to previous error

error: Could not compile kernel32-sys.
warning: build failed, waiting for other jobs to finish…
error: failed to compile racer v2.0.12, intermediate artifacts can be found at /tmp/cargo-install.yslq62nMcqxC

Caused by:
build failed


#2

Found the problem, I needed to install g++.