Summary: | lang/rust: Fails to build when Python (lang/python37) environment has no lzma module | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | doctor | ||||||||||
Component: | Individual Port(s) | Assignee: | FreeBSD Rust Team <rust> | ||||||||||
Status: | Closed FIXED | ||||||||||||
Severity: | Affects Some People | CC: | python, rust | ||||||||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(rust) |
||||||||||
Version: | Latest | ||||||||||||
Hardware: | amd64 | ||||||||||||
OS: | Any | ||||||||||||
Attachments: |
|
I cannot reproduce and builds fine on the cluster too: http://gohan03.nyi.freebsd.org/data/head-amd64-default-baseline/p524661_s357313/logs/rust-1.41.0.log http://package21.nyi.freebsd.org/data/113amd64-default-qat/524661/logs/rust-1.41.0.log http://package20.nyi.freebsd.org/data/113i386-default-baseline/524661/logs/rust-1.41.0.log > this should show you the failure Log is not helpful with all the interesting bits missing. What exactly happened in fetch and patch that causes it to attempt to download things from static.rust-lang.org during the build phase? Please post the *full* output of the following commands: cat /etc/make.conf env make -V DISTFILES -V MASTER_SITES make clean patch Created attachment 211230 [details]
this should show you the failure
as requested
I see now that it picks tar.gz as bootstrap extension on your system. This basically should not happen. What happens when you run python3.7 -c 'import tarfile; tarfile.open("/tmp/foo", "w:xz")' Created attachment 211238 [details]
as requested
attached
Comment on attachment 211238 [details] as requested > ImportError: /usr/contrib/lib/python3.7/lib-dynload/_lzma.so: invalid file format So the real problem has little to do with lang/rust and your python37 installation seems to be broken. Please reinstall it and once the command I gave you in comment #3 is successful, i.e., returns nothing instead of an exception, reattempt to build lang/rust. Created attachment 211293 [details]
And an issue in Ython pooped up
> *** WARNING: renaming "_lzma" since importing it failed: build/lib.freebsd-12.1-RELEASE-p2-amd64-3.7-pydebug/_lzma.so: Undefined symbol "lzma_check_is_supported"
I'm reassigning this to the Python team since the problem is not really
in lang/rust and I cannot help you with Python problems.
*** Bug 243817 has been marked as a duplicate of this bug. *** (In reply to Tobias Kortkamp from comment #7) Is there any way to force rust to use / explicitly specify a particular format/extension (since it seems we want a specific format?), bypassing the fallback mechanism in the event lzma is not available in the Python environment? Further, while having an lzma module is certainly common, it is by no means certain that this module is available, either in terms of the system environment the Python installation is built on, or whether the environment has been modified intentionally to preclude certain common.shared libraries, of which lzma is one. Going to work on this separately in bug 243817 A commit references this bug: Author: tobik Date: Tue Apr 28 04:33:36 UTC 2020 New revision: 533234 URL: https://svnweb.freebsd.org/changeset/ports/533234 Log: lang/rust: Let the framework extract the bootstraps It is possible for lang/python37 to be built in such a way that it installs an unloadable lzma module which then causes Rust to fallback to trying to fetch/extract the tar.gz bootstraps instead. As a workaround and since it also simplifies some things, let the ports framework extract the bootstraps and "install" them under WRKDIR. We point the build to them in config.toml. This is similar to how things are hooked up in lang/rust-bootstrap and Rust will then not try to fetch and extract the bootstraps on its own. PR: 243766 Reviewed by: mikael Differential Revision: https://reviews.freebsd.org/D24582 Changes: head/lang/rust/Makefile |
Created attachment 211227 [details] this should show you the failure Getting