New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #33280 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Xcode 4.3 does not work with Macports 2.0.3

Reported by: yusuf_ahmad_ali@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.0.3
Keywords: Cc: a.y.harano@…
Port:

Description

Running the command

sudo port install wine

returns

Warning: xcodebuild exists but failed to execute
Warning: Xcode does not appear to be installed; most ports will likely fail to build.
--->  Computing dependencies for wineError: Unable to execute port: can't read "build.cmd": Failed to locate 'make' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it?
To report a bug, see <http://guide.macports.org/#project.tickets>

i am running OSX Lion xCode is installed Quartz is installed Java SDK is installed

also:

/usr/bin/make -v

returns No such file or directory

Change History

comment:1 Changed 2 years ago by ryandesign@…

What version of Xcode?

comment:2 follow-up: ↓ 3 Changed 2 years ago by upland_bill@…

Also received this error after a fresh install of Xcode 4 (Version 4.3 (4E109)) on OSX 10.7.3. Install of emacs then appeared to hang at "---> Configuring gettext"

comment:3 in reply to: ↑ 2 Changed 2 years ago by upland_bill@…

My apologies ... after sitting for several minutes, the install of emacs continued yet ended with this result:

Error: Couldn't determine your Xcode version (from '/usr/bin/xcodebuild -version').
Error: 
Error: If you have not installed Xcode, install it now; see:
Error: http://guide.macports.org/chunked/installing.xcode.html
Error: 
Error: Target org.macports.extract returned: unable to find Xcode
Error: Failed to install zlib
Log for zlib is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_zlib/zlib/main.log
Error: The following dependencies were not installed: pkgconfig glib2 zlib texinfo
Error: Status 1 encountered during processing.

comment:4 Changed 2 years ago by ryandesign@…

  • Component changed from ports to base
  • Milestone MacPorts 2.0.4 deleted

Use Xcode 4.2.1, or wade through the mailing list archives, guide, wiki, etc. if you want to pursue using Xcode 4.3 at this time.

comment:5 Changed 2 years ago by ryandesign@…

comment:6 Changed 2 years ago by a.y.harano@…

I had this very same issue. I did a clean install of Lion (10.7) and installed XCode 4.3.

XCode from Mac Apple Store in Lion doesn't ship gcc by itself. People who has Lion installed probably has a legacy gcc installed from a previous XCode installation.

You must have a free developer account as a Apple Developer. Go to Downloads for Apple Development and get Command Line Tools for Xcode. Install that and you will get gcc and the required binaries needed by MacPorts.

After that it will always give "Warning: xcodebuild exists but failed to execute", however it is just a(n annoying) warning, afterall.

Please, update MacPorts' Guide accordingly.

comment:7 Changed 2 years ago by a.y.harano@…

  • Cc a.y.harano@… added

Cc Me!

comment:8 Changed 2 years ago by a.y.harano@…

I read about the issues which MacPorts' staff are having. Sorry for taking the issue so lightly.

The steps which solved for me were:

  1. Install Xcode 4.3 from Mac App Store
  2. Install Command Line Tools for Xcode
  3. sudo /usr/bin/xcode-select -switch /Applications/Xcode.app
  4. sudo ln -s `which clang` /Applications/Xcode.app/Contents/Developer/usr/bin/

Even so, this is clearly a workaround.

comment:9 Changed 2 years ago by jwiegley@…

  • Cc jwiegley@… added

Cc Me!

comment:10 Changed 2 years ago by jwiegley@…

  • Cc jwiegley@… removed

Cc Me!

comment:11 Changed 2 years ago by hmijail@…

There are a number of suggestions in http://stackoverflow.com/questions/9323738/unable-to-get-macport-functionality-after-installing-xcode-4-3

I have tried the 2 most sane-looking of them: -- sudo /usr/bin/xcode-select -switch /Applications/Xcode.app (interesting that after this, xcode-select -print-path shows /Applications/Xcode.app/Contents/Developer); --and changing developer_dir in macports.conf to /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain

With this, I can now install at least some ports without any warning. I have found a problem in for example libvpx, but I am not sure if this is a problem in the port itself.

Note, I am using ccache and parallel builds, so my environment might be more demanding than "normal".

comment:12 Changed 2 years ago by cal@…

Please revert the change to developer_dir and wait for MacPorts 2.0.4, fixing these things the proper way. Having developer_dir set to this path will make some builds fail in the release of MacPorts 2.0.4. Same thing goes for symlinking clang.

The original reporter's problem is probably not having command line tools installed from the downloads tab in Xcode settings.

The problem in libvpx has already been fixed (see #33283), but it might still not work with Xcode 4.3 and MacPorts 2.0.3.

There is no correct way to setup MacPorts 2.0.3 in order to get it working fine with Xcode 4.3. Please downgrade to Xcode 4.2.1, upgrade to MacPorts 2.0.4 as soon as it is released or run MacPorts trunk.

comment:13 Changed 2 years ago by macsforever2000@…

  • Summary changed from xcodebuild exists but failed to execute to Xcode 4.3 does not work with Macports 2.0.3

comment:14 Changed 2 years ago by macsforever2000@…

  • Status changed from new to closed
  • Resolution set to fixed

Macports was updated to version 2.0.4 in r90250. See also the wiki for more information about using Xcode 4.3 with Macports.

Note: See TracTickets for help on using tickets.