foundry-zksync: forge build fails with `Broken pipe`
Component
Forge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
What version of Foundry are you on?
forge 0.0.2 (6e1c282 2024-07-02T00:22:29.208951000Z)
What command(s) is the bug in?
forge build --zksync
Operating System
macOS (Intel)
Describe the bug
I got an error while compiling my contract using foundry cli with --zksync. Below is the error I got:
mpjc@mjpc-iMac simple-storage % forge build --zk-startup
[⠰] Compiling (zksync)...
Error:
Broken pipe (os error 32)
It did build without zksync flag though. I searched a bit in foundry git on this matter and still there are pending tickets with that like this one: https://github.com/foundry-rs/foundry/issues/4668
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 16 (6 by maintainers)
Got a similar issue when running
forge build --zksync, forcing foundry to use some fixed solidity version instead of the latest was a workaround on my side (pragma solidity 0.8.25;instead ofpragma solidity ^0.8.13:)Hey @Karrq , thanks for the guidance! I followed your advice, set zksolc to 1.5.5 in the config, and it worked perfectly. Appreciate the help!
It’s work by setting the contract and contract to a static compiler (pragma solidity 0.8.7) instead of (pragma solidity ^0.8.7).
