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.26k stars 1.74k forks source link

bug(releases): forge can't build and run on MacOS under specific conditions #8136

Closed crypto-yus closed 6 days ago

crypto-yus commented 4 months ago

Component

Forge, Cast, Anvil, Chisel

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

What version of Foundry are you on?

can't run it

What command(s) is the bug in?

forge init

Operating System

macOS (Intel)

Describe the bug

build from source

$ cargo install --git https://github.com/foundry-rs/foundry --profile local --locked forge cast chisel anvil

$ /Users/yus/.cargo/bin/forge
dyld[4184]: weak-def symbol not found '__ZnwmSt19__type_descriptor_t'weak-def symbol not found '__ZnamSt19__type_descriptor_t'
[1]    4184 abort      /Users/yus/.cargo/bin/forge

Then try to using-foundryup

$ curl -L https://foundry.paradigm.xyz | bash
$ foundryup
.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx

 ╔═╗ ╔═╗ ╦ ╦ ╔╗╔ ╔╦╗ ╦═╗ ╦ ╦         Portable and modular toolkit
 ╠╣  ║ ║ ║ ║ ║║║  ║║ ╠╦╝ ╚╦╝    for Ethereum Application Development
 ╚   ╚═╝ ╚═╝ ╝╚╝ ═╩╝ ╩╚═  ╩                 written in Rust.

.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx

Repo       : https://github.com/foundry-rs/
Book       : https://book.getfoundry.sh/
Chat       : https://t.me/foundry_rs/
Support    : https://t.me/foundry_support/
Contribute : https://github.com/orgs/foundry-rs/projects/2/

.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx

foundryup: installing foundry (version nightly, tag nightly)
foundryup: downloading latest forge, cast, anvil, and chisel
####################################################################################################################################################################################################################################### 100.0%
foundryup: downloading manpages
####################################################################################################################################################################################################################################### 100.0%
foundryup: installed - forge 0.2.0 (462b2ac 2024-06-12T00:18:22.238563000Z)
foundryup: warning:
There are multiple binaries with the name 'forge' present in your 'PATH'.
This may be the result of installing 'forge' using another method,
like Cargo or other package managers.
You may need to run 'rm /Users/yus/.cargo/bin/forge' or move '/Users/yus/.foundry/bin'
in your 'PATH' to allow the newly installed version to take precedence!

foundryup: installed - cast 0.2.0 (462b2ac 2024-06-12T00:18:22.321580000Z)
foundryup: installed - anvil 0.2.0 (462b2ac 2024-06-12T00:18:22.095885000Z)
foundryup: installed - chisel 0.2.0 (462b2ac 2024-06-12T00:18:22.207899000Z)
foundryup: done!
$ /Users/yus/.foundry/bin/forge init
[1]    16000 killed     /Users/yus/.foundry/bin/forge init
DaniPopes commented 4 months ago

what macOS version are you on?

crypto-yus commented 4 months ago

sonoma 14.4.1 & 14.5

miketamis commented 4 months ago

Have you tried to use foundaryUp after deleting the failed binary from your attempt to build from source?

""" There are multiple binaries with the name 'forge' present in your 'PATH'. This may be the result of installing 'forge' using another method, like Cargo or other package managers. You may need to run 'rm /Users/yus/.cargo/bin/forge' or move '/Users/yus/.foundry/bin' in your 'PATH' to allow the newly installed version to take precedence! """

zerosnacks commented 6 days ago

Hi @crypto-yus thanks for reporting

As stated by @miketamis, I would recommend removing the binaries and re-installing (either from source or foundryup).

We are unable to reproduce the issue.

If you are still able to reproduce it please re-open the issue with additional details.

Thanks!