
Ian Lynagh
On Wed, Oct 08, 2008 at 06:04:31PM -0400, Paul Jarc wrote:
With all that, the first problem I hit was with utils/pwd/pwd. ./configure builds it by calling ghc without any special flags, so the binary can't find libgmp.so at runtime.
I think you need to tell the dynamic linker where to find it, e.g. by setting DYLD_LIBRARY_PATH. See the dyld manpage for more information.
I'm on GNU/Linux, so it would be LD_LIBRARY_PATH for me. Yes, that would be another useable workaround for pwd. What about the other problems I mentioned? Regardless of my problems, it seems like a build bug that SRC_HC_OPTS isn't used for some compilations. Is SRC_HC_OPTS meant to be used for all Haskell compilations in the build process, or am I misunderstanding its purpose?
The next problem was with cabal-bin. The command to build it didn't use SRC_HC_OPTS, so that binary also couldn't find libgmp.so when it ran. I used this patch:
--- libraries/Makefile~ 2008-09-21 13:06:31.000000000 -0400 +++ libraries/Makefile 2008-09-23 01:58:29.000000000 -0400 @@ -131,7 +131,7 @@
cabal-bin: cabal-bin.hs -mkdir bootstrapping - $(GHC) $(BOOTSTRAPPING_FLAGS) --make cabal-bin -o cabal-bin + $(GHC) $(BOOTSTRAPPING_FLAGS) $(SRC_HC_OPTS) --make cabal-bin -o cabal-bin
bootstrapping.conf: cabal-bin echo "[]" > $@.tmp @@ -154,9 +154,9 @@ mkdir ifBuildable $(CP) ifBuildable.hs ifBuildable/ ifeq "$(stage)" "2" - cd ifBuildable && ../$(HC) -Wall --make ifBuildable -o ifBuildable + cd ifBuildable && ../$(HC) -Wall $(SRC_HC_OPTS) --make ifBuildable -o ifBuildable else - cd ifBuildable && $(GHC) -Wall --make ifBuildable -o ifBuildable + cd ifBuildable && $(GHC) -Wall $(SRC_HC_OPTS) --make ifBuildable -o ifBuildable endif
.PHONY: all build configure
That gets me to this point:
Preprocessing library hpc-0.5.0.2... dist-bootstrapping/build/Trace/Hpc/Reflect_hsc_make: error while loading shared libraries: libgmp.so.3: cannot open shared object file: No such file or directory running dist-bootstrapping/build/Trace/Hpc/Reflect_hsc_make failed command was: dist-bootstrapping/build/Trace/Hpc/Reflect_hsc_make >dist-bootstrapping/build/Trace/Hpc/Reflect.hs make[1]: *** [bootstrapping.conf] Error 1 make[1]: Leaving directory `/fs/pkgs/mount/package/host/code.dogmap.org/foreign/ghc-6.10.0.20080921+spf+0/compile/src/ghc-6.10.0.20080921/libraries' make: *** [stage1] Error 2
I'm not sure how to fix this. I assume there's some way to pass SRC_HC_OPTS to cabal-bin, but I don't know how.
paul