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

Freebsd 13.2 ./install.sh failure #349

Open
SweetAndLow opened this issue Dec 16, 2023 · 7 comments
Open

Freebsd 13.2 ./install.sh failure #349

SweetAndLow opened this issue Dec 16, 2023 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@SweetAndLow
Copy link

Cloned the latest chia as of yesterday into my jail on freebsd 13.2, created my virtual environment and executed the bash ./install.sh script. Got this error. I did a little poking around to see if i could just install via pip or build manually but didn't have any luck,

`Collecting chia-rs==0.2.13 (from chia-blockchain==2.1.2)
Using cached chia_rs-0.2.13.tar.gz (299 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
💥 maturin failed
Caused by: Cargo metadata failed. Does your crate compile with cargo build?
Caused by: cargo metadata exited with an error: error: failed to load manifest for workspace member /tmp/pip-install-r8vvmcgg/chia-rs_93784bac3d044b36b6413a2c3ed8292d/chia-bls/fuzz

  Caused by:
    failed to read `/tmp/pip-install-r8vvmcgg/chia-rs_93784bac3d044b36b6413a2c3ed8292d/chia-bls/fuzz/Cargo.toml`

  Caused by:
    No such file or directory (os error 2)
  Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/tmp/pip-modern-metadata-tz7m0cpv', '--interpreter', '/root/chia-2.1.0/chia-blockchain/venv/bin/python']' returned non-zero exit status 1.
  Checking for Rust toolchain....
  Running `maturin pep517 write-dist-info --metadata-directory /tmp/pip-modern-metadata-tz7m0cpv --interpreter /root/chia-2.1.0/chia-blockchain/venv/bin/python`
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.`

@hoffmang9
Copy link
Member

hoffmang9 commented Dec 17, 2023

I've tried the basics on 13.2 including replication.

I can also build the crate in the root dir of chia_rs and pip install . in the wheel/ dir and that all works.

Not sure why it is choking on the bls fuzzer.

Others can look at it during the week.

@hoffmang9
Copy link
Member

Doing a little more troubleshooting with @Rigidity -

both cargo and rustc are versions 1.7.2.

pip install . from the wheel directory builds fine both for main and the 0.2.13 tag.

Full error log attached below - I think it's safe to ignore the earlier sql version checking errors.
error.txt

@Rigidity
Copy link
Contributor

Alright, I think the issue has been identified - We have prebuilt wheels for various platforms on PyPI, but FreeBSD is not one of them:

https://pypi.org/project/chia-rs/0.2.13/#files

Since there is no prebuilt wheel for FreeBSD, it tries to compile it from source. Which would be fine, except that the fuzz directories for each crate are missing. Will work on a fix so that this can hopefully be resolved in a future Chia version.

@Rigidity Rigidity added the bug Something isn't working label Dec 17, 2023
@Rigidity Rigidity self-assigned this Dec 17, 2023
@hoffmang9
Copy link
Member

This can be worked around on BSD by making your own wheel from the chia_rs repository. If you git clone and then cd into the wheel directory while in the chia-blockchain venv - you can pip install . and you'll get chia_rs installed. Then re-run install.sh and you should complete the install for now.

@SweetAndLow
Copy link
Author

@hoffmang9 thanks before your comment I tried but didn't realize I need to be in the wheel directory. Built and installed chia_rs 0.2.13 successfully. clvm_tools_rs didn't seem to be in pypi so I built and installed that also and now have chia 2.1.3 up and running. I'll update my install steps and probably continue to be a bother for freebsd support ;)

@hoffmang9
Copy link
Member

We will also fix this as it's a general problem for anyone who is trying to build without a binary wheel.

@ChristopherP1221
Copy link

ChristopherP1221 commented May 9, 2024

For others coming along behind me that might be running into this. I am trying to upgrade Chia in a Truenas 13.2 jail and was running into errors with clvm_rs failing during the install.sh execution. I tried the suggestions of git clone on the clvm_rs and clvm_tools_rs repos. Unfortunately, I was not paying attention to the version numbers and took the "latest" for both of those packages. The install.sh dependencies are looking specifically for

clvm_rs=0.6.1
clvm_tools_rs=0.1.40

So, from within your /chia-blockchain folder and with your venv activated, you'd do

git clone http://github.com/Chia-Network/clvm_rs.git --branch 0.6.1
git clone http://github.com/Chia-Network/clvm_tools_rs.git --branch 0.1.40

Not sure if this is necessary or not but I did anyway, build the wheel with maturin.

cd clvm_rs/
maturin build -m Cargo.toml 
cd wheel 
maturin build -m Cargo.toml
#this will create a wheel file, pip install it to the get correct version
pip install <path to your created wheel file>

Repeat the same steps for clvm_tools_rs and reattempt your install command again. Make sure you're in your venv and it should work.

cd /chia-blockchain
bash install.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants