Opened 6 months ago

Closed 6 months ago

#70003 closed defect (fixed)

py312-maturin @1.5.1 fails to build on Lion and Mountain Lion - Undefined Symbol _getentropy

Reported by: RobK88 Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: lion, mountainlion, mavericks, yosemite Cc: tobypeterson, RobK88, MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: py-maturin rust

Description

py312-maturin @1.5.1 Fails to Build on Lion and Mountain Lion due to an undefined symbol - _getentropy:

:info:build   = note: Undefined symbols for architecture x86_64:
:info:build             "_getentropy", referenced from:
:info:build                 std::sys::pal::unix::rand::imp::fill_bytes::h3a0f33ccdc0c717e in libstd-15cd7ebb35b47ce5.rlib(std-15cd7ebb35b47ce5.std.684eed796d1690a8-cgu.13.rcgu.o)
:info:build           ld: symbol(s) not found for architecture x86_64
:info:build           clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build           
:info:build error: could not compile `serde_derive` (lib) due to 1 previous error
:info:build Caused by:
:info:build   process didn't exit successfully: `/opt/local/bin/rustc --crate-name serde_derive /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-maturin/py312-maturin/work/.home/.cargo/macports/serde_derive-1.0.197/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type proc-macro --emit=dep-info,link -C prefer-dynamic -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="default"' -C metadata=f6d9713300193fef -C extra-filename=-f6d9713300193fef --out-dir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-maturin/py312-maturin/work/maturin-1.5.1/target/release/deps -C linker=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-maturin/py312-maturin/work/compwrap/ld/opt/local/bin/clang-mp-16 -L dependency=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-maturin/py312-maturin/work/maturin-1.5.1/target/release/deps --extern proc_macro2=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-maturin/py312-maturin/work/maturin-1.5.1/target/release/deps/libproc_macro2-26b183f4f3d77336.rlib --extern quote=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-maturin/py312-maturin/work/maturin-1.5.1/target/release/deps/libquote-7b2e59eb91773081.rlib --extern syn=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-maturin/py312-maturin/work/maturin-1.5.1/target/release/deps/libsyn-e04423469cba20de.rlib --extern proc_macro --cap-lints allow` (exit status: 1)
:info:build warning: build failed, waiting for other jobs to finish...
:info:build error: `cargo build --manifest-path Cargo.toml --message-format=json-render-diagnostics --target x86_64-apple-darwin --release -v --no-default-features --locked` failed with code 101
:info:build ERROR Backend subprocess exited when trying to invoke build_wheel
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-maturin/py312-maturin/work/maturin-1.5.1" && /opt/local/Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12 -m build --no-isolation --wheel --outdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-maturin/py312-maturin/work 
:info:build Exit code: 1
:error:build Failed to build py312-maturin: command execution failed
:debug:build Error code: CHILDSTATUS 4876 1
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build     (procedure "portbuild::build_main" line 10)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-maturin/py312-maturin/main.log for details.

Attachments (1)

main.log (284.8 KB) - added by RobK88 6 months ago.
main.log

Download all attachments as: .zip

Change History (7)

Changed 6 months ago by RobK88

Attachment: main.log added

main.log

comment:1 Changed 6 months ago by RobK88

Cc: RobK88 added

comment:2 Changed 6 months ago by RobK88

Would adding legacy-support as a build dependency fix this?

comment:3 Changed 6 months ago by jmroot (Joshua Root)

Cc: MarcusCalhoun-Lopez added
Port: py-maturin rust added; py312-maturin removed

getentropy was added in 10.12. I think the code using it is actually in the rust stdlib?

comment:4 Changed 6 months ago by RobK88

Keywords: mavericks yosemite added

Unfortunately, py-maturin is now a dependency for the glances port. So One can no longer install or upgrade glances on Lion, Mountain Lion, Mavericks and Yosemite.

comment:5 Changed 6 months ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

There is a PR that attempts to fix the problem.

For anyone interested, some improvements were needed to the cargo_fetch PG to build Rust using Rust.
Unfortunately, the changes would have likely broken too many ports using cargo_fetch, so the rust PG was created.
Eventually, it would be nice to remove cargo_fetch PG, but it will likely have to be done port by port.

comment:6 Changed 6 months ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Owner: set to MarcusCalhoun-Lopez
Resolution: fixed
Status: newclosed

In d4b122de16e609147f50027029160ef1a4225eea/macports-ports (master):

py-maturin: use rust PG instead of cargo PG

Fixes #70003

Note: See TracTickets for help on using tickets.