Closed mihneacalugaru closed 1 year ago
Have you modified your Cargo.lock
?
@dr497 , no.
The following screenshot will show the steps to reproduce since cloning the repo:
@mihneacalugaru Can you try and cd into the program
directory before running cargo build-bpf
? My suspicion is that it's looking for a Cargo.lock in your current directory, and tries to build it itself.
Hi @ellttBen,
Tried with no luck:
Hey @mihneacalugaru, do you also get this issue on the alpha
branch?
@ellttBen, I have a quick question: you said here (https://github.com/Bonfida/dex-v4/issues/98#issuecomment-1387694661) that you have deployed the program.
I assume you built the program
with cargo build-bpf
, got the .so file and deployed it using solana program deploy
with the path to that .so. Is this right?
How did you manage to make it build? Am I missing something? Can you help me with the steps to build this program and deploy it? I would appreciate a lot!
At the time I just ran cargo build-bpf
in the program
folder and didn't run into any issue.
Currently the main branch is broken, probably due to a dependency update in a past commit (we tested the bindings but not building the program itself, ie the bpf target). This issue is currently fixed in the alpha
branch.
However, even on the main branch, I can't reproduce the error you're seeing. What is really confusing to me is that your error indicates that cargo is attempting to resolve the dependency versions itself instead of using the existing Cargo.lock
.
Can you try switching to the alpha
branch and then, in the program
folder, running cargo build-bpf
without any arguments? If this fails can you try cargo build-bpf --frozen
?
Also, your screenshot indicates that you are running a pretty old version of the Solana tool suite, an upgrade might be a good step forward towards solving the issue
@ellttBen, ok, so I did the following: (also, note that I am on a Windows machine)
I am at 1.15.2
.
Also, these are my rustc
and rustup
versions, also updated:
cargo-build-bpf
in the alpha
branch and now I get:
cargo-build-**sbf**
, which is supposed to replace the deprecated cargo-build-bpf
I get:So, still that issue with blake3 v1.3.3
, but also those other 2 errors above it.
cargo build-bpf
(the version without the -
between cargo
and build
)I am only able to run the version with dashes all around (cargo-build-bpf
or cargo-build-sbf
), which I believe gets actually called by cargo build-bpf/sbf
that I can't access.
I uninstalled rust and installed it again and I also brought the Solana Tool Suite to the latest version.
Any ideas? :(
From what I can gather it seems your dev/build environment is completely broken. There are a few possible issues here, but ultimately I think you're just going have to tinker. I personally don't have any experience making the toolchain work with Windows, so it might be easier to switch to a Linux vm. A couple ideas to look into in the mean time :
rustup default 1.66.1
)dex-v4
@ellttBen, I ran it on my WSL (Windows Subsystem for Linux) with a clean environment and it worked.
Might be something with my Windows environment. It seems that it tries to use the Visual Studio installed MASM to target the x64 code and that one doesn't execute successfully.
Anyway, it works on a clean Linux env. Will close it.
Thanks!
Hello,
I am trying to produce a .so file that can be deployed on the devnet in order for me to experiment with the code.
Reading the documentation, I understood that I should use the
cargo build-bpf
to produce the .so file by giving as parameters the path to the .toml file (the manifest path) and an output directory for the result.After some tries, I am getting this:
Can you help me figure out why I get this?
Also, if you can walk me through the steps to produce a .so deployable from the
program
in this repo I would greatly appreciate it!Thanks a lot!
L.E.: After a cargo update in
program
I get: