Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was installing Wine on 10.6.8 and got this error:

Error: Target org.macports.configure returned: configure failure: shell command failed (see log for details)
Error: Failed to install expat
Log for expat is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_expat/expat/main.log
Error: The following dependencies were not installed: expat expat flex gettext libiconv gperf libiconv ncurses ncursesw ncurses fontconfig freetype bzip2 zlib zlib freetype gnutls libgcrypt libgpg-error libtasn1 lzo2 pkgconfig glib2 autoconf help2man p5-locale-gettext perl5 perl5.12 perl5 perl5 m4 automake libtool pkgconfig readline jpeg jpeg lcms tiff tiff libpng libxml2 libxml2 libxslt mesa makedepend xorg-xproto py27-libxml2 python27 db46 gdbm openssl openssl python_select sqlite3 python27 xorg-dri2proto xorg-glproto xorg-libXfixes xorg-fixesproto xorg-libX11 xorg-bigreqsproto xorg-inputproto xorg-kbproto xorg-libXau xorg-libXdmcp xorg-libxcb xorg-libpthread-stubs xorg-xcb-proto xorg-util-macros xorg-xcmiscproto xorg-xextproto xorg-xf86bigfontproto xorg-xtrans xorg-libXi xorg-libXext xorg-libXi xorg-libXmu xorg-libXt xorg-libsm xorg-libice xorg-libsm xorg-libXcomposite xorg-compositeproto xorg-libXcursor xorg-renderproto xrender xrender xorg-libXinerama xorg-xineramaproto xorg-libXrandr xorg-randrproto xorg-libXxf86vm xorg-xf86vidmodeproto
Error: Status 1 encountered during processing.
To report a bug, see I checked out the log file and at the end of the file I saw this: :error:configure Target org.macports.configure returned: configure failure: shell command failed (see log for details)
:debug:configure Backtrace: configure failure: shell command failed (see log for details)
while executing
"$procedure $targetname"
:info:configure Warning: the following items did not execute (for expat): org.macports.activate org.macports.configure org.macports.destroot org.macports.install
:error:configure Failed to install expat
:notice:configure Log for expat is at: /opt/local/var/macports/logs/
share|improve this question
We need to see the first error in the expat log file – Mark Aug 13 '11 at 20:21
This? :info:configure checking for C compiler default output file name... configure: error: C compiler cannot create executables :info:configure See `config.log' for more details. :info:configure shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.or‌​g_release_ports_textproc_expat/expat/work/expat-2.0.1" && ./configure --prefix=/opt/local --disable-dependency-tracking --mandir=/opt/local/share/man " returned error 77 – daviesgeek Aug 13 '11 at 20:35
up vote 1 down vote accepted

Wine can be a pain to compile. It can be easier to use precompiled binaries such as Wineskin: or Winebottler

Try those links and see how you get on.

share|improve this answer
I'll check them out. I've done it just fine before (compiling Wine), but I'll try those ones. – daviesgeek Aug 13 '11 at 18:13
Thanks so much. I used WineBottler and that worked really well. – daviesgeek Aug 13 '11 at 19:01

To install macports you first need to install Xcode to get a C compiler. That is the usual issue for

error: C compiler cannot create executable

You can either get Xcode free from the App Store if you have Lion or register as a developer

share|improve this answer
I have Xcode 4.1 installed. – daviesgeek Aug 13 '11 at 20:56
and the Unix parts - is there gcc and ld in /usr/bin ? – Mark Aug 14 '11 at 8:44
Yes, gcc and ld are in /usr/bin. – daviesgeek Aug 14 '11 at 15:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.