Opened 3 years ago

Closed 2 years ago

#62639 closed defect (fixed)

rust 1.51.0 on Mac OS 10.7.5?

Reported by: lemzwerg (Werner Lemberg) Owned by: g5pw (Aljaž Srebrnič)
Priority: Normal Milestone:
Component: ports Version:
Keywords: lion mountainlion mavericks Cc: herbygillot (Herby Gillot), cjones051073 (Chris Jones), kencu (Ken)
Port: rust

Description

According to

https://doc.rust-lang.org/nightly/rustc/platform-support.html

rust is supported on Mac OS 10.7+. However, installation fails on my macOS 10.7.5 box as follows.

> port install rust
--->  Computing dependencies for rust
--->  Fetching archive for rust
--->  Attempting to fetch rust-1.51.0_1.darwin_11.x86_64.tbz2 from http://lil.fr.packages.macports.org/rust
--->  Attempting to fetch rust-1.51.0_1.darwin_11.x86_64.tbz2 from http://mse.uk.packages.macports.org/rust
--->  Attempting to fetch rust-1.51.0_1.darwin_11.x86_64.tbz2 from https://packages.macports.org/rust
--->  Fetching distfiles for rust
Error: rust is only supported on macOS 10.10 or later.
Error: Failed to fetch rust: unsupported platform version

Is there an explanation for this discrepancy? If this is a problem of MacPorts it probably makes sense to change the error message to

Error: rust in MacPorts is only supported on macOS 10.10 or later.

Attachments (1)

main.log (382.6 KB) - added by lemzwerg (Werner Lemberg) 3 years ago.
main.log

Download all attachments as: .zip

Change History (13)

comment:1 Changed 3 years ago by kencu (Ken)

chris changed that recently here <https://github.com/macports/macports-ports/commit/ddc74cfdceaeca5478b08def62df3bcdf11cb87d>. I'm not quite sure why, there's no specific message about it.

I haven't tried it. Feel free to change it back and give 'er a go. If you get success, we'll change it back to 10.7+.

To change it back, do this:

bbedit `port file rust`

-- make the edit and save --

then try your install with

sudo port -v install rust
Version 0, edited 3 years ago by kencu (Ken) (next)

comment:2 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: herbygillot cjones051073 added
Keywords: mountainlion mavericks added
Owner: set to g5pw
Status: newassigned

comment:3 Changed 3 years ago by lemzwerg (Werner Lemberg)

If I undo the limitation to 10.10 and newer, it fails very early with

:info:build make: Entering directory `/opt/local/var/macports/build/_opt_macports_macports-ports_lang_rust/rust/work/rustc-1.51.0-src'
:info:build /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python /opt/local/var/macports/build/_opt_macports_macports-ports_lang_rust/rust/work/rustc-1.51.0-src/src/bootstrap/bootstrap.py build --stage 2 -v -j2
:info:build running: /opt/local/var/macports/build/_opt_macports_macports-ports_lang_rust/rust/work/rustc-1.51.0-src/build/stage0-x86_64/bin/cargo build --manifest-path /opt/local/var/macports/build/_opt_macports_macports-ports_lang_rust/rust/work/rustc-1.51.0-src/src/bootstrap/Cargo.toml --frozen
:info:build error: Unknown option
:info:build Traceback (most recent call last):
:info:build   File "/opt/local/var/macports/build/_opt_macports_macports-ports_lang_rust/rust/work/rustc-1.51.0-src/src/bootstrap/bootstrap.py", line 1140, in <module>
:info:build     main()
:info:build   File "/opt/local/var/macports/build/_opt_macports_macports-ports_lang_rust/rust/work/rustc-1.51.0-src/src/bootstrap/bootstrap.py", line 1123, in main
:info:build     bootstrap(help_triggered)
:info:build   File "/opt/local/var/macports/build/_opt_macports_macports-ports_lang_rust/rust/work/rustc-1.51.0-src/src/bootstrap/bootstrap.py", line 1096, in bootstrap
:info:build     build.build_bootstrap()
:info:build   File "/opt/local/var/macports/build/_opt_macports_macports-ports_lang_rust/rust/work/rustc-1.51.0-src/src/bootstrap/bootstrap.py", line 855, in build_bootstrap
:info:build     run(args, env=env, verbose=self.verbose)
:info:build   File "/opt/local/var/macports/build/_opt_macports_macports-ports_lang_rust/rust/work/rustc-1.51.0-src/src/bootstrap/bootstrap.py", line 153, in run
:info:build     raise RuntimeError(err)
:info:build RuntimeError: failed to run: /opt/local/var/macports/build/_opt_macports_macports-ports_lang_rust/rust/work/rustc-1.51.0-src/build/stage0-x86_64/bin/cargo build --manifest-path /opt/local/var/macports/build/_opt_macports_macports-ports_lang_rust/rust/work/rustc-1.51.0-src/src/bootstrap/Cargo.toml --frozen

Attached is the complete log file; it seems that the system's python 2.7 is used inspite of configuring for python 3.9 from MacPorts.

Last edited 3 years ago by lemzwerg (Werner Lemberg) (previous) (diff)

Changed 3 years ago by lemzwerg (Werner Lemberg)

Attachment: main.log added

main.log

comment:4 Changed 3 years ago by kencu (Ken)

Well that would be why 10.7 was blacklisted, I guess. According to <https://ports.macports.org/port/rust/builds> and <http://packages.macports.org/rust/> rust has not built on < 10.10 in quite a long time.

I suspect upstream is a bit out-of-touch regarding 10.7 support, but you might try to install it yourself, according to their website's recommended "rustup" script, without macports involved at all.

If that works, but MacPorts does not, then I guess we have something to fix. Otherwise they will have to update their rust platform coverage docs, or even better, fix it to work on 10.7!

comment:5 Changed 3 years ago by lemzwerg (Werner Lemberg)

Well, I have to leave this to others, sorry. I'm not interested in Rust, I don't use it, and I don't have enough time to play with it – I only duly reported the issue because I stumbled over the discrepancy.

comment:6 Changed 3 years ago by aeiouaeiouaeiouaeiouaeiouaeiou

I found that support for pre-Yosemite macs was broken in the original source code starting with 1.49.

comment:7 in reply to:  6 Changed 3 years ago by Wowfunhappy (Jonathan)

Replying to aeiouaeiouaeiouaeiouaeiouaeiou:

I found that support for pre-Yosemite macs was broken in the original source code starting with 1.49.

Hmm...

After the release at 1.49, we at conda-forge are seeing some new build failures on macOS builds due to a missing _linkat symbol:

It looks like linkat is included in the legacy-support package, maybe try adding the legacysupport PortGroup?

comment:8 Changed 3 years ago by cjones051073 (Chris Jones)

As others have pointed out, I suspect the upstream rust docs are a bit out of touch with what they actually support these days on macOS.

Adding legacysupport PG was tried, but then removed. See

https://trac.macports.org/ticket/62252

Due to issues with the internal llvm build, which is notoriously picky about such things. This is Ken’s area of expertise though...

Last edited 3 years ago by cjones051073 (Chris Jones) (previous) (diff)

comment:9 Changed 3 years ago by cjones051073 (Chris Jones)

Cc: kencu added

comment:10 Changed 3 years ago by kencu (Ken)

I suspect that with sufficient enthusiasm and a listening ear upstream this is fixable. Whether those features all come together remains to be seen...

comment:11 Changed 2 years ago by catap (Kirill A. Korinsky)

In 349caea49f6bafdd382349c3ac192efde835c761/macports-ports (master):

rust: enable build on macOS 10.9

See: #62639

comment:12 Changed 2 years ago by catap (Kirill A. Korinsky)

Resolution: fixed
Status: assignedclosed

In 8f43fdc08107e2f7fa6527eaae8ba0ea3f35b6c0/macports-ports (master):

rust: fix build on macOS 10.7

This commit contains two fixes.

The first fix runtime fails of bootstrap's cargo:
`
dyld: lazy symbol binding failed: Symbol not found: _CCDigestGetOutputSizeFromRef
`

This symbol is required to verify cargo crates' signature, because cargo
is linked against 10.8, not 10.7.

Details: https://github.com/rust-lang/cargo/issues/4813

The nice overstep is moving to MacPorts's verification of crates by
using cargo.crates which also allows to fetch everything by fetch
stage.

Anyway, this fix need to be used inside crates which => I've added a
small dynamic patch to cargo_fetch PG which prevents from producing
bad binaries. Upstream issue is opened and as soon as fix is introduced,
we may remove this hack.

The second fix for runtime fails is related to dynamic loading of
___muloti4 which is usually a part of System's compiler-rt aka
compiler-binutils. macOS 10.7 is too old and hasn't got _muloti4
function. This fails was introduced by https://github.com/rust-lang/rust/commit/8a6ff90a3a41e6ace18aeb089ea0a0eb3726dd08

Anyway, MacPorts ships macports-libcxx which is linked agains new
LLVM/Clang version of compiler-binutils and which can be used as a donor
for this function.

Here I've created a simple dylib which I've forced to load via
DYLD_INSERT_LIBRARIES which is untouched by rust's build. Anyway, it
also forces to switch to flat name space which seems ok.

Closes: #62639

Note: See TracTickets for help on using tickets.