Opened 7 years ago

Closed 6 months ago

Last modified 4 months ago

#53909 closed defect (fixed)

port diagnose fails in xcode-select

Reported by: janstary (Jan Starý) Owned by: jmroot (Joshua Root)
Priority: Normal Milestone: MacPorts 2.9.0
Component: base Version: 2.4.99
Keywords: Cc:
Port:

Description

This is MacOS X 10.6.8 running MacPort 2.4.99.

A run of 'port diagnose' eventually fails with

Error: process_cmd failed: Usage: xcode-select -print-path
   or: xcode-select -switch <xcode_folder_path>
   or: xcode-select -version
Arguments:
   -print-path                     Prints the path of the current Xcode folder
   -switch <xcode_folder_path>     Sets the path for the current Xcode folder
   -version                        Prints xcode-select version in

Perhaps the xcode-select syntax has changed beween the versions.

Change History (6)

comment:1 Changed 7 years ago by janstary (Jan Starý)

It's XCode 3.2.6, the latest for 10.6.8.

comment:2 Changed 7 years ago by janstary (Jan Starý)

The problem seems to be in the check_for_clt{} function of diagnose.tcl:

  • if on 10.9, it looks for /Library/Developer/CommandLineTools/
  • otherwise, it tries to call "xcode-select -p"

On MacOSX 10.6.8 with Xcodde 3.2.6, there is no "-p". Changing it to "xcode-select -print-path" fixes that for me here, but probably breaks it for someone else on other versions.

comment:3 Changed 7 years ago by janstary (Jan Starý)

In fact, if the test is done by trying to run xcode-select, wouldn;t it be enoguh to try "xcode-select -version"? Not that I know nything about the various versions of Xcode, but presumably this would work for all?

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

Owner: set to jmroot
Resolution: fixed
Status: newclosed

In 99b91e604816abe5187beb2f8fa8ba46d7fc2c6f/macports-base (master):

port diagnose: fix multiple issues with check_for_clt

OS versions newer than 10.9 also use /Library/Developer/CommandLineTools.
xcode-select --install doesn't work on pre-10.9. There is no
xcode-select on Tiger. Also check for missing CLTs receipt.

Closes: #53909

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

Milestone: MacPorts Future

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

Milestone: MacPorts FutureMacPorts 2.9.0
Note: See TracTickets for help on using tickets.