foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
8.31k stars 1.76k forks source link

Unable to build arm docker image #7925

Closed Thegaram closed 5 months ago

Thegaram commented 6 months ago

Component

Other (please describe)

Have you ensured that all of these are up to date?

What version of Foundry are you on?

4aa17bc86e7a43ca321da26cc049f85849fc9bc7

What command(s) is the bug in?

docker build

Operating System

macOS (Apple Silicon)

Describe the bug

> export TARGETARCH="arm64" && docker build -t foundry-arm-test .

[+] Building 2038.6s (16/21)                                                                                                                                                                                     docker:desktop-linux
 => [internal] load build definition from Dockerfile
...
[build-environment 7/7] RUN --mount=type=cache,target=/root/.cargo/registry --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/opt/foundry/target     source $HOME/.profile && cargo build --release     && mkdir out     && mv target/release/forge out/forge     && mv target/release/cast out/cast     && mv target/release/anvil out/anvil     && mv target/release/chisel out/chisel     && strip out/forge     && strip out/cast     && strip out/chisel     && strip out/anvil;
...
240.5    Compiling foundry-test-utils v0.2.0 (/opt/foundry/crates/test-utils)
1289.2 error: could not compile `forge` (bin "forge")
1289.2 
1289.2 Caused by:
1289.2   process didn't exit successfully: `/root/.rustup/toolchains/stable-aarch64-unknown-linux-musl/bin/rustc --crate-name forge --edition=2021 crates/forge/bin/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C lto=fat -C codegen-units=1 -C debuginfo=line-tables-only --cfg 'feature="default"' --cfg 'feature="rustls"' -C metadata=c7c51034eefefa9a -C extra-filename=-c7c51034eefefa9a --out-dir /opt/foundry/target/release/deps -C strip=debuginfo -L dependency=/opt/foundry/target/release/deps --extern alloy_chains=/opt/foundry/target/release/deps/liballoy_chains-faccafe56e824f1a.rlib --extern alloy_consensus=/opt/foundry/target/release/deps/liballoy_consensus-ac011b443579cbf9.rlib --extern alloy_dyn_abi=/opt/foundry/target/release/deps/liballoy_dyn_abi-3440bd000b5764f3.rlib --extern alloy_json_abi=/opt/foundry/target/release/deps/liballoy_json_abi-695b9acace4aebf9.rlib --extern alloy_network=/opt/foundry/target/release/deps/liballoy_network-4027c76acd79fe07.rlib --extern alloy_primitives=/opt/foundry/target/release/deps/liballoy_primitives-bf79f87e02ebc163.rlib --extern alloy_provider=/opt/foundry/target/release/deps/liballoy_provider-cb4bee83a5886a86.rlib --extern alloy_rpc_types=/opt/foundry/target/release/deps/liballoy_rpc_types-cf16df7e49801463.rlib --extern alloy_signer=/opt/foundry/target/release/deps/liballoy_signer-430a2fb5238c8857.rlib --extern alloy_transport=/opt/foundry/target/release/deps/liballoy_transport-3c5120f09da954c0.rlib --extern async_trait=/opt/foundry/target/release/deps/libasync_trait-f28265394fcdd72b.so --extern axum=/opt/foundry/target/release/deps/libaxum-8b8ecf89cfab6d98.rlib --extern clap=/opt/foundry/target/release/deps/libclap-647142448838ffdf.rlib --extern clap_complete=/opt/foundry/target/release/deps/libclap_complete-8babbafa0dd90984.rlib --extern clap_complete_fig=/opt/foundry/target/release/deps/libclap_complete_fig-ac18b63a66d5be86.rlib --extern comfy_table=/opt/foundry/target/release/deps/libcomfy_table-2dec3019009ac67a.rlib --extern hex=/opt/foundry/target/release/deps/libconst_hex-97c3c2634c4475c8.rlib --extern dialoguer=/opt/foundry/target/release/deps/libdialoguer-0cb6742d050a46c9.rlib --extern dunce=/opt/foundry/target/release/deps/libdunce-1d9f91c1fb39fc9b.rlib --extern ethers_contract_abigen=/opt/foundry/target/release/deps/libethers_contract_abigen-f8495ef84426db60.rlib --extern evm_disassembler=/opt/foundry/target/release/deps/libevm_disassembler-a3f0b45b4c8d1ffc.rlib --extern eyre=/opt/foundry/target/release/deps/libeyre-c30aaa118f3364ba.rlib --extern forge=/opt/foundry/target/release/deps/libforge-ad118075ce34b710.rlib --extern forge_doc=/opt/foundry/target/release/deps/libforge_doc-42d35f7be0623450.rlib --extern forge_fmt=/opt/foundry/target/release/deps/libforge_fmt-9ad34f134c4e92c8.rlib --extern forge_script=/opt/foundry/target/release/deps/libforge_script-e64696845df1f998.rlib --extern forge_verify=/opt/foundry/target/release/deps/libforge_verify-82f1a55d6218414f.rlib --extern foundry_block_explorers=/opt/foundry/target/release/deps/libfoundry_block_explorers-5ac7b3b17c41d0fa.rlib --extern foundry_cli=/opt/foundry/target/release/deps/libfoundry_cli-f6da2d03eb79a600.rlib --extern foundry_common=/opt/foundry/target/release/deps/libfoundry_common-6f62239ece089203.rlib --extern foundry_compilers=/opt/foundry/target/release/deps/libfoundry_compilers-626e2dcfbb9f4d6b.rlib --extern foundry_config=/opt/foundry/target/release/deps/libfoundry_config-0098ae745ea8d9b1.rlib --extern foundry_debugger=/opt/foundry/target/release/deps/libfoundry_debugger-21c9e43517d758db.rlib --extern foundry_evm=/opt/foundry/target/release/deps/libfoundry_evm-e04adc3cd72bbd46.rlib --extern foundry_linking=/opt/foundry/target/release/deps/libfoundry_linking-9ec9d2f322f07328.rlib --extern foundry_wallets=/opt/foundry/target/release/deps/libfoundry_wallets-9376d6a007ac10f7.rlib --extern futures=/opt/foundry/target/release/deps/libfutures-ca9d44518b1f0a9e.rlib --extern humantime_serde=/opt/foundry/target/release/deps/libhumantime_serde-adf7b1a4b28348fa.rlib --extern hyper=/opt/foundry/target/release/deps/libhyper-075b73be220214f0.rlib --extern indicatif=/opt/foundry/target/release/deps/libindicatif-82243f89868bf4e3.rlib --extern itertools=/opt/foundry/target/release/deps/libitertools-0358a7d2108706ee.rlib --extern once_cell=/opt/foundry/target/release/deps/libonce_cell-8f02316305aa10ab.rlib --extern opener=/opt/foundry/target/release/deps/libopener-525a3c8c0a6e9c5b.rlib --extern parking_lot=/opt/foundry/target/release/deps/libparking_lot-4566453f2c6601f0.rlib --extern proptest=/opt/foundry/target/release/deps/libproptest-ab8290d402584b1b.rlib --extern rayon=/opt/foundry/target/release/deps/librayon-f0c8ab237001475c.rlib --extern regex=/opt/foundry/target/release/deps/libregex-964a359198326d5e.rlib --extern reqwest=/opt/foundry/target/release/deps/libreqwest-101d2946ab13b350.rlib --extern revm_inspectors=/opt/foundry/target/release/deps/librevm_inspectors-62397dad17afe426.rlib --extern rustc_hash=/opt/foundry/target/release/deps/librustc_hash-4fdeaa7a041a839a.rlib --extern semver=/opt/foundry/target/release/deps/libsemver-e1a05dbea270f181.rlib --extern serde=/opt/foundry/target/release/deps/libserde-eba0659ad4b992aa.rlib --extern serde_json=/opt/foundry/target/release/deps/libserde_json-b5d9b18fe1080447.rlib --extern similar=/opt/foundry/target/release/deps/libsimilar-09848c0b4e133553.rlib --extern solang_parser=/opt/foundry/target/release/deps/libsolang_parser-fe6ae4cd3dd86287.rlib --extern strum=/opt/foundry/target/release/deps/libstrum-f75d2166e00034eb.rlib --extern thiserror=/opt/foundry/target/release/deps/libthiserror-8de723cf263b5390.rlib --extern tokio=/opt/foundry/target/release/deps/libtokio-2ebfb96a1eb43e02.rlib --extern toml=/opt/foundry/target/release/deps/libtoml-af56d41914466676.rlib --extern toml_edit=/opt/foundry/target/release/deps/libtoml_edit-d81e24733d54e245.rlib --extern tower_http=/opt/foundry/target/release/deps/libtower_http-7bd1fb7f3ef74c88.rlib --extern tracing=/opt/foundry/target/release/deps/libtracing-15b74ee7779ba12f.rlib --extern watchexec=/opt/foundry/target/release/deps/libwatchexec-9cf133bd98514b76.rlib --extern yansi=/opt/foundry/target/release/deps/libyansi-dc5797a694f9d151.rlib -L native=/opt/foundry/target/release/build/c-kzg-02baa84268e2e4c1/out -L native=/opt/foundry/target/release/build/blst-22de00f1c346c030/out -L native=/opt/foundry/target/release/build/ring-7e09df6a58f04282/out -L native=/opt/foundry/target/release/build/hidapi-rusb-7f35706e389cc787/out -L native=/opt/foundry/target/release/build/libusb1-sys-dc7f9d5fca2de4f4/out` (signal: 9, SIGKILL: kill)
1289.2 warning: build failed, waiting for other jobs to finish...
------
Dockerfile:18
--------------------
  17 |     
  18 | >>> RUN --mount=type=cache,target=/root/.cargo/registry --mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/opt/foundry/target \
  19 | >>>     source $HOME/.profile && cargo build --release \
  20 | >>>     && mkdir out \
  21 | >>>     && mv target/release/forge out/forge \
  22 | >>>     && mv target/release/cast out/cast \
  23 | >>>     && mv target/release/anvil out/anvil \
  24 | >>>     && mv target/release/chisel out/chisel \
  25 | >>>     && strip out/forge \
  26 | >>>     && strip out/cast \
  27 | >>>     && strip out/chisel \
  28 | >>>     && strip out/anvil;
  29 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c source $HOME/.profile && cargo build --release     && mkdir out     && mv target/release/forge out/forge     && mv target/release/cast out/cast     && mv target/release/anvil out/anvil     && mv target/release/chisel out/chisel     && strip out/forge     && strip out/cast     && strip out/chisel     && strip out/anvil;" did not complete successfully: exit code: 101

Full log output: https://gist.github.com/Thegaram/ac5bb224d672c04215d646734c6ca127

KhaledHosseini commented 6 months ago

The same problem here. I use Windows 10.