Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile bin file 'toda' error #25

Open
zhangqiongjie opened this issue Apr 15, 2021 · 2 comments
Open

Compile bin file 'toda' error #25

zhangqiongjie opened this issue Apr 15, 2021 · 2 comments

Comments

@zhangqiongjie
Copy link

Follow the prompt of Dockerfile, I execute command "cargo build --release", reported error shown below:
# cargo build --release Compiling toda v0.2.0 (/opt/git/toda) warning: unused import: Comm--> src/main.rs:43:29 | 43 | use jsonrpc::{start_server, Comm}; | ^^^^ | = note:#[warn(unused_imports)]` on by default

warning: unused variable: rx
--> src/main.rs:182:14
|
182 | let (tx, rx) = mpsc::channel();
| ^^ help: if this is intentional, prefix it with an underscore: _rx
|
= note: #[warn(unused_variables)] on by default

error: linking with cc failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/root/.rustup/toolchains/nightly-2020-07-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/opt/git/toda/target/release/deps/toda-cb5c5bff5174f91b.toda.64lpe24r-cgu.0.rcgu.o" "/opt/git/toda/target/release/deps/toda-cb5c5bff5174f91b.toda.64lpe24r-cgu.1.rcgu.o" "/opt/git/toda/target/release/deps/toda-cb5c5bff5174f91b.toda.64lpe24r-cgu.10.rcgu.o" "/opt/git/toda/target/release/deps/toda-cb5c5bff5174f91b.toda.64lpe24r-cgu.11.rcgu.o" "/opt/git/toda/target/release/deps/toda-cb5c5bff5174f91b.toda.64lpe24r-cgu.12.rcgu.o" "/opt/git/toda/target/release/deps/toda-cb5c5bff5174f91b.toda.64lpe24r-cgu.13.rcgu.o" "/opt/git/toda/target/release/deps/toda-cb5c5bff5174f91b.toda.64lpe24r-cgu.14.rcgu.o" "/opt/git/toda/target/release/deps/toda-cb5c5bff5174f91b.toda.64lpe24r-cgu.15.rcgu.o" "/opt/git/toda/target/release/deps/toda-cb5c5bff5174f91b.toda.64lpe24r-cgu.2.rcgu.o" "/opt/git/toda/target/release/deps/toda-cb5c5bff5174f91b.toda.64lpe24r-cgu.3.rcgu.o" "/opt/git/toda/target/release/deps/toda-cb5c5bff5174f91b.toda.64lpe24r-cgu.4.rcgu.o" "/opt/git/toda/target/release/deps/toda-cb5c5bff5174f91b.toda.64lpe24r-cgu.5.rcgu.o" "/opt/git/toda/target/release/deps/toda-cb5c5bff5174f91b.toda.64lpe24r-cgu.6.rcgu.o" "/opt/git/toda/target/release/deps/toda-cb5c5bff5174f91b.toda.64lpe24r-cgu.7.rcgu.o" "/opt/git/toda/target/release/deps/toda-cb5c5bff5174f91b.toda.64lpe24r-cgu.8.rcgu.o" "/opt/git/toda/target/release/deps/toda-cb5c5bff5174f91b.toda.64lpe24r-cgu.9.rcgu.o" "-o" "/opt/git/toda/target/release/deps/toda-cb5c5bff5174f91b" "/opt/git/toda/target/release/deps/toda-cb5c5bff5174f91b.1nsm4320yhk89ftn.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/opt/git/toda/target/release/deps" "-L" "/usr/local/lib64" "-L" "/root/.rustup/toolchains/nightly-2020-07-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/opt/git/toda/target/release/deps/libhumantime_serde-f2f0557b1b6c2193.rlib" "/opt/git/toda/target/release/deps/libhumantime-4a822f6ea133d2fe.rlib" "/opt/git/toda/target/release/deps/libjsonrpc_core_client-1f88c57c27bb6390.rlib" "/opt/git/toda/target/release/deps/libjsonrpc_client_transports-bbeed7d2f57c48b2.rlib" "/opt/git/toda/target/release/deps/libjsonrpc_pubsub-d430dfdc02e42a6d.rlib" "/opt/git/toda/target/release/deps/libparking_lot-df7662c8bb114fba.rlib" "/opt/git/toda/target/release/deps/libparking_lot_core-3588e3a083d039af.rlib" "/opt/git/toda/target/release/deps/liblock_api-9d6608a8f31c18c4.rlib" "/opt/git/toda/target/release/deps/libscopeguard-772daad8889142f8.rlib" "/opt/git/toda/target/release/deps/libinstant-dc6818281aa543ee.rlib" "/opt/git/toda/target/release/deps/libtracing_subscriber-dfa45a3fef11e866.rlib" "/opt/git/toda/target/release/deps/libsmallvec-819a017f8f9a5ca5.rlib" "/opt/git/toda/target/release/deps/libsharded_slab-5728851f67b9aef8.rlib" "/opt/git/toda/target/release/deps/libtracing_serde-1bcc070273b5fd04.rlib" "/opt/git/toda/target/release/deps/libtracing_log-33cdee94e3be2b09.rlib" "/opt/git/toda/target/release/deps/libansi_term-db1d5cf854e8bfa1.rlib" "/opt/git/toda/target/release/deps/libmatchers-8bf0e91e06a475ae.rlib" "/opt/git/toda/target/release/deps/libregex_automata-19471ec0caa9dd42.rlib" "/opt/git/toda/target/release/deps/libregex-9e27f150f5ba741f.rlib" "/opt/git/toda/target/release/deps/libthread_local-dccd9d97974b0629.rlib" "/opt/git/toda/target/release/deps/libregex_syntax-17ded0eaeda612f6.rlib" "/opt/git/toda/target/release/deps/libaho_corasick-0840d06bf7d018c8.rlib" "/opt/git/toda/target/release/deps/libstructopt-e64d173ab22c95dc.rlib" "/opt/git/toda/target/release/deps/libclap-90835a115b3387e1.rlib" "/opt/git/toda/target/release/deps/libvec_map-2d78676c713a9ee3.rlib" "/opt/git/toda/target/release/deps/libtextwrap-755e34ab726b0f91.rlib" "/opt/git/toda/target/release/deps/libunicode_width-bd5abf4a259d6279.rlib" "/opt/git/toda/target/release/deps/libstrsim-6d5a124a364f9d7e.rlib" "/opt/git/toda/target/release/deps/libatty-4cf3234ed35012bc.rlib" "/opt/git/toda/target/release/deps/libansi_term-92703ce9775c7a88.rlib" "/opt/git/toda/target/release/deps/libitertools-5335edb49fc6bd8f.rlib" "/opt/git/toda/target/release/deps/libeither-536f2072c5129935.rlib" "/opt/git/toda/target/release/deps/libdynasmrt-4308754e7d1eb82e.rlib" "/opt/git/toda/target/release/deps/libmemmap2-5aa77e9e238f27b9.rlib" "/opt/git/toda/target/release/deps/libretry-62fae79ef0cd0fb1.rlib" "/opt/git/toda/target/release/deps/libprocfs-888c917a8198defe.rlib" "/opt/git/toda/target/release/deps/libchrono-2bff4e592431536b.rlib" "/opt/git/toda/target/release/deps/libnum_integer-2cf4a6d4eeb30820.rlib" "/opt/git/toda/target/release/deps/libnum_traits-74631bd450418d65.rlib" "/opt/git/toda/target/release/deps/libtime-f3a95ecd488e4dc6.rlib" "/opt/git/toda/target/release/deps/liblibflate-c9ddb87cd430ae7d.rlib" "/opt/git/toda/target/release/deps/libcrc32fast-236fdaf2e2aeba7f.rlib" "/opt/git/toda/target/release/deps/libadler32-1ba399486b9ecb87.rlib" "/opt/git/toda/target/release/deps/liblibflate_lz77-87e76f461fa3d987.rlib" "/opt/git/toda/target/release/deps/librle_decode_fast-2e7525ca6ff9c4e0.rlib" "/opt/git/toda/target/release/deps/libhex-a831d4ae6a61be66.rlib" "/opt/git/toda/target/release/deps/libbyteorder-4a519844f0d3f780.rlib" "/opt/git/toda/target/release/deps/libjsonrpc_stdio_server-2455e1f1127c3721.rlib" "/opt/git/toda/target/release/deps/libtokio_util-d1c6195562177150.rlib" "/opt/git/toda/target/release/deps/libjsonrpc_core-cdcfd032490e6b26.rlib" "/opt/git/toda/target/release/deps/libfutures-b3678241cd0b4de1.rlib" "/opt/git/toda/target/release/deps/libfutures_executor-981b0bb2d3077c95.rlib" "/opt/git/toda/target/release/deps/libfutures_util-fbe29466133824c3.rlib" "/opt/git/toda/target/release/deps/libfutures-0870d2d548fb871b.rlib" "/opt/git/toda/target/release/deps/libfutures_io-a139270fe6105208.rlib" "/opt/git/toda/target/release/deps/libfutures_channel-bf4e246d14d79ed2.rlib" "/opt/git/toda/target/release/deps/libfutures_sink-f7eacfdd6ee13846.rlib" "/opt/git/toda/target/release/deps/libfutures_task-d301d762f03ebde1.rlib" "/opt/git/toda/target/release/deps/libpin_utils-4dacbb85e75fde6e.rlib" "/opt/git/toda/target/release/deps/libserde_json-5277c36b30383b6a.rlib" "/opt/git/toda/target/release/deps/libryu-accd83cbc8fcd092.rlib" "/opt/git/toda/target/release/deps/libitoa-f4cfd0c0829422a1.rlib" "/opt/git/toda/target/release/deps/libserde-08b29def9ba99a82.rlib" "/opt/git/toda/target/release/deps/libglob-39912b7c1f5b0a21.rlib" "/opt/git/toda/target/release/deps/libanyhow-45bb56761c03b6b7.rlib" "/opt/git/toda/target/release/deps/librand-c188060cfef72ee3.rlib" "/opt/git/toda/target/release/deps/librand_chacha-76dcbf70a82b280a.rlib" "/opt/git/toda/target/release/deps/libppv_lite86-ac805169e08e00ce.rlib" "/opt/git/toda/target/release/deps/librand_core-1d63bec80922a54f.rlib" "/opt/git/toda/target/release/deps/libgetrandom-6e3df405bbbbece4.rlib" "/opt/git/toda/target/release/deps/libtokio-7d7b0a1a5aa48107.rlib" "/opt/git/toda/target/release/deps/libsignal_hook_registry-e3dd78719222f938.rlib" "/opt/git/toda/target/release/deps/libnum_cpus-f31a78d8ae2ba37b.rlib" "/opt/git/toda/target/release/deps/libmemchr-945cebcb85202f5f.rlib" "/opt/git/toda/target/release/deps/libfnv-ddaa2838570ff888.rlib" "/opt/git/toda/target/release/deps/libmio_uds-09c5fdc0ff01dc5e.rlib" "/opt/git/toda/target/release/deps/libmio-94d21f8a9c4770db.rlib" "/opt/git/toda/target/release/deps/libslab-d6d0d397aa9357a3.rlib" "/opt/git/toda/target/release/deps/libiovec-80567e3971234be3.rlib" "/opt/git/toda/target/release/deps/libnet2-368b5f688d784004.rlib" "/opt/git/toda/target/release/deps/libfutures_core-40b359e24707dc74.rlib" "/opt/git/toda/target/release/deps/libbytes-7fce7ec34255fe92.rlib" "/opt/git/toda/target/release/deps/libpin_project_lite-bbb28bdf6c599b39.rlib" "/opt/git/toda/target/release/deps/libonce_cell-329a22f9834574fb.rlib" "/opt/git/toda/target/release/deps/libthiserror-8f4994e755e94e91.rlib" "/opt/git/toda/target/release/deps/libtracing_futures-8ca3748d29311046.rlib" "/opt/git/toda/target/release/deps/libpin_project-4fa76e451f19e1c9.rlib" "/opt/git/toda/target/release/deps/libtracing-4945ce7b56b275c7.rlib" "/opt/git/toda/target/release/deps/libpin_project_lite-926251b269683272.rlib" "/opt/git/toda/target/release/deps/libtracing_core-522c0597c31f21a5.rlib" "/opt/git/toda/target/release/deps/liblazy_static-e22707b080664b18.rlib" "/opt/git/toda/target/release/deps/libcfg_if-a1f58039845273dd.rlib" "/opt/git/toda/target/release/deps/libfuser-e884132893dbf6a3.rlib" "/opt/git/toda/target/release/deps/liblog-f8fb74c3c3552bd7.rlib" "/opt/git/toda/target/release/deps/libnix-5073d4921cdfca46.rlib" "/opt/git/toda/target/release/deps/libbitflags-f96c3d74a7dfd741.rlib" "/opt/git/toda/target/release/deps/libcfg_if-49a385478277426b.rlib" "/opt/git/toda/target/release/deps/liblibc-2db25b1dcd668e1f.rlib" "-Wl,--start-group" "/root/.rustup/toolchains/nightly-2020-07-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-b6aff3703feff874.rlib" "/root/.rustup/toolchains/nightly-2020-07-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-812457dcc335cb0e.rlib" "/root/.rustup/toolchains/nightly-2020-07-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-d3b70323dc13665e.rlib" "/root/.rustup/toolchains/nightly-2020-07-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-a72ca64738319f23.rlib" "/root/.rustup/toolchains/nightly-2020-07-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace-ae466ecb818a21c7.rlib" "/root/.rustup/toolchains/nightly-2020-07-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace_sys-8965f725fa371d94.rlib" "/root/.rustup/toolchains/nightly-2020-07-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-f5d385bbcf1c0598.rlib" "/root/.rustup/toolchains/nightly-2020-07-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-14d182d411047066.rlib" "/root/.rustup/toolchains/nightly-2020-07-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-45730ad7fe9247a8.rlib" "/root/.rustup/toolchains/nightly-2020-07-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-95ea48ddc44a311b.rlib" "/root/.rustup/toolchains/nightly-2020-07-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-077a7bdb239ba92c.rlib" "/root/.rustup/toolchains/nightly-2020-07-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-68f423c59dc48a40.rlib" "/root/.rustup/toolchains/nightly-2020-07-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-54580c7798bf2225.rlib" "-Wl,--end-group" "/root/.rustup/toolchains/nightly-2020-07-01-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-31151f98ccdb185a.rlib" "-Wl,-Bdynamic" "-lfuse3" "-lpthread" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-ldl" "-lutil"
= note: /usr/bin/ld: cannot find -lfuse3
collect2: error: ld returned 1 exit status

error: aborting due to previous error; 2 warnings emitted

error: could not compile toda.`

@AsterNighT
Copy link
Contributor

AsterNighT commented Apr 15, 2021

I'm not familiar with pkg-config, but refering to this crate, it seems that cargo would require extra config to work with it.

@AsterNighT
Copy link
Contributor

And you may try to specify your lib by LIBRARY_PATH env variable as told in this question. Hope this will work for you.

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

No branches or pull requests

2 participants