Error: No valid Xcode installation is properly selected.
Clemens Lang
cal at macports.org
Tue Aug 28 12:30:08 PDT 2012
Hi,
On Tue, Aug 28, 2012 at 07:14:10PM +0200, Luc Bourhis wrote:
> "install" or "upgrade" prints
> {{{
> Error:
> Error: No valid Xcode installation is properly selected.
> Error: Please use xcode-select to select an Xcode installation:
> Error: sudo xcode-select -switch /Applications/Xcode.app # version
> 4.4.1
> Error:
> }}}
> even after issuing that very xcode-select command. Then "port" seem to
> carry on with its business in a successful manner. I am aware of
> #35150 and of the fix that went into 2.1.2 but that is precisely the
> version I run.
the code that prints this is at
http://trac.macports.org/browser/trunk/base/src/macports1.0/macports.tcl#L424
Following the code path to this message tells me
- you have xcode-select installed
- xcode-select -print-path either fails or the return value doesn't
satisfy _is_valid_developer_dir
- the following code correctly finds your Xcode installation, correctly
determines its version to be 4.4.1 by querying kMDItemVersion using
mdls
- it then tests, whether /Applications/Xcode.app/Contents/Developer is
a valid developer dir (and it apparently isn't, because it doesn't
print /Applications/Xcode.app/Contents/Developer but
/Applications/Xcode.app, which is the next elseif in the code).
Looking at _is_valid_developer_dir at
http://trac.macports.org/browser/trunk/base/src/macports1.0/macports.tcl#L500
tells us
- the return value of xcode-select -print-path (which fails the test
when called in line 435) either doesn't exist (unlikely), or doesn't
have the subdirectories Library and usr.
- /Applications/Xcode.app/Contents/Developer (called from line 468)
either doesn't exist, or doesn't ahve the subdirectories Library and
usr.
So, please
- tell us what
xcode-select -print-path
returns for you
- whether the directories tested for exist.
--
Clemens Lang
More information about the macports-users
mailing list