Closed
Description
I followed the tutorial here https://rust-fuzz.github.io/book/cargo-fuzz/tutorial.html The build failed with this
= note: "cc" "-m64" "-L" "/Users/Abhishek/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/Abhishek/src/ipnetwork/fuzz/target/x86_64-apple-darwin/debug/deps/fuzz_target_1-6a5ad7bbfee725a4.3464qd1d22kyq2dc.rcgu.o" "/Users/Abhishek/src/ipnetwork/fuzz/target/x86_64-apple-darwin/debug/deps/fuzz_target_1-6a5ad7bbfee725a4.55bynx9o1u7259a8.rcgu.o" "/Users/Abhishek/src/ipnetwork/fuzz/target/x86_64-apple-darwin/debug/deps/fuzz_target_1-6a5ad7bbfee725a4.77lp28rh20hx0y7.rcgu.o" "-o" "/Users/Abhishek/src/ipnetwork/fuzz/target/x86_64-apple-darwin/debug/deps/fuzz_target_1-6a5ad7bbfee725a4" "/Users/Abhishek/src/ipnetwork/fuzz/target/x86_64-apple-darwin/debug/deps/fuzz_target_1-6a5ad7bbfee725a4.wrjt79l6472o2qj.rcgu.o" "-nodefaultlibs" "-L" "/Users/Abhishek/src/ipnetwork/fuzz/target/x86_64-apple-darwin/debug/deps" "-L" "/Users/Abhishek/src/ipnetwork/fuzz/target/debug/deps" "-L" "/Users/Abhishek/src/ipnetwork/fuzz/target/x86_64-apple-darwin/debug/build/libfuzzer-sys-9363796c86688179/out" "-L" "/Users/Abhishek/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "-Wl,-rpath" "-Xlinker" "/Users/Abhishek/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "-Wl,-force_load" "-Wl,/var/folders/m3/2lg_mptn6w54n1qql_h_g67c0000gs/T/rustcyBbaIe/librustc_asan-bdc601c58a2e51d1.rlib" "/Users/Abhishek/src/ipnetwork/fuzz/target/x86_64-apple-darwin/debug/deps/libipnetwork-90abd8012ec5ce37.rlib" "/Users/Abhishek/src/ipnetwork/fuzz/target/x86_64-apple-darwin/debug/deps/libserde-26be16d130a2c8cd.rlib" "/Users/Abhishek/src/ipnetwork/fuzz/target/x86_64-apple-darwin/debug/deps/liblibfuzzer_sys-580bffd799137f70.rlib" "/Users/Abhishek/src/ipnetwork/fuzz/target/x86_64-apple-darwin/debug/deps/libarbitrary-a78b4ec247e92fdc.rlib" "/Users/Abhishek/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-79c39208a33c9e70.rlib" "/Users/Abhishek/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-c0dcebecdb8e4e83.rlib" "/Users/Abhishek/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-0d3e011ffc07f6a1.rlib" "/Users/Abhishek/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-b8f6b45456cb0df7.rlib" "/Users/Abhishek/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libbacktrace-cdb8474f49e76dc7.rlib" "/Users/Abhishek/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libbacktrace_sys-46aaa6c6a896e403.rlib" "/Users/Abhishek/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-d3b500aecd0ff14a.rlib" "/Users/Abhishek/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libunwind-56edb87d9ec96055.rlib" "/Users/Abhishek/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-eaa1ca179ae8ca90.rlib" "/Users/Abhishek/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liblibc-3b370636605a0018.rlib" "/Users/Abhishek/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc-aac98d4c0b716767.rlib" "/Users/Abhishek/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-0aaaf935f33318ff.rlib" "/Users/Abhishek/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-c131f8e9758169df.rlib" "/Users/Abhishek/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-287a5c6b287e708b.rlib" "-l__rustc__clang_rt.asan_osx_dynamic" "-lc++" "-lSystem" "-lresolv" "-lc" "-lm"
= note: ld: library not found for -l__rustc__clang_rt.asan_osx_dynamic
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: aborting due to previous error
error: could not compile `ipnetwork-fuzz`.
Caused by:
process didn't exit successfully: `rustc --edition=2018 --crate-name fuzz_target_1 fuzz_targets/fuzz_target_1.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=6a5ad7bbfee725a4 -C extra-filename=-6a5ad7bbfee725a4 --out-dir /Users/Abhishek/src/ipnetwork/fuzz/target/x86_64-apple-darwin/debug/deps --target x86_64-apple-darwin -C incremental=/Users/Abhishek/src/ipnetwork/fuzz/target/x86_64-apple-darwin/debug/incremental -L dependency=/Users/Abhishek/src/ipnetwork/fuzz/target/x86_64-apple-darwin/debug/deps -L dependency=/Users/Abhishek/src/ipnetwork/fuzz/target/debug/deps --extern ipnetwork=/Users/Abhishek/src/ipnetwork/fuzz/target/x86_64-apple-darwin/debug/deps/libipnetwork-90abd8012ec5ce37.rlib --extern libfuzzer_sys=/Users/Abhishek/src/ipnetwork/fuzz/target/x86_64-apple-darwin/debug/deps/liblibfuzzer_sys-580bffd799137f70.rlib --cfg fuzzing -Cpasses=sancov -Cllvm-args=-sanitizer-coverage-level=4 -Cllvm-args=-sanitizer-coverage-trace-compares -Cllvm-args=-sanitizer-coverage-inline-8bit-counters -Cllvm-args=-sanitizer-coverage-trace-geps -Cllvm-args=-sanitizer-coverage-prune-blocks=0 -Cllvm-args=-sanitizer-coverage-pc-table -Clink-dead-code -Zsanitizer=address -L native=/Users/Abhishek/src/ipnetwork/fuzz/target/x86_64-apple-darwin/debug/build/libfuzzer-sys-9363796c86688179/out` (exit code: 1)
Error: failed to build fuzz script: "cargo" "build" "--manifest-path" "/Users/Abhishek/src/ipnetwork/fuzz/Cargo.toml" "--verbose" "--target" "x86_64-apple-darwin" "--bin" "fuzz_target_1"
Metadata:
$ cargo fuzz -V
cargo-fuzz 0.6.0
$ rustc --version
rustc 1.41.0-nightly (412f43ac5 2019-11-24)
$ cargo --version
cargo 1.41.0-nightly (8280633db 2019-11-11)
Metadata
Metadata
Assignees
Labels
No labels