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

Linker error when installing wasm-bindgen-cli in container rust:1.72.0-alpine #115450

Open
marvinruder opened this issue Sep 1, 2023 · 6 comments
Labels
A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. O-musl Target: The musl libc T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@marvinruder
Copy link

Code

I tried this code:

docker run --rm -it rust:1.72.0-alpine /bin/sh -c 'apk add pkgconfig musl-dev openssl-dev && cargo install wasm-bindgen-cli'

I expected to see this happen: Installation succeeds.

Instead, this happened: Installation fails with the output

   Compiling wasm-bindgen-cli v0.2.87
error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/bin:/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/bin/self-contained:/usr/local/cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" VSLANG="1033" "cc" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crt1.o" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crti.o" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crtbegin.o" "/tmp/rustcRXRjOo/symbols.o" "/tmp/cargo-installRzq4g6/release/deps/wasm_bindgen_test_runner-4b3c9dfc3f5b6f26.wasm_bindgen_test_runner.1f95379ce0f90ab6-cgu.00.rcgu.o" "/tmp/cargo-installRzq4g6/release/deps/wasm_bindgen_test_runner-4b3c9dfc3f5b6f26.wasm_bindgen_test_runner.1f95379ce0f90ab6-cgu.01.rcgu.o" "/tmp/cargo-installRzq4g6/release/deps/wasm_bindgen_test_runner-4b3c9dfc3f5b6f26.wasm_bindgen_test_runner.1f95379ce0f90ab6-cgu.02.rcgu.o" "/tmp/cargo-installRzq4g6/release/deps/wasm_bindgen_test_runner-4b3c9dfc3f5b6f26.wasm_bindgen_test_runner.1f95379ce0f90ab6-cgu.03.rcgu.o" "/tmp/cargo-installRzq4g6/release/deps/wasm_bindgen_test_runner-4b3c9dfc3f5b6f26.wasm_bindgen_test_runner.1f95379ce0f90ab6-cgu.04.rcgu.o" "/tmp/cargo-installRzq4g6/release/deps/wasm_bindgen_test_runner-4b3c9dfc3f5b6f26.wasm_bindgen_test_runner.1f95379ce0f90ab6-cgu.05.rcgu.o" "/tmp/cargo-installRzq4g6/release/deps/wasm_bindgen_test_runner-4b3c9dfc3f5b6f26.wasm_bindgen_test_runner.1f95379ce0f90ab6-cgu.06.rcgu.o" "/tmp/cargo-installRzq4g6/release/deps/wasm_bindgen_test_runner-4b3c9dfc3f5b6f26.wasm_bindgen_test_runner.1f95379ce0f90ab6-cgu.07.rcgu.o" "/tmp/cargo-installRzq4g6/release/deps/wasm_bindgen_test_runner-4b3c9dfc3f5b6f26.wasm_bindgen_test_runner.1f95379ce0f90ab6-cgu.08.rcgu.o" "/tmp/cargo-installRzq4g6/release/deps/wasm_bindgen_test_runner-4b3c9dfc3f5b6f26.wasm_bindgen_test_runner.1f95379ce0f90ab6-cgu.09.rcgu.o" "/tmp/cargo-installRzq4g6/release/deps/wasm_bindgen_test_runner-4b3c9dfc3f5b6f26.wasm_bindgen_test_runner.1f95379ce0f90ab6-cgu.10.rcgu.o" "/tmp/cargo-installRzq4g6/release/deps/wasm_bindgen_test_runner-4b3c9dfc3f5b6f26.wasm_bindgen_test_runner.1f95379ce0f90ab6-cgu.11.rcgu.o" "/tmp/cargo-installRzq4g6/release/deps/wasm_bindgen_test_runner-4b3c9dfc3f5b6f26.wasm_bindgen_test_runner.1f95379ce0f90ab6-cgu.12.rcgu.o" "/tmp/cargo-installRzq4g6/release/deps/wasm_bindgen_test_runner-4b3c9dfc3f5b6f26.wasm_bindgen_test_runner.1f95379ce0f90ab6-cgu.13.rcgu.o" "/tmp/cargo-installRzq4g6/release/deps/wasm_bindgen_test_runner-4b3c9dfc3f5b6f26.wasm_bindgen_test_runner.1f95379ce0f90ab6-cgu.14.rcgu.o" "/tmp/cargo-installRzq4g6/release/deps/wasm_bindgen_test_runner-4b3c9dfc3f5b6f26.wasm_bindgen_test_runner.1f95379ce0f90ab6-cgu.15.rcgu.o" "/tmp/cargo-installRzq4g6/release/deps/wasm_bindgen_test_runner-4b3c9dfc3f5b6f26.19hh9c3u8vsswt4a.rcgu.o" "-Wl,--as-needed" "-L" "/tmp/cargo-installRzq4g6/release/deps" "-L" "/tmp/cargo-installRzq4g6/release/build/curl-sys-7ceadbee8f5783d1/out/build" "-L" "/tmp/cargo-installRzq4g6/release/build/libz-sys-cffc81748277afdd/out/lib" "-L" "/tmp/cargo-installRzq4g6/release/build/libz-sys-cffc81748277afdd/out/lib" "-L" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib" "-Wl,-Bstatic" "/tmp/cargo-installRzq4g6/release/deps/libenv_logger-fea42c52e1f4f4fe.rlib" "/tmp/cargo-installRzq4g6/release/deps/libatty-317b42473a21e31a.rlib" "/tmp/cargo-installRzq4g6/release/deps/libtermcolor-040fceae4cea271d.rlib" "/tmp/cargo-installRzq4g6/release/deps/libhumantime-626274989ed92745.rlib" "/tmp/cargo-installRzq4g6/release/deps/libregex-5b241dcccf21f933.rlib" "/tmp/cargo-installRzq4g6/release/deps/libregex_automata-9b96befcad88c4ab.rlib" "/tmp/cargo-installRzq4g6/release/deps/libaho_corasick-a16db84b88174926.rlib" "/tmp/cargo-installRzq4g6/release/deps/libregex_syntax-c3cf1ebb7a2b2e4d.rlib" "/tmp/cargo-installRzq4g6/release/deps/librouille-7230a0b8d19e678c.rlib" "/tmp/cargo-installRzq4g6/release/deps/liburl-9aebb6637b71bca7.rlib" "/tmp/cargo-installRzq4g6/release/deps/libidna-fb239a2c2019136b.rlib" "/tmp/cargo-installRzq4g6/release/deps/libunicode_normalization-54755a606192072d.rlib" "/tmp/cargo-installRzq4g6/release/deps/libtinyvec-ee7642b89b653144.rlib" "/tmp/cargo-installRzq4g6/release/deps/libtinyvec_macros-ff6759743fcc69d9.rlib" "/tmp/cargo-installRzq4g6/release/deps/libunicode_bidi-b489247189863188.rlib" "/tmp/cargo-installRzq4g6/release/deps/libform_urlencoded-d2c82d4a8de473ea.rlib" "/tmp/cargo-installRzq4g6/release/deps/libtiny_http-7f8968ed1e1900d6.rlib" "/tmp/cargo-installRzq4g6/release/deps/libhttpdate-a24b706af28e4ef6.rlib" "/tmp/cargo-installRzq4g6/release/deps/libchunked_transfer-3a80b3bee19fa9e4.rlib" "/tmp/cargo-installRzq4g6/release/deps/libascii-8ab85db2098cf98e.rlib" "/tmp/cargo-installRzq4g6/release/deps/libtime-a0293617723fa3a5.rlib" "/tmp/cargo-installRzq4g6/release/deps/libnum_threads-f25b70b3c45705e3.rlib" "/tmp/cargo-installRzq4g6/release/deps/libtime_core-522cb0b5c81b88a6.rlib" "/tmp/cargo-installRzq4g6/release/deps/libderanged-9686717edf50d109.rlib" "/tmp/cargo-installRzq4g6/release/deps/libthreadpool-f94340fa0ccc9a33.rlib" "/tmp/cargo-installRzq4g6/release/deps/libsha1_smol-c6bcc18cced647a7.rlib" "/tmp/cargo-installRzq4g6/release/deps/libpercent_encoding-dc02a4f94527eacf.rlib" "/tmp/cargo-installRzq4g6/release/deps/libmultipart-4e7f890959935153.rlib" "/tmp/cargo-installRzq4g6/release/deps/libtwoway-eacabc130a213c0a.rlib" "/tmp/cargo-installRzq4g6/release/deps/libhttparse-363b5b927f2c1587.rlib" "/tmp/cargo-installRzq4g6/release/deps/libbuf_redux-824514e68d98cc17.rlib" "/tmp/cargo-installRzq4g6/release/deps/libmemchr-19c5176ba959cb53.rlib" "/tmp/cargo-installRzq4g6/release/deps/libquick_error-553f59006e43ec1a.rlib" "/tmp/cargo-installRzq4g6/release/deps/libtempfile-aba4a00682dd1316.rlib" "/tmp/cargo-installRzq4g6/release/deps/libfastrand-fe632f4f74389971.rlib" "/tmp/cargo-installRzq4g6/release/deps/librustix-6d8cc2cc34aee0c8.rlib" "/tmp/cargo-installRzq4g6/release/deps/libbitflags-9e1b87856b5a39a6.rlib" "/tmp/cargo-installRzq4g6/release/deps/liblinux_raw_sys-4e4070322d7688b9.rlib" "/tmp/cargo-installRzq4g6/release/deps/librand-d2835ef6636aeab5.rlib" "/tmp/cargo-installRzq4g6/release/deps/librand_chacha-568bb813c2b47bea.rlib" "/tmp/cargo-installRzq4g6/release/deps/libppv_lite86-2e57afa0faee22ed.rlib" "/tmp/cargo-installRzq4g6/release/deps/librand_core-ed4dececf9a23aad.rlib" "/tmp/cargo-installRzq4g6/release/deps/libgetrandom-776d0166208e26f5.rlib" "/tmp/cargo-installRzq4g6/release/deps/libmime_guess-941a61daa992a772.rlib" "/tmp/cargo-installRzq4g6/release/deps/libunicase-28b314352ad426ab.rlib" "/tmp/cargo-installRzq4g6/release/deps/libmime-0ed1ffe2b41ac203.rlib" "/tmp/cargo-installRzq4g6/release/deps/libfiletime-6291ef5ef8718315.rlib" "/tmp/cargo-installRzq4g6/release/deps/libchrono-a9813c1d649a049d.rlib" "/tmp/cargo-installRzq4g6/release/deps/libnum_traits-ff6319496fc66d8e.rlib" "/tmp/cargo-installRzq4g6/release/deps/libiana_time_zone-06c52e180915fb89.rlib" "/tmp/cargo-installRzq4g6/release/deps/libbase64-04a3869521b53988.rlib" "/tmp/cargo-installRzq4g6/release/deps/libcurl-8401af18d306a517.rlib" "/tmp/cargo-installRzq4g6/release/deps/libopenssl_probe-58309303a9f609bf.rlib" "/tmp/cargo-installRzq4g6/release/deps/libsocket2-0cda5863f22a9f1f.rlib" "/tmp/cargo-installRzq4g6/release/deps/libcurl_sys-6e03aab9f31ac7f3.rlib" "/tmp/cargo-installRzq4g6/release/deps/libopenssl_sys-54ef50242963ee2e.rlib" "-lssl" "-lcrypto" "/tmp/cargo-installRzq4g6/release/deps/liblibz_sys-46141b191bc55227.rlib" "/tmp/cargo-installRzq4g6/release/deps/libwasm_bindgen_cli_support-a8e091096f1105c3.rlib" "/tmp/cargo-installRzq4g6/release/deps/librustc_demangle-413429c0e73a1811.rlib" "/tmp/cargo-installRzq4g6/release/deps/libbase64-927b92a7980a3867.rlib" "/tmp/cargo-installRzq4g6/release/deps/libsafemem-9e20b9d7f5918daf.rlib" "/tmp/cargo-installRzq4g6/release/deps/libbyteorder-193ed6180b511e21.rlib" "/tmp/cargo-installRzq4g6/release/deps/libunicode_ident-facb9160c2b986fb.rlib" "/tmp/cargo-installRzq4g6/release/deps/libserde_json-c6d371e0ba0f1f0e.rlib" "/tmp/cargo-installRzq4g6/release/deps/libryu-fea49a689a77267f.rlib" "/tmp/cargo-installRzq4g6/release/deps/libitoa-5e1876a5b8dc25ab.rlib" "/tmp/cargo-installRzq4g6/release/deps/libserde-af4e742a39923287.rlib" "/tmp/cargo-installRzq4g6/release/deps/libwasm_bindgen_threads_xform-45c90ceea9fd7b2c.rlib" "/tmp/cargo-installRzq4g6/release/deps/libwasm_bindgen_shared-54ca8c389f3a7842.rlib" "/tmp/cargo-installRzq4g6/release/deps/libwasm_bindgen_multi_value_xform-3cfca942b1dc6bce.rlib" "/tmp/cargo-installRzq4g6/release/deps/libwasm_bindgen_externref_xform-459bf5b11f5bb873.rlib" "/tmp/cargo-installRzq4g6/release/deps/libwasm_bindgen_wasm_interpreter-efdf35756ea4e01e.rlib" "/tmp/cargo-installRzq4g6/release/deps/libwasm_bindgen_wasm_conventions-8dbaf6474f2eff56.rlib" "/tmp/cargo-installRzq4g6/release/deps/libwalrus-a2b97ede053e577c.rlib" "/tmp/cargo-installRzq4g6/release/deps/libleb128-6a6c460d8c649db9.rlib" "/tmp/cargo-installRzq4g6/release/deps/libwasmparser-640526087e5dde73.rlib" "/tmp/cargo-installRzq4g6/release/deps/libid_arena-a7382d3e69c3dfcd.rlib" "/tmp/cargo-installRzq4g6/release/deps/librayon-2f3462cb5183030a.rlib" "/tmp/cargo-installRzq4g6/release/deps/librayon_core-bf5017ead308b139.rlib" "/tmp/cargo-installRzq4g6/release/deps/libnum_cpus-6157bee815ca3e6a.rlib" "/tmp/cargo-installRzq4g6/release/deps/liblibc-ec23dbccd24ad4bf.rlib" "/tmp/cargo-installRzq4g6/release/deps/libcrossbeam_deque-226b4a19293a209a.rlib" "/tmp/cargo-installRzq4g6/release/deps/libcrossbeam_epoch-9c91de6b9109ccf8.rlib" "/tmp/cargo-installRzq4g6/release/deps/libmemoffset-106258de5846d349.rlib" "/tmp/cargo-installRzq4g6/release/deps/libscopeguard-5162a022afb43088.rlib" "/tmp/cargo-installRzq4g6/release/deps/libcrossbeam_channel-0c851b46b7673bef.rlib" "/tmp/cargo-installRzq4g6/release/deps/libcrossbeam_utils-2a12eb336abcd97a.rlib" "/tmp/cargo-installRzq4g6/release/deps/libcfg_if-2215ce30b5eeed66.rlib" "/tmp/cargo-installRzq4g6/release/deps/libeither-8725f330bf93e15e.rlib" "/tmp/cargo-installRzq4g6/release/deps/liblog-d17ae8ad17e5c7e1.rlib" "/tmp/cargo-installRzq4g6/release/deps/libanyhow-4c55c4ab3a31f229.rlib" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libstd-2ad8dcade37f4a90.rlib" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libpanic_unwind-979572faa2a17916.rlib" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libobject-93508898bcfc3702.rlib" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libmemchr-ab66446b81463d74.rlib" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libaddr2line-6083b516af549008.rlib" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libgimli-2389476f2626efb6.rlib" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/librustc_demangle-97faebafc321e964.rlib" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libstd_detect-e8ac812a6dab364e.rlib" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libhashbrown-dde0af57b0f2901e.rlib" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/librustc_std_workspace_alloc-8df52c7f042aeffd.rlib" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libminiz_oxide-8789ebd13f9e0a12.rlib" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libadler-cb238a2d7c01ef75.rlib" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libunwind-0ebf8faa9e79b9cc.rlib" "-lunwind" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libcfg_if-73698e09b48b4cfd.rlib" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/liblibc-3f7bca623c41b752.rlib" "-lc" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/liballoc-11ab57860e7dd426.rlib" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/librustc_std_workspace_core-7ffd2525fa6ce213.rlib" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libcore-e91e1df47a197349.rlib" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/libcompiler_builtins-5b084770a5817f4e.rlib" "-Wl,-Bdynamic" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-nostartfiles" "-L" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib" "-L" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained" "-o" "/tmp/cargo-installRzq4g6/release/deps/wasm_bindgen_test_runner-4b3c9dfc3f5b6f26" "-Wl,--gc-sections" "-static" "-no-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crtend.o" "/usr/local/rustup/toolchains/1.72.0-aarch64-unknown-linux-musl/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crtn.o"
  = note: /usr/lib/gcc/aarch64-alpine-linux-musl/12.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: cannot find -lssl: No such file or directory
          /usr/lib/gcc/aarch64-alpine-linux-musl/12.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: cannot find -lcrypto: No such file or directory
          collect2: error: ld returned 1 exit status

Version it worked on

It most recently worked on: rust:1.71.1-alpine

Version with regression

rust:1.72.0-alpine

Additional Context

Despite the linker output, one can check that the container does contain the libssl and libcrypto libraries which are installed by apk in the command provided.

The problem does not arise with Debian-based Rust containers.

This bug is reproducable on both amd64 and arm64 architecture.

@marvinruder marvinruder added C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression. labels Sep 1, 2023
@rustbot rustbot added needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Sep 1, 2023
@dlq84
Copy link

dlq84 commented Sep 3, 2023

I'm getting the same error, works on 1.71 but not 1.72. But for me when I install sea-orm-cli.

@apiraino apiraino added the O-musl Target: The musl libc label Sep 4, 2023
@apiraino
Copy link
Contributor

apiraino commented Sep 4, 2023

I have a feeling this could be related to #115430 (i.e. a regression in cross compiling to musl)

@Noratrieb Noratrieb added E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example A-linkage Area: linking into static, shared libraries and binaries T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Sep 4, 2023
@bjorn3
Copy link
Member

bjorn3 commented Sep 4, 2023

Are you using -Ctarget-features=-crt-static? That disables statically linking libc, which is necessary to allow linking to dynamic libraries like libssl.so and libcrypto.so. As for why it worked before. I'm not sure.

@marvinruder
Copy link
Author

Are you using -Ctarget-features=-crt-static? That disables statically linking libc, which is necessary to allow linking to dynamic libraries like libssl.so and libcrypto.so. As for why it worked before. I'm not sure.

Yes, that solves it for me, thanks! RUSTFLAGS="-Ctarget-feature=-crt-static" cargo install wasm-bindgen-cli does the trick.

@apiraino apiraino removed E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Sep 12, 2023
@jerome-caucat
Copy link

I had a similar problem with the following Dockerfile:

FROM rust:alpine
RUN apk update
RUN apk upgrade
RUN apk add --no-cache pkgconf openssl-dev musl-dev cmake make gcc g++ nodejs perl clang16 curl strace
RUN rustup default nightly-2023-09-06
RUN cargo install wasm-bindgen-cli

My solution was to add the following line after the RUN apk add ...:

ENV OPENSSL_DIR=/usr

@Amanieu
Copy link
Member

Amanieu commented Oct 3, 2023

This is most likely due to #111698: previously rustc would link to dynamic libraries while trying to build a static binary, which led to all sorts of problems, including crashes.

Now we properly only link to static libraries when building a static binary, which is the default for the musl target. To build a dynamic binary which can link to dynamic libraries, you need to use RUSTFLAGS="-Ctarget-feature=-crt-static".

@apiraino apiraino removed the regression-untriaged Untriaged performance or correctness regression. label Oct 23, 2023
EkkoG added a commit to EkkoG/rtabby-web-api that referenced this issue Dec 25, 2023
wiktor-k added a commit to wiktor-k/currencies that referenced this issue Apr 12, 2024
u-kai added a commit to u-kai/free-to-meaningful that referenced this issue Jul 5, 2024
RUSTFLAGSを付けることでコンパイルエラーを回避
以下のissueが情報源rust-lang/rust#115450
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. O-musl Target: The musl libc T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

8 participants