Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#25217 closed defect (invalid)

MacPorts gives error about xcode version but it's already current

Reported by: tom15375@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 1.9.0
Keywords: xcode version Cc: ryandesign (Ryan Carsten Schmidt)
Port:

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I got this error when installing a package but I already have Xcode 3.2.2 installed. How does MacPorts check xcode version and what can I do? Thanks in advance.

$ sudo port install tuxmath
Password:
Error: The installed version of Xcode (3.0) is too old to use on the installed OS version. Version 3.2.2 or later is recommended on Mac OS X 10.6.
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>

Change History (7)

comment:1 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Component: portsbase
Description: modified (diff)

Please remember to use WikiFormatting and to preview before submitting.

MacPorts determines your Xcode version by running "xcodebuild -version" and extracting the displayed Xcode version number. Xcode 3.0 and older did not display the Xcode version number here, so in this case MacPorts falls back to comparing the displayed internal version number of DevToolsCore with a list of known version numbers that correspond to public Xcode version releases. See the macports::setxcodeinfo procedure. What does "xcodebuild -version" say on your system? What happens if you simply install Xcode 3.2.2 again (possibly using the Dev Tools uninstall script first)?

comment:2 Changed 14 years ago by tom15375@…

$ xcodebuild -version
XcodeComponent versions: DevToolsCore-1648.0; DevToolsSupport-1631.0
BuildVersion: 10M2148

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

Please remember to use WikiFormatting and to preview before submitting. You want to be enclosing your lines of literal output in {{{ and }}}.

My output is:

$ xcodebuild -version
Xcode 3.2.2
Component versions: DevToolsCore-1648.0; DevToolsSupport-1631.0
BuildVersion: 10M2148

So, same versions of everything, except that mine shows the Xcode version and yours doesn't. Is it possible your xcodebuild binary is old somehow but the rest of Xcode 3.2.2 is present? Not sure how that would have happened. Does reinstalling Xcode 3.2.2, possibly using the uninstaller first, fix this?

If not, can you show us more info about your xcodebuild binary? Here's some info about mine for comparison:

$ ls -l /usr/bin/xcodebuild
-rwxr-xr-x  2 root  wheel  76192 Feb 24 01:37 /usr/bin/xcodebuild
$ md5 /usr/bin/xcodebuild 
MD5(/usr/bin/xcodebuild)= 7b79168df9b703f369fbe0455147142f
$

comment:4 Changed 14 years ago by tom15375@…

Here is my output. Haven't tried reinstalling yet.

$ ls -l /usr/bin/xcodebuild
-rwxr-xr-x  2 root  wheel  76192 Feb 23 23:37 /usr/bin/xcodebuild
$ md5 /usr/bin/xcodebuild
MD5 (/usr/bin/xcodebuild) = 7b79168df9b703f369fbe0455147142f

comment:5 Changed 14 years ago by jmroot (Joshua Root)

Resolution: invalid
Status: newclosed

You probably left out UNIX Development when you installed 3.2.2. Whatever happened, you don't have a complete install of the right version of Xcode.

comment:6 Changed 14 years ago by jmroot (Joshua Root)

Also check that if you have multiple Xcode installs, you have the right one selected with xcode-select.

comment:7 Changed 14 years ago by tom15375@…

Reinstalling xcode fixed the issue. Thanks a lot for your help.

Note: See TracTickets for help on using tickets.