Ticket #33398 (closed enhancement: fixed)
print full path in recommended xcode-select commands since some users have an old version
| Reported by: | theboergers@… | Owned by: | macports-tickets@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | MacPorts 2.1.0 |
| Component: | base | Version: | 2.0.4 |
| Keywords: | Cc: | ||
| Port: |
Description
A fresh install of MacPorts 2.0.4 on 10.7.3/Xcode 4.3 with command-line tools continues to display the error "Warning: xcodebuild exists but failed to execute".
A transcript of the MacPorts install and subsequent package installation is attached.
P.S. 2.0.4 is not an option for the version dropdown list in the submit ticket form.
Attachments
Change History
comment:1 follow-up: ↓ 6 Changed 15 months ago by dluke@…
Did you follow the instructions it printed just below that line?
Warning: xcodebuild exists but failed to execute Warning: Xcode appears to be installed but xcodebuild is unusable; some ports will likely fail to build. Warning: You may need to run `sudo xcode-select -switch /Applications/Xcode.app`
comment:2 follow-up: ↓ 3 Changed 15 months ago by ryandesign@…
- Priority changed from High to Normal
- Version set to 2.0.4
- Component changed from ports to base
comment:3 in reply to: ↑ 2 ; follow-up: ↓ 4 Changed 15 months ago by theboergers@…
Replying to ryandesign@…: I did. It's there in the transcript.
comment:4 in reply to: ↑ 3 ; follow-up: ↓ 5 Changed 15 months ago by charliebrown2k@…
Replying to theboergers@…:
Replying to ryandesign@…: I did. It's there in the transcript.
with OS 10.7.3 (Lion) and Xcode 4.3 (with command-line utilities installed) I got it fixed with:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
comment:5 in reply to: ↑ 4 Changed 15 months ago by theboergers@…
Replying to charliebrown2k@…:
Replying to theboergers@…:
Replying to ryandesign@…: I did. It's there in the transcript.
with OS 10.7.3 (Lion) and Xcode 4.3 (with command-line utilities installed) I got it fixed with:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
That did the trick for me as well.
comment:6 in reply to: ↑ 1 ; follow-up: ↓ 7 Changed 14 months ago by nicholas@…
Replying to dluke@…:
Did you follow the instructions it printed just below that line?
Warning: xcodebuild exists but failed to execute Warning: Xcode appears to be installed but xcodebuild is unusable; some ports will likely fail to build. Warning: You may need to run `sudo xcode-select -switch /Applications/Xcode.app`
Please note: with OS X 10.7.3 Lion and XCode 4.3.2, I did NOT get this entire message. I ONLY got the first line that told me something was wrong. The last two lines—the explanation and instructions—were not present. I had no idea what to do until I found this bug. I am also on MacPorts 2.0.4.
comment:7 in reply to: ↑ 6 Changed 14 months ago by jasoncof@…
Replying to nicholas@…:
Replying to dluke@…:
Did you follow the instructions it printed just below that line?
Warning: xcodebuild exists but failed to execute Warning: Xcode appears to be installed but xcodebuild is unusable; some ports will likely fail to build. Warning: You may need to run `sudo xcode-select -switch /Applications/Xcode.app`Please note: with OS X 10.7.3 Lion and XCode 4.3.2, I did NOT get this entire message. I ONLY got the first line that told me something was wrong. The last two lines—the explanation and instructions—were not present. I had no idea what to do until I found this bug. I am also on MacPorts 2.0.4.
I have OS X 10.7.3 Lion and XCode 4.3.1 and I also did NOT get the entire message. I only got the first line: "Warning: xcodebuild exists but failed to execute".
comment:8 Changed 14 months ago by cal@…
This message is only being printed if you have /Applications/Xcode.app and are running any of the following commands: fetch, checksum, extract, patch, configure, build, test, destroot, install, activate, dmg, mdmg, pkg, mpkg, rpm, dpkg and srpm. So e.g. when running port version, port outdated, etc. it will only show the warning about xcodebuild, but not the instructions.
As already mentioned by charliebrown2k it sometimes is necessary to run xcode-select -switch /Applications/Xcode.app/Contents/Developer rather than only xcode-select -switch /Applications/Xcode.app. This depends on the version of the xcode-select tool you have installed and is fixed with a newer version that should have been installed with the 10.7.3 combo update (but sometimes apparently wasn't).
comment:9 Changed 14 months ago by urban.48@…
FYI, I had this same problem, and I was able to run
sudo xcode-select -switch /Applications/Xcode.app
without specifying the developer folder within Xcode.app and it seemed to fix the problem for me. Running
/usr/bin/xcodebuild -version
returns the correct information.
comment:10 Changed 14 months ago by jmr@…
- Status changed from new to closed
- Type changed from defect to enhancement
- Milestone set to MacPorts Future
- Resolution set to fixed
- Summary changed from xcodebuild error on fresh MacPorts 2.0.4 to print full path in recommended xcode-select commands since some users have an old version
All we can really do is recommend using the full path, which works with both old and new versions of xcode-select. r91349

