Opened 16 months ago

Last modified 6 months ago

#66586 reopened defect

ld64 selects conflicting variant when using migration instructions

Reported by: hopper333 (Michael Hopkins) Owned by: tobypeterson
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: jeremyhu (Jeremy Huddleston Sequoia), cooljeanius (Eric Gallager)
Port: ld64

Description

I have followed the migration instructions exactly I believe, including downloading the ventura base, cleaning old ports out etc. and adding arm64 as build_arch in macports.conf, but this happens when I am running the command line instructions:

mwh@NewAir:~$ xattr -d com.apple.quarantine restore_ports.tcl
xattr: restore_ports.tcl: No such xattr: com.apple.quarantine

mwh@NewAir:~$ sudo ./restore_ports.tcl myports.txt
Warning: Skipping clang-4.0 (not in the ports tree)
Error: ld64: Variant ld64_274 conflicts with ld64_xcode
Error evaluating variants
    while executing
"error "Error evaluating variants""
    (procedure "mportopen" line 63)
    invoked from within
"mportopen $portInfo(porturl) [list subport $portInfo(name)] $variantInfo"
Unable to open port 'ld64': Error evaluating variants
    while executing
"dependenciesForPort $name $variants"
    (procedure "sort_ports" line 57)
    invoked from within
"sort_ports $portList"
    invoked from within
"set operationList [sort_ports $portList]"
    (file "./restore_ports.tcl" line 297)


I have no idea what this means. Please advise!

Michael

Change History (7)

comment:1 Changed 16 months ago by kencu (Ken)

Some of your installed ports are so old that they don't exist any more, and others don't build on a current system or are no longer appropriate for a current system.

If there were salaried engineers working on MacPorts, perhaps the restore script would look for this and fix it up for you, but it's a volunteer project and nobody has fixed up the restore scripts to that degree, so far at least.

If you want to start completely fresh, just look through your list and install the ones you actually want, like octave or whatever, and let them pull in current supporting ports.

If you want some help, you can post up your list here and someone will help you trim off the stuff that is too old to restore, if you prefer that.

comment:2 Changed 16 months ago by jmroot (Joshua Root)

Cc: jeremyhu added
Port: ld64 added
Summary: Macports will not reinstall ports on Ventura using migration instructionsld64 selects conflicting variant when using migration instructions

In this case, the ld64 port is choosing a different default variant on your new system than it did on your old system. There is a bug here in that if the old variant will still work, it shouldn't automatically set a conflicting variant as well, and if the old variant doesn't work on the new system, the port shouldn't be offering that variant at all on that system.

You can probably work around the problem by editing your myports.txt. Find the line with ld64, which should look something like:

ld64 @3_4+ld64_274 (active) requested_variants='+ld64_274' platform='darwin 20' archs='x86_64' date='2022-02-07T14:54:41+1100'

The important part is the requested_variants, don't worry if the other values differ from what I've shown. Delete the +ld64_274 inside the single quotes, i.e. change requested_variants='+ld64_274' to requested_variants=''. Then save the file, run sudo port clean ld64, and you are ready to try again.

comment:3 Changed 16 months ago by kencu (Ken)

Indeed, ld64_274 is wholly inappropriate for your current system.

and there are likely to be others, as well, I suspect.

Last edited 16 months ago by kencu (Ken) (previous) (diff)

comment:4 Changed 16 months ago by hopper333 (Michael Hopkins)

As advised above I have removed all the 'ld64' ports from my ports text file and this mostly worked along with a few other manual removals. Thanks for the advice.

comment:5 Changed 16 months ago by tobypeterson

Owner: set to tobypeterson
Resolution: fixed
Status: newclosed

In 4c8e66e562d2722ac9747d64bc2fa415420d3051/macports-ports (master):

smlnj: update to 110.99.3

Fixes #66586

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

Resolution: fixed
Status: closedreopened

Incorrectly auto-closed

comment:7 Changed 6 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.