Opened 4 months ago

Last modified 6 weeks ago

#62995 new defect

restore_ports fails during migration to macOS 11.[34] (Big Sur) with "requested variants do not match" and also complains "macOS 11 SDK does not appear to be installed"

Reported by: MarkCallow (Mark Callow) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc:
Port:

Description

I am migrating my MacPorts installation from macOS Catalina to Big Sur. During restore_ports.tcl I've had several errors like the following:

Error: Requested variants "+python39" do not match those the build was started with: "+python37".
Error: Please use the same variants again, or run 'port clean xorg-libxcb' first to remove the existing partially completed build.
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_xorg-libxcb/xorg-libxcb/main.log for details.

I tried just re-running and doing port clean xorg-libxcb then re-running. There was no change. As only an occasional user of macports, I do not understand "variants" nor how to specify them to the port command.

Also many times during restore_ports.tcl the waarning

Warning: The macOS 11 SDK does not appear to be installed. Ports may not build correctly.
Warning: You can install it as part of the Xcode Command Line Tools package by running `xcode-select --install'.

is printed. I have Xcode 12.5 installed and I do have the command line tools installed. When I run xcode-select --install I get the message

xcode-select: error: command line tools are already installed, use "Software Update" to install updates

Change History (2)

comment:1 in reply to:  description Changed 7 weeks ago by ryandesign (Ryan Schmidt)

Replying to MarkCallow:

I am migrating my MacPorts installation from macOS Catalina to Big Sur. During restore_ports.tcl I've had several errors like the following:

Error: Requested variants "+python39" do not match those the build was started with: "+python37".
Error: Please use the same variants again, or run 'port clean xorg-libxcb' first to remove the existing partially completed build.
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_xorg-libxcb/xorg-libxcb/main.log for details.

I tried just re-running and doing port clean xorg-libxcb then re-running. There was no change. As only an occasional user of macports, I do not understand "variants" nor how to specify them to the port command.

sudo port clean xorg-libxcb should certainly resolve that issue. Please confirm whether you used sudo.

Also many times during restore_ports.tcl the waarning

Warning: The macOS 11 SDK does not appear to be installed. Ports may not build correctly.
Warning: You can install it as part of the Xcode Command Line Tools package by running `xcode-select --install'.

is printed. I have Xcode 12.5 installed and I do have the command line tools installed. When I run xcode-select --install I get the message

xcode-select: error: command line tools are already installed, use "Software Update" to install updates

Try reinstalling the command line tools manually, for example by downloading them from http://developer.apple.com/download/more/?=Command%20Line%20Tools (get the version that matches your Xcode version) or by following ProblemHotlist#reinstall-clt.

comment:2 Changed 6 weeks ago by MarkCallow (Mark Callow)

I tried port clean with sudo and it worked so possibly the original failure was my error. Since 2 months have elapsed, I can't be sure.

I also reinstalled the command line tools manually and restore_ports.tcl worked without problems. However the fact that xcode-select said they are installed shows there is a bug in the code used by the script to check for their presence. Manual installation should not have been necessary.

This whole migration business every time there is a new major macOS release is a huge pain. At the very least the process should be fully automated, e.g. sudo port migrate.

Thanks for your help Ryan.

Note: See TracTickets for help on using tickets.