Skip to content
This repository has been archived by the owner on May 31, 2022. It is now read-only.

note: /usr/bin/ld: cannot find -lhwloc #23

Open
syncharny opened this issue Jul 13, 2017 · 1 comment
Open

note: /usr/bin/ld: cannot find -lhwloc #23

syncharny opened this issue Jul 13, 2017 · 1 comment

Comments

@syncharny
Copy link

syncharny commented Jul 13, 2017

Trying to compile on raspberry pi and I get the following error:

admin@Home:~/proc_bind $ cargo run
Updating registry https://github.com/rust-lang/crates.io-index
Downloading hwloc v0.3.0
Downloading errno v0.1.8
Downloading libc v0.2.26
Downloading bitflags v0.4.0
Downloading num v0.1.39
Downloading num-integer v0.1.34
Downloading num-rational v0.1.38
Downloading num-complex v0.1.38
Downloading num-bigint v0.1.39
Downloading num-traits v0.1.39
Downloading num-iter v0.1.33
Downloading rustc-serialize v0.3.24
Downloading rand v0.3.15
Downloading pkg-config v0.3.9
Compiling rustc-serialize v0.3.24
Compiling pkg-config v0.3.9
Compiling bitflags v0.4.0
Compiling num-traits v0.1.39
Compiling libc v0.2.26
Compiling errno v0.1.8
Compiling hwloc v0.3.0
Compiling rand v0.3.15
Compiling num-integer v0.1.34
Compiling num-iter v0.1.33
Compiling num-complex v0.1.38
Compiling num-bigint v0.1.39
Compiling num-rational v0.1.38
Compiling num v0.1.39
Compiling proc_bind v0.1.0 (file:///home/admin/proc_bind)
error: linking with cc failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-L" "/home/admin/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "/home/admin/proc_bind/target/debug/deps/proc_bind-509124cb24cd4996.0.o" "-o" "/home/admin/proc_bind/target/debug/deps/proc_bind-509124cb24cd4996" "-Wl,--gc-sections" "-pie" "-nodefaultlibs" "-L" "/home/admin/proc_bind/target/debug/deps" "-L" "/home/admin/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-Wl,-Bstatic" "/home/admin/proc_bind/target/debug/deps/libhwloc-d4d9d79dc9c36cef.rlib" "/home/admin/proc_bind/target/debug/deps/libnum-38f918ad6edaf56b.rlib" "/home/admin/proc_bind/target/debug/deps/libnum_rational-a94182cbc5585d11.rlib" "/home/admin/proc_bind/target/debug/deps/libnum_complex-58c4cfb0214e850a.rlib" "/home/admin/proc_bind/target/debug/deps/libnum_iter-da1a48b5a3a7f9e5.rlib" "/home/admin/proc_bind/target/debug/deps/liberrno-3227f32d5929b4d3.rlib" "/home/admin/proc_bind/target/debug/deps/libnum_bigint-97338aaf9a0cc480.rlib" "/home/admin/proc_bind/target/debug/deps/librustc_serialize-0806fbbe5e083cee.rlib" "/home/admin/proc_bind/target/debug/deps/librand-b2d2a325dcb36823.rlib" "/home/admin/proc_bind/target/debug/deps/liblibc-7d398f5f7f488669.rlib" "/home/admin/proc_bind/target/debug/deps/libbitflags-442ee2d65a8ad2c8.rlib" "/home/admin/proc_bind/target/debug/deps/libnum_integer-a5cbdb7f97baaeed.rlib" "/home/admin/proc_bind/target/debug/deps/libnum_traits-0befceedb1d7da35.rlib" "/home/admin/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libstd-f4594d3e53dcb114.rlib" "/home/admin/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libpanic_unwind-a0157c0ca919c364.rlib" "/home/admin/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libunwind-488b4ab4bd53a138.rlib" "/home/admin/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/librand-1efbcfd8938372b6.rlib" "/home/admin/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libcollections-532a3dbf317eff86.rlib" "/home/admin/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/liballoc-ca07b617414dd0fa.rlib" "/home/admin/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/liballoc_jemalloc-492d8ea7fa3384ff.rlib" "/home/admin/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/liblibc-88c194c15fdb6521.rlib" "/home/admin/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libstd_unicode-cfbd6648f7db2ee5.rlib" "/home/admin/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libcore-687e6a964d22cbb4.rlib" "/home/admin/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libcompiler_builtins-987729be881d4d32.rlib" "-Wl,-Bdynamic" "-l" "hwloc" "-l" "util" "-l" "dl" "-l" "rt" "-l" "pthread" "-l" "gcc_s" "-l" "pthread" "-l" "c" "-l" "m" "-l" "rt" "-l" "pthread" "-l" "util"
= note: /usr/bin/ld: cannot find -lhwloc
collect2: error: ld returned 1 exit status

@hintron
Copy link

hintron commented Apr 2, 2019

You need the the hwloc development library to be installed in order to call into it from Rust.
On Ubuntu/Debian:
sudo apt install libhwloc-dev
In general, the development library of any package will be of the form lib<package>-dev in Debian/Ubuntu.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants