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

LLVM IR generator definition pass error #317

Open
2 tasks done
ChiHaoLu opened this issue Apr 12, 2024 · 1 comment
Open
2 tasks done

LLVM IR generator definition pass error #317

ChiHaoLu opened this issue Apr 12, 2024 · 1 comment
Labels
compiler Issues specific to compiling

Comments

@ChiHaoLu
Copy link

ChiHaoLu commented Apr 12, 2024

Component

Forge

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

  • Foundry
  • Foundryup

What version of Foundry are you on?

No response

What command(s) is the bug in?

forge build --zksync

Operating System

macOS (Apple Silicon)

Describe the bug

I am building the a project with zkSync-foundry, but I meet a problem returns error when compiling:

$ forge build --zksync
>
[⠒] Compiling...
No files changed, compilation skipped

Error:
Failed to compile with zksolc: Compilation failed with "Contract `contracts/v2/FiatTokenV2.sol:FiatTokenV2` compiling error: 

The contract `contracts/v2/FiatTokenV2.sol:FiatTokenV2` LLVM IR generator definition pass error: 

Library `contracts/util/SignatureChecker.sol:SignatureChecker` not found in the project

The contract `contracts/v2/FiatTokenV2.sol:FiatTokenV2` LLVM IR generator definition pass error: 

Library `contracts/util/SignatureChecker.sol:SignatureChecker` not found in the project\n\n\nStack backtrace:
    0: __ZN4llvm15SmallVectorBaseIyE8grow_podEPvmm
    1: __ZN4llvm15SmallVectorBaseIyE8grow_podEPvmm
    2: __mh_execute_header
    3: __mh_execute_header
    4: __mh_execute_header
    5: __mh_execute_header
    6: __mh_execute_header
    7: __mh_execute_header
    8: __ZN4llvm15SmallVectorBaseIyE8grow_podEPvmm
    9: __mh_execute_header
    10: __mh_execute_header
    11: __mh_execute_header
    12: __mh_execute_header
    13: __mh_execute_header
    14: __mh_execute_header
    15: __mh_execute_header
    16: __ZN4llvm15SmallVectorBaseIyE8grow_podEPvmm
    17: __mh_execute_header
    18: __mh_execute_header
    19: __mh_execute_header
    20: __ZN4llvm15SmallVectorBaseIyE8grow_podEPvmm
    21: __pthread_deallocate\n". 

Using compiler: "/Users/chihaolu/.zksync/zksolc-macosx-arm64-v1.4.0", with args "/Users/chihaolu/Desktop/project/stablecoin-zkSync/contracts/v2/FiatTokenV2.sol" ["--standard-json", "--solc", "/Users/chihaolu/.svm/0.6.12/solc-0.6.12"]

My repo is here, you can use it to reproduce.

I found some similar issues, but I still can't figure out how to solve this problem.

@ChiHaoLu ChiHaoLu added the T-bug label Apr 12, 2024
@dutterbutter dutterbutter added compiler Issues specific to compiling and removed T-bug labels Apr 12, 2024
@dutterbutter
Copy link
Collaborator

Thanks @ChiHaoLu we are in the process of improving compiling so this is very helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler Issues specific to compiling
Projects
None yet
Development

No branches or pull requests

2 participants