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

build error: Stack offset of 4608 exceeded max offset of 4096 with v1.18.10 #35551

Closed
code-brewer opened this issue May 10, 2024 · 1 comment
Closed
Labels
community Community contribution

Comments

@code-brewer
Copy link

building example project: https://github.com/coral-xyz/anchor/tree/14309ea14639b8042055e1b432bd6be24434970f/tests/events

if let solana v1.18.10 present in ENV/PATH, and anchor build got error: Stack offset of 4608 exceeded max offset of 4096 ...
 ❱❱❱ which solana
/mnt/volume2/solana_dev_env/v1.18.10/solana-release/bin/solana
 ❱❱❱  echo $PATH         
/mnt/volume2/solana_dev_env/v1.18.10/solana-release/bin:/home/ubuntu/.cargo/bin:/usr/local/sbin: ...
 ❱❱❱ /mnt/volume2/solana_dev_env/v1.18.10/solana-release/bin/solana --version
solana-cli 1.18.10 (src:50b3f337; feat:3469865029, client:SolanaLabs)
(events) ❱❱❱ anchor build                                                   
info: uninstalling toolchain 'solana'
info: toolchain 'solana' uninstalled
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
   Compiling proc-macro2 v1.0.79

...

   Compiling anchor-attribute-program v0.28.0
   Compiling anchor-attribute-error v0.28.0
   Compiling anchor-derive-space v0.28.0
   Compiling base64 v0.13.1
Error: Function _ZN112_$LT$solana_program..instruction..InstructionError$u20$as$u20$solana_frozen_abi..abi_example..AbiEnumVisitor$GT$13visit_for_abi17hd196cb48ec8b8db8E Stack offset of 4608 exceeded max offset of 4096 by 512 bytes, please minimize large stack variables
Error: Function _ZN108_$LT$solana_program..vote..state..CircBuf$LT$I$GT$$u20$as$u20$solana_frozen_abi..abi_example..AbiExample$GT$7example17h4b696142e261c9f4E Stack offset of 4640 exceeded max offset of 4096 by 544 bytes, please minimize large stack variables
   Compiling anchor-lang v0.28.0
			...

Note: this solana was download from: wget https://github.com/anza-xyz/platform-tools/releases/download/v1.41/platform-tools-linux-x86_64.tar.bz2

while let old version solana present in ENV/PATH, anchor build build output so without error.
(events) ❱❱❱  solana --version
solana-cli 1.16.25 (src:8dd7d060; feat:2294205250, client:SolanaLabs)
(events) ❱❱❱ anchor build  # build successfully
info: uninstalling toolchain 'solana'
			...
			
@code-brewer code-brewer added the community Community contribution label May 10, 2024
Copy link
Contributor

This repository is no longer in use. Please re-open this issue in the agave repo: https://github.com/anza-xyz/agave

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution
Projects
None yet
Development

No branches or pull requests

1 participant