Question1:
anchor build
got error: Stack offset of 4608 exceeded max offset of 4096 ...
if let solana v1.18.10 present in ENV/PATH
❱❱❱ 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: ...
(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
...
but anchor build
build output .so file without error if let v1.16.25 solana present in ENV/PATH.
(events) ❱❱❱ solana --version
solana-cli 1.16.25 (src:8dd7d060; feat:2294205250, client:SolanaLabs)
(events) ❱❱❱ anchor build
info: uninstalling toolchain 'solana'
...
Need to mention that, in both case, my anchor cli version is 0.29.0
(events) ❱❱❱ anchor --version
anchor-cli 0.29.0
(events) ❱❱❱ which anchor
/home/ubuntu/.cargo/bin/anchor
(events) ❱❱❱
Question2: This is my first time notice the build log "uninstalling toolchain 'solana' ", what does it mean? does anchor build action remove old solana and installed it's own solana ? I doubt. but this log message puzzled me.
(events) ❱❱❱ anchor build
info: uninstalling toolchain 'solana'
info: toolchain 'solana' uninstalled