GHC 6.8.1 Build Failure on Mac OS X Intel 10.4.10
Hi all, Apologies if this has already been reported, or is a symptom of something already reported. I downloaded the GHC source (http://www.haskell.org/ghc/dist/6.8.1/ghc-6.8.1-src.tar.bz2) and attempted to build as follows, bootstrapping with GHC 6.6.1: ./configure ; make -j3 (The error manifests even without `-j3'.) This eventually results in the error [1]: ghc-pkg: dependency readline doesn't exist (use --force to override) But config.log reports: configure:2809: checking for ghc-pkg matching /opt/local/bin/ghc configure:2821: result: /opt/local/bin/ghc-pkg configure:2868: checking whether ghc has readline package configure:2879: result: yes Via MacPorts I have gmp 4.2.2 and readline 5.2.007 installed; I am using XCode 2.5 and gcc 4.0.1. The failure also happens if extralibs is built alongside GHC. I've checked http://hackage.haskell.org/trac/ghc/wiki/X86OSXGhc and googled the error message, but found nothing useful. If there any more useful information I could provide, let me know. -- Denis [1] Here is more of the erroneous output: == Finished recursively making `all' for ways: p ... Registering haskell98-1.0.1.0... Reading package info from "dist/inplace-pkg-config" ... done. Saving old package config file... done. Writing new package config file... done. make stage2 make -C compiler boot stage=2 ../utils/mkdirhier/mkdirhier stage2 gcc -E -undef -traditional -P \ -DIMPORT_DIR='"/Users/Shared/incoming/ghc-6.8.1/libraries/ghc"' \ -DLIB_DIR='"/Users/Shared/incoming/ghc-6.8.1/libraries/ghc"' \ -DINCLUDE_DIR='"/Users/Shared/incoming/ghc-6.8.1/libraries/ghc/include"' \ -DDATA_DIR='"/Users/Shared/incoming/ghc-6.8.1/libraries/ghc"' \ -DHTML_DIR='"/Users/Shared/incoming/ghc-6.8.1/libraries/ghc/html"' \ -DHADDOCK_IFACE='"/Users/Shared/incoming/ghc-6.8.1/libraries/ghc/html/ghc.haddock"' \ -DFPTOOLS_TOP_ABS='"/Users/Shared/incoming/ghc-6.8.1"' \ -x c -DPKG_DEPENDS='hpc bytestring template-haskell readline unix Cabal base haskell98' -DSTAGE='"2"' -I../includes -Iinclude -DPACKAGE=ghc -DVERSION=6.8.1 -DPKG_LIBDIR='"/usr/local/lib/ghc-6.8.1"' -DPKG_DATADIR='"/usr/local/share/ghc-6.8.1"' package.conf.in | \ grep -v '^#pragma GCC' | \ sed -e 's/""//g' -e 's/:[ ]*,/: /g' >package.conf.inplace mkdir stage2 ../utils/ghc-pkg/ghc-pkg-inplace update - --force-files <package.conf.inplace for i in utils basicTypes types hsSyn prelude rename typecheck deSugar coreSyn vectorise specialise simplCore stranal stgSyn simplStg codeGen main profiling parser cprAnalysis ndpFlatten iface cmm nativeGen ghci; do \ ../utils/mkdirhier/mkdirhier stage2/$i; \ done mkdir stage2/utils mkdir stage2/basicTypes mkdir stage2/types mkdir stage2/hsSyn Reading package info from stdin ... done. ghc-pkg: dependency readline doesn't exist (use --force to override) make[2]: *** [../driver/stamp-pkg-conf-ghc] Error 1 make[2]: *** Waiting for unfinished jobs.... mkdir stage2/prelude mkdir stage2/rename mkdir stage2/typecheck mkdir stage2/deSugar mkdir stage2/coreSyn mkdir stage2/vectorise mkdir stage2/specialise mkdir stage2/simplCore mkdir stage2/stranal mkdir stage2/stgSyn mkdir stage2/simplStg mkdir stage2/codeGen mkdir stage2/main mkdir stage2/profiling mkdir stage2/parser mkdir stage2/cprAnalysis mkdir stage2/ndpFlatten mkdir stage2/iface mkdir stage2/cmm mkdir stage2/nativeGen mkdir stage2/ghci make[1]: *** [stage2] Error 2 make: *** [bootstrap2] Error 2
Try: ./configure --with-readline-include=/opt/local/include/readline -- with-readline-libraries=/opt/local/lib And this should work with the readline libs that you have installed via MacPorts. (Worked for me to build 6.8.1, and ghci works like it should.) -- Paul On Nov 8, 2007, at 5:24 PM, Denis Bueno wrote:
Hi all,
Apologies if this has already been reported, or is a symptom of something already reported.
I downloaded the GHC source (http://www.haskell.org/ghc/dist/6.8.1/ghc-6.8.1-src.tar.bz2) and attempted to build as follows, bootstrapping with GHC 6.6.1:
./configure ; make -j3
(The error manifests even without `-j3'.) This eventually results in the error [1]:
ghc-pkg: dependency readline doesn't exist (use --force to override)
[... snip ...]
I have this in my ~/.profile so that I don't have to keep giving flags to configure for every single thing I build against MacPorts libraries: export CPATH=/opt/local/include export LIBRARY_PATH=/opt/local/lib export LD_LIBRARY_PATH=/opt/local/lib /Björn On Nov 9, 2007, at 6:13 , Paul Brown wrote:
Try:
./configure --with-readline-include=/opt/local/include/readline -- with-readline-libraries=/opt/local/lib
And this should work with the readline libs that you have installed via MacPorts. (Worked for me to build 6.8.1, and ghci works like it should.)
-- Paul
On Nov 8, 2007, at 5:24 PM, Denis Bueno wrote:
Hi all,
Apologies if this has already been reported, or is a symptom of something already reported.
I downloaded the GHC source (http://www.haskell.org/ghc/dist/6.8.1/ghc-6.8.1-src.tar.bz2) and attempted to build as follows, bootstrapping with GHC 6.6.1:
./configure ; make -j3
(The error manifests even without `-j3'.) This eventually results in the error [1]:
ghc-pkg: dependency readline doesn't exist (use --force to override)
[... snip ...]
On Nov 9, 2007 4:38 AM, Bjorn Bringert <bringert@cs.chalmers.se> wrote:
I have this in my ~/.profile so that I don't have to keep giving flags to configure for every single thing I build against MacPorts libraries:
export CPATH=/opt/local/include export LIBRARY_PATH=/opt/local/lib export LD_LIBRARY_PATH=/opt/local/lib
Thanks, Paul and Bjorn. Indeed, this did the trick. Any thoughts why ./configure claimed to have discovered readline on its own, but then was unable to use it? Or maybe, for some reason, the message is unrelated? -- Denis
Denis Bueno wrote:
On Nov 9, 2007 4:38 AM, Bjorn Bringert <bringert@cs.chalmers.se> wrote:
I have this in my ~/.profile so that I don't have to keep giving flags to configure for every single thing I build against MacPorts libraries:
export CPATH=/opt/local/include export LIBRARY_PATH=/opt/local/lib export LD_LIBRARY_PATH=/opt/local/lib
Thanks, Paul and Bjorn. Indeed, this did the trick. Any thoughts why ./configure claimed to have discovered readline on its own, but then was unable to use it? Or maybe, for some reason, the message is unrelated?
There are two separate tests: (1) whether your installed GHC claims to have a readline package, which succeeded, and (2) whether the C library for readline can be found, and this latter test failed. The build itself should not have failed though - it should just have built GHC without readline support. I think I fixed the bug that caused this recently, and I'll make sure the fix gets merged into 6.8.2. Cheers, Simon
Hi, initially, I faced the same problem. i.e., ghc-pkg: dependency readline doesn't exist (use --force to override) Thus, I tried ./configure --with-readline-include=/opt/local/include/readline -- with-readline-libraries=/opt/local/lib and build again, then I hit another error, Preprocessing library readline-1.0.1.0... Readline.hsc: In function 'main': Readline.hsc:723: error: 'UNDO_DELETE' undeclared (first use in this function) Readline.hsc:723: error: (Each undeclared identifier is reported only once Readline.hsc:723: error: for each function it appears in.) Readline.hsc:724: error: 'UNDO_INSERT' undeclared (first use in this function) Readline.hsc:725: error: 'UNDO_BEGIN' undeclared (first use in this function) Readline.hsc:726: error: 'UNDO_END' undeclared (first use in this function) Readline.hsc:1089: error: 'MULT_MATCH' undeclared (first use in this function) Readline.hsc:1112: error: 'SINGLE_MATCH' undeclared (first use in this function) compiling dist/build/System/Console/Readline_hsc_make.c failed command was: gcc -c -D__GLASGOW_HASKELL__=608 -I/Users/luzm/ghc-6.8.1/includes -I/Users/luzm/ghc-6.8.1/gmp/gmpbuild -D__GLASGOW_HASKELL__=608 -Iinclude dist/build/System/Console/Readline_hsc_make.c -o dist/build/System/Console/Readline_hsc_make.o make[1]: *** [readline/GNUmakefile] Error 1 make: *** [stage1] Error 2 I am using fink instead of darwin port, I have readline installed. zhuo-ming-lus-computer:~ luzm$ fink list *readline* Information about 1733 packages read in 1 seconds. readline 4.3-1028 Comfortable terminal input library i readline-shlibs 4.3-1028 Comfortable terminal input library i readline5 5.0-1004 Comfortable terminal input library i readline5-sh... 5.0-1004 Comfortable terminal input library I am wondering whether I am using the right version of libreadline. zhuo-ming-lus-computer:~ luzm$ ls -l /opt/local/lib total 4584 -r-xr-xr-x 1 root admin 416860 Jan 10 2007 libreadline.5.0.dylib -r-xr-xr-x 1 root admin 448032 Jan 10 2007 libreadline.5.1.dylib -r-xr-xr-x 1 root admin 448032 Jan 10 2007 libreadline.5.dylib -rw-r--r-- 1 root admin 573692 Jan 10 2007 libreadline.a -r-xr-xr-x 1 root admin 448032 Jan 10 2007 libreadline.dylib Regards, Kenny On 11/13/07, Simon Marlow <simonmarhaskell@gmail.com> wrote:
Denis Bueno wrote:
On Nov 9, 2007 4:38 AM, Bjorn Bringert <bringert@cs.chalmers.se> wrote:
I have this in my ~/.profile so that I don't have to keep giving flags to configure for every single thing I build against MacPorts libraries:
export CPATH=/opt/local/include export LIBRARY_PATH=/opt/local/lib export LD_LIBRARY_PATH=/opt/local/lib
Thanks, Paul and Bjorn. Indeed, this did the trick. Any thoughts why ./configure claimed to have discovered readline on its own, but then was unable to use it? Or maybe, for some reason, the message is unrelated?
There are two separate tests: (1) whether your installed GHC claims to have a readline package, which succeeded, and (2) whether the C library for readline can be found, and this latter test failed. The build itself should not have failed though - it should just have built GHC without readline support. I think I fixed the bug that caused this recently, and I'll make sure the fix gets merged into 6.8.2.
Cheers, Simon _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
On Nov 15, 2007 10:10 AM, kenny lu <haskellmail@gmail.com> wrote:
I am using fink instead of darwin port, I have readline installed.
zhuo-ming-lus-computer:~ luzm$ fink list *readline* Information about 1733 packages read in 1 seconds. readline 4.3-1028 Comfortable terminal input library i readline-shlibs 4.3-1028 Comfortable terminal input library i readline5 5.0-1004 Comfortable terminal input library i readline5-sh... 5.0-1004 Comfortable terminal input library
Usually fink libraries are installed in /sw/lib, not /opt/local/lib -- are you sure that's not the case on your system? If they are installed there, you should pass /sw/lib and friends to the ./configure line, instead of /opt/local/lib. -- Denis
participants (5)
-
Bjorn Bringert -
Denis Bueno -
kenny lu -
Paul Brown -
Simon Marlow