example-helloworld icon indicating copy to clipboard operation
example-helloworld copied to clipboard

Unable to perform cargo test in program-rust directory

Open calldata opened this issue 2 years ago • 5 comments

When i execute cargo test on my machine (MacOS Apple cpu), i encounter this error:

error: expected None-delimited group
   --> /Users/oker/.cargo/registry/src/github.com-1ecc6299db9ec823/solana-program-test-1.8.14/src/lib.rs:769:22
    |
769 |         add_builtin!(solana_bpf_loader_deprecated_program!());
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `solana_bpf_loader_deprecated_program` (in Nightly builds, run with -Z macro-backtrace for more info)

error: expected None-delimited group
   --> /Users/oker/.cargo/registry/src/github.com-1ecc6299db9ec823/solana-program-test-1.8.14/src/lib.rs:771:26
    |
771 |             add_builtin!(solana_bpf_loader_program_with_jit!());
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `solana_bpf_loader_program_with_jit` (in Nightly builds, run with -Z macro-backtrace for more info)

error: expected None-delimited group
   --> /Users/oker/.cargo/registry/src/github.com-1ecc6299db9ec823/solana-program-test-1.8.14/src/lib.rs:772:26
    |
772 |             add_builtin!(solana_bpf_loader_upgradeable_program_with_jit!());
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `solana_bpf_loader_upgradeable_program_with_jit` (in Nightly builds, run with -Z macro-backtrace for more info)

error: expected None-delimited group
   --> /Users/oker/.cargo/registry/src/github.com-1ecc6299db9ec823/solana-program-test-1.8.14/src/lib.rs:774:26
    |
774 |             add_builtin!(solana_bpf_loader_program!());
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `solana_bpf_loader_program` (in Nightly builds, run with -Z macro-backtrace for more info)

error: expected None-delimited group
   --> /Users/oker/.cargo/registry/src/github.com-1ecc6299db9ec823/solana-program-test-1.8.14/src/lib.rs:775:26
    |
775 |             add_builtin!(solana_bpf_loader_upgradeable_program!());
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `solana_bpf_loader_upgradeable_program` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `solana-program-test` due to 15 previous errors

calldata avatar Apr 11 '22 03:04 calldata

This seems to happen only on nightly since switching from nightly to stable fixes the problem for me

mbenoukaiss avatar Apr 19 '22 19:04 mbenoukaiss

It works after shiftting to stable.

calldata avatar Apr 20 '22 03:04 calldata

It doesn't work even in stable. It need to override to 1.59 v.

PraetorP avatar Jun 07 '22 05:06 PraetorP

rustup install 1.59
rustup default 1.59

baijifeilong avatar Jun 08 '22 09:06 baijifeilong

Not sure but maybe this might help,

wget https://packages.ubuntu.com/focal/amd64/libssl1.1/download sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.18_amd64.deb

itayLev1 avatar May 23 '23 08:05 itayLev1