Friday, September 11, 2009

Installing ghc on OS X and getting "./configure: line 11082: syntax error: unexpected end of file"

While trying to install ghc from MacPorts I kept getting this:
[...]
---> Fetching ghc
---> Attempting to fetch ghc-6.10.3-src.tar.bz2 from
http://distfiles.macports.org/ghc
---> Attempting to fetch ghc-6.10.3-src-extralibs.tar.bz2 from
http://distfiles.macports.org/ghc
---> Attempting to fetch testsuite-6.10.3.tar.bz2 from
http://distfiles.macports.org/ghc
---> Attempting to fetch ghc-6.8.2-darwin-i386-leopard-bootstrap.tar.bz2 from
http://distfiles.macports.org/ghc
---> Verifying checksum(s) for ghc
---> Extracting ghc
---> Applying patches to ghc
---> Configuring ghc
Error: Target org.macports.configure returned: configure failure: shell command
" cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.
macports.org_release_ports_lang_ghc/work/ghc-6.10.3" && ./configure 
--prefix=/opt/local 
--prefix=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.
macports.org_release_ports_lang_ghc/work/destroot/opt/local 
--datadir=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.
macports.org_release_ports_lang_ghc/work/destroot/opt/local/share/ghc-6.10.3 
--with-gmp-includes=/opt/local/include --with-gmp-libraries=/opt/local/lib 
--with-ghc='/opt/local/var/macports/build/
_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/
work/ghc-bootstrap/bin/ghc' --with-gcc=/usr/bin/gcc-4.0 " returned error 2
Command output: checking build system type... i386-apple-darwin9.7.0
checking host system type... i386-apple-darwin9.7.0
checking target system type... i386-apple-darwin9.7.0
Canonicalised to: i386-apple-darwin
checking version of ghc... 6.8.2
checking for nhc... no
checking for nhc98... no
checking for hbc... no
checking for ld... /usr/bin/ld
./configure: line 11082: syntax error: unexpected end of file

Turns out there's some old cruft in the ghc autoconf macros that were causing the break. The fix was a simple:

$ sudo port selfupdate && sudo port clean ghc && sudo port install ghc

You can see the filed bug and changeset at MacPorts for more information.


1 comment:

ablefaciane said...

Mummys Gold Casino & Hotel - MapyRO
› › Las Vegas Hotels 서산 출장마사지 › › Las Vegas Hotels Mummys 용인 출장마사지 Gold Casino & Hotel offers a wide variety 양산 출장마사지 of entertainment, great dining options and an all-encompassing casino and 서산 출장안마 poker 나주 출장마사지 room.

About Me

My photo
I love solving real-world problems with code and systems (web apps, distributed systems and all the bits and pieces in-between).