Closed mstyura closed 3 years ago
It is impossible to build project dependent on "futures-macro" crate. Build is failed with following error:
"futures-macro"
error: linking with `cc` failed: exit status: 1 | = note: "cc" "-m64" "/rust-alpine-missing-musl-dev/target/release/deps/proc_macro_hack-a43e314ac4e5eefb.proc_macro_hack.9hoig8zk-cgu.0.rcgu.o" "/rust-alpine-missing-musl-dev/target/release/deps/proc_macro_hack-a43e314ac4e5eefb.proc_macro_hack.9hoig8zk-cgu.1.rcgu.o" "/rust-alpine-missing-musl-dev/target/release/deps/proc_macro_hack-a43e314ac4e5eefb.proc_macro_hack.9hoig8zk-cgu.10.rcgu.o" "/rust-alpine-missing-musl-dev/target/release/deps/proc_macro_hack-a43e314ac4e5eefb.proc_macro_hack.9hoig8zk-cgu.11.rcgu.o" "/rust-alpine-missing-musl-dev/target/release/deps/proc_macro_hack-a43e314ac4e5eefb.proc_macro_hack.9hoig8zk-cgu.12.rcgu.o" "/rust-alpine-missing-musl-dev/target/release/deps/proc_macro_hack-a43e314ac4e5eefb.proc_macro_hack.9hoig8zk-cgu.13.rcgu.o" "/rust-alpine-missing-musl-dev/target/release/deps/proc_macro_hack-a43e314ac4e5eefb.proc_macro_hack.9hoig8zk-cgu.14.rcgu.o" "/rust-alpine-missing-musl-dev/target/release/deps/proc_macro_hack-a43e314ac4e5eefb.proc_macro_hack.9hoig8zk-cgu.15.rcgu.o" "/rust-alpine-missing-musl-dev/target/release/deps/proc_macro_hack-a43e314ac4e5eefb.proc_macro_hack.9hoig8zk-cgu.2.rcgu.o" "/rust-alpine-missing-musl-dev/target/release/deps/proc_macro_hack-a43e314ac4e5eefb.proc_macro_hack.9hoig8zk-cgu.3.rcgu.o" "/rust-alpine-missing-musl-dev/target/release/deps/proc_macro_hack-a43e314ac4e5eefb.proc_macro_hack.9hoig8zk-cgu.4.rcgu.o" "/rust-alpine-missing-musl-dev/target/release/deps/proc_macro_hack-a43e314ac4e5eefb.proc_macro_hack.9hoig8zk-cgu.5.rcgu.o" "/rust-alpine-missing-musl-dev/target/release/deps/proc_macro_hack-a43e314ac4e5eefb.proc_macro_hack.9hoig8zk-cgu.6.rcgu.o" "/rust-alpine-missing-musl-dev/target/release/deps/proc_macro_hack-a43e314ac4e5eefb.proc_macro_hack.9hoig8zk-cgu.7.rcgu.o" "/rust-alpine-missing-musl-dev/target/release/deps/proc_macro_hack-a43e314ac4e5eefb.proc_macro_hack.9hoig8zk-cgu.8.rcgu.o" "/rust-alpine-missing-musl-dev/target/release/deps/proc_macro_hack-a43e314ac4e5eefb.proc_macro_hack.9hoig8zk-cgu.9.rcgu.o" "/rust-alpine-missing-musl-dev/target/release/deps/proc_macro_hack-a43e314ac4e5eefb.465ogsi2zbjgsctc.rcgu.o" "/rust-alpine-missing-musl-dev/target/release/deps/proc_macro_hack-a43e314ac4e5eefb.5gidvlqtoyll50yu.rcgu.o" "-Wl,--as-needed" "-L" "/rust-alpine-missing-musl-dev/target/release/deps" "-L" "/usr/local/rustup/toolchains/1.54.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib" "-Wl,-Bstatic" "/usr/local/rustup/toolchains/1.54.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libproc_macro-51ad96f5a373839c.rlib" "-Wl,--start-group" "/usr/local/rustup/toolchains/1.54.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd-3cef741c1f23cd93.rlib" "/usr/local/rustup/toolchains/1.54.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libpanic_unwind-5904caeef8e7aa23.rlib" "/usr/local/rustup/toolchains/1.54.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libminiz_oxide-0f5d37d268b96a61.rlib" "/usr/local/rustup/toolchains/1.54.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libadler-1ff87fa6e88a9656.rlib" "/usr/local/rustup/toolchains/1.54.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libobject-f8edfa7653afcf66.rlib" "/usr/local/rustup/toolchains/1.54.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libaddr2line-6d98eb92dbccf787.rlib" "/usr/local/rustup/toolchains/1.54.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libgimli-decc06f51028e61b.rlib" "/usr/local/rustup/toolchains/1.54.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd_detect-5e6b49cc149a60ba.rlib" "/usr/local/rustup/toolchains/1.54.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_demangle-7a66b3aa9e458fc4.rlib" "/usr/local/rustup/toolchains/1.54.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libhashbrown-21fcab01894b7eab.rlib" "/usr/local/rustup/toolchains/1.54.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_alloc-b976dd002d97b145.rlib" "/tmp/rustcnuL4XU/libunwind-690c23a0bc1a60cd.rlib" "/usr/local/rustup/toolchains/1.54.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libcfg_if-b5c6753552da2f2e.rlib" "/tmp/rustcnuL4XU/liblibc-859ab3522b9428e1.rlib" "/usr/local/rustup/toolchains/1.54.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/liballoc-52e7a767563a753d.rlib" "/usr/local/rustup/toolchains/1.54.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_core-1c16b776a1e56741.rlib" "/usr/local/rustup/toolchains/1.54.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libcore-9190e7d88a759acf.rlib" "-Wl,--end-group" "/usr/local/rustup/toolchains/1.54.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib/libcompiler_builtins-3fa3b1d70121d65d.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/usr/local/rustup/toolchains/1.54.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib" "-o" "/rust-alpine-missing-musl-dev/target/release/deps/libproc_macro_hack-a43e314ac4e5eefb.so" "-Wl,--gc-sections" "-shared" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" = note: /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find crti.o: No such file or directory collect2: error: ld returned 1 exit status error: aborting due to previous error error: could not compile `proc-macro-hack`
Project with reproduce: https://github.com/mstyura/rust-alpine-missing-musl-dev
When musl-dev package is added to docker image the project is built successfully.
musl-dev
Ah, it seems to be duplicate of https://github.com/rust-lang/docker-rust/issues/68 and as I understood absence of musl-dev is intended tradeoff.
It is impossible to build project dependent on
"futures-macro"
crate. Build is failed with following error:Project with reproduce: https://github.com/mstyura/rust-alpine-missing-musl-dev
When
musl-dev
package is added to docker image the project is built successfully.