On anchor cli version 0.18.0 installed using cargo install --git https://github.com/project-serum/anchor anchor-cli --locked
When anchor build is used output is generated in $CARGO_TARGET_DIR/target/deploy/basic_0.so but the anchor deploy looks for it in the current directory.
Using anchor build -- --bpf-out-dir ./target/deploy generates the library inside $PWD/programs/basic-0/target/deploy
unset -int the CARGO_TARGET_DIR makes anchor work as expected.
Also anchor build -- --bpf-out-dir "$PWD/target/deploy" works fine.
On anchor cli version
0.18.0installed usingcargo install --git https://github.com/project-serum/anchor anchor-cli --lockedWhen
anchor buildis used output is generated in$CARGO_TARGET_DIR/target/deploy/basic_0.sobut theanchor deploylooks for it in the current directory.Using
anchor build -- --bpf-out-dir ./target/deploygenerates the library inside$PWD/programs/basic-0/target/deployunset -int the CARGO_TARGET_DIR makes anchor work as expected.
Also
anchor build -- --bpf-out-dir "$PWD/target/deploy"works fine.