Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#17321 closed defect (fixed)

ghc 6.10.1: ld: can't locate file for: -lgmp

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: gwright@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc:
Port: ghc

Description

ghc 6.10.1 doesn't build for me, on Mac OS X 10.4.11 Intel with Xcode 2.5:

$ port install ghc
--->  Fetching ghc
--->  Verifying checksum(s) for ghc
--->  Extracting ghc
--->  Applying patches to ghc
--->  Configuring ghc
--->  Building ghc
Error: Target org.macports.build returned: shell command "cd /mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-6.10.1 && env DYLD_FALLBACK_LIBRARY_PATH=/mp/lib make" returned error 2
Command output: ../utils/genprimopcode/genprimopcode --primop-list        < prelude/primops.txt > primop-list.hs-incl
../utils/genprimopcode/genprimopcode --has-side-effects   < prelude/primops.txt > primop-has-side-effects.hs-incl
../utils/genprimopcode/genprimopcode --out-of-line        < prelude/primops.txt > primop-out-of-line.hs-incl
../utils/genprimopcode/genprimopcode --commutable         < prelude/primops.txt > primop-commutable.hs-incl
../utils/genprimopcode/genprimopcode --needs-wrapper      < prelude/primops.txt > primop-needs-wrapper.hs-incl
../utils/genprimopcode/genprimopcode --can-fail           < prelude/primops.txt > primop-can-fail.hs-incl
../utils/genprimopcode/genprimopcode --strictness         < prelude/primops.txt > primop-strictness.hs-incl
../utils/genprimopcode/genprimopcode --primop-primop-info < prelude/primops.txt > primop-primop-info.hs-incl
Creating main/Config.hs ... 
done.
test -f /mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-6.10.1/stage3.package.conf || echo "[]" > /mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-6.10.1/stage3.package.conf
/mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-6.10.1/libraries/cabal-bin /mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-bootstrap/bin/ghc /mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-6.10.1/libraries/bootstrapping.conf configure --distpref dist-stage1 \
                   --flags=stage1 --flags=ncg --ghc-options='-#include "cutils.h"' --with-compiler=/mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-bootstrap/bin/ghc --with-hc-pkg=/mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-bootstrap/bin/ghc-pkg --package-db /mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-6.10.1/libraries/bootstrapping.conf \
                   --prefix=/NONEXISTENT --bindir=/NONEXISTENT --libdir=/NONEXISTENT --libexecdir=/NONEXISTENT --datadir=/NONEXISTENT --docdir=/NONEXISTENT --haddockdir=/NONEXISTENT --htmldir=/NONEXISTENT \
                   --libsubdir='$pkgid' --with-gcc=gcc --with-ld=/usr/bin/ld --hsc2hs-option=-I/mp/include    --configure-option='--prefix=/mp'  --configure-option='--prefix=/mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/destroot/mp'  --configure-option='--datadir=/mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/destroot/mp/share/ghc-6.10.1'  --configure-option='--with-gmp-includes=/mp/include'  --configure-option='--with-gmp-libraries=/mp/lib'  --configure-option='--with-ghc=/mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-bootstrap/bin/ghc'  --configure-option='CC=/usr/bin/gcc-4.0'  --configure-option='CFLAGS=-O2 -I/mp/include'  --configure-option='LDFLAGS=-L/mp/lib -L/usr/lib'  --configure-option='CPPFLAGS=-I/mp/include'  --configure-option='CPP=/usr/bin/cpp-4.0' --configure-option=--with-cc=gcc --with-hsc2hs=/mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-6.10.1/utils/hsc2hs/install-inplace/bin/hsc2hs \
                   --ghc-option=-DSTAGE=1
Configuring ghc-6.10.1...
Warning: 'include-dirs: ../libraries/base/cbits' is a relative path outside of
the source tree. This will not work when generating a tarball with 'sdist'.
Warning: 'include-dirs: ../libraries/base/include' is a relative path outside
of the source tree. This will not work when generating a tarball with 'sdist'.
rm -f -f Makefile-stage1
/mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-6.10.1/libraries/cabal-bin /mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-bootstrap/bin/ghc /mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-6.10.1/libraries/bootstrapping.conf makefile  --distpref dist-stage1 -f Makefile-stage1
Preprocessing library ghc-6.10.1...
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: can't locate file for: -lgmp
collect2: ld returned 1 exit status
linking dist-stage1/build/Fingerprint_hsc_make.o failed
command was: /usr/bin/gcc -L/mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-bootstrap/lib/ghc-6.6 -lHSunix_cbits -ldl -L/mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-6.10.1/libraries/hpc/dist-bootstrapping/build -L/mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-bootstrap/lib/ghc-6.6 -L/mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-6.10.1/libraries/extensible-exceptions/dist-bootstrapping/build -L/mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-6.10.1/libraries/Cabal/dist-bootstrapping/build -L/mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-6.10.1/libraries/filepath/dist-bootstrapping/build -L/mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-bootstrap/lib/ghc-6.6 -lHSbase_cbits -L/mp/var/macports/build/_Users_rschmidt_macports_dports_lang_ghc/work/ghc-bootstrap/lib/ghc-6.6 -lm -lgmp -ldl dist-stage1/build/Fingerprint_hsc_make.o -o dist-stage1/build/Fingerprint_hsc_make
make[1]: *** [boot.stage.1] Error 1
make: *** [stage1] Error 1

Error: Status 1 encountered during processing.
$

gmp @4.2.4_0 is installed and active, and ${prefix}/lib/libgmp.dylib does exist, but I note that the compile command above doesn't contain -L${prefix}/lib.

Attachments (1)

ghc-6.10.1_7-i386-tiger.txt.bz2 (11.7 KB) - added by ryandesign (Ryan Carsten Schmidt) 16 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 16 years ago by gwright@…

Status: newassigned

I know about this one; unfortunately, it doesn't happen on Leopard and I don't have access to a Tiger machine for the next week and a half.

comment:2 Changed 16 years ago by gwright@…

I think I have the bug isolated to one of two things: the handling of either SRC_CC_OPTS or SRC_HSC2HS_OPTS. But setting SRC_CC_OPTS can cause the build to fail because of search path mis-ordering. So the first item of business is to fix that.

comment:3 Changed 16 years ago by gwright@…

r42354 may fix this.

comment:4 in reply to:  3 ; Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to gwright@…:

r42354 may fix this.

I'm afraid it doesn't seem to help.

comment:5 in reply to:  4 ; Changed 16 years ago by gwright@…

Replying to ryandesign@…:

Replying to gwright@…:

r42354 may fix this.

I'm afraid it doesn't seem to help.

Could you send me the output of port -dv destroot? The change to the build.mk file should pass the right options to the hsc2hs program (I can see them on my log on i386/Leopard). If it's still not working properly something more complicated is wrong.

Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

comment:6 in reply to:  5 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to gwright@…:

Could you send me the output of port -dv destroot?

Sure - it's attached.

comment:7 Changed 16 years ago by gwright@…

r42399 may finally fix this. It hardcodes the proper link path into compiler/ghc.cabal.in.

comment:8 Changed 16 years ago by gwright@…

Resolution: fixed
Status: assignedclosed

I've had a report that revision 8 (checked in with r42399) works, so I am closing this bug.

Revision 8 builds on all platforms except ppc/Leopard, which still fails even with the bootstrap compiler updated to 6.10.1 with the error reported in #15142.

comment:9 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.