ANNOUNCE: GHC 6.10.1 RC 1

Paul Jarc prj at po.cwru.edu
Sun Nov 2 20:37:46 EST 2008


Ian Lynagh <igloo at earth.li> wrote:
> I thought all your problems boiled down to binaries not being able to
> find libgmp.so at runtime? So I think this should fix them all.

Yes, but then I wouldn't be able to find and fix the commands that are
missing SRC_HC_OPTS. :)  So I'm holding off on that for now.  Below is
a patch for the ones I've found so far.  With those changes, and
without setting LD_LIBRARY_PATH, the build stops here:

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

My BUILD_FLAGS includes --ghc-option=-optl... and --ld-option=...
flags which would take care of it, if they were being used, so
apparently they're not.  libraries/hpc/Trace/Hpc/Reflect.hsc produces
libraries/hpc/dist-bootstrapping/build/Trace/Hpc/Reflect_hsc_make.c,
which is compiled and linked to make
libraries/hpc/dist-bootstrapping/build/Trace/Hpc/Reflect_hsc_make.  Is
there anything I can add to the cabal-bin command line to inject
linker flags into that link command?

--- libraries/Makefile	2008-10-07 15:30:24.000000000 -0400
+++ libraries/Makefile	2008-10-31 11:58:25.000000000 -0400
@@ -131,21 +131,21 @@
 
 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
 	-cd filepath && $(CABAL) clean     --distpref=dist-bootstrapping
 	cd filepath && $(CABAL) configure --distpref=dist-bootstrapping --with-compiler=$(GHC) --with-hc-pkg=$(GHC_PKG) --package-db=$(HERE_ABS)/$@.tmp
-	cd filepath && $(CABAL) build     --distpref=dist-bootstrapping
+	cd filepath && $(CABAL) build     --distpref=dist-bootstrapping $(BUILD_FLAGS)
 	cd filepath && $(CABAL) install   --distpref=dist-bootstrapping --inplace
 	-cd Cabal    && $(CABAL) clean     --distpref=dist-bootstrapping
 	cd Cabal    && $(CABAL) configure --distpref=dist-bootstrapping --with-compiler=$(GHC) --with-hc-pkg=$(GHC_PKG) --package-db=$(HERE_ABS)/$@.tmp
-	cd Cabal    && $(CABAL) build     --distpref=dist-bootstrapping
+	cd Cabal    && $(CABAL) build     --distpref=dist-bootstrapping $(BUILD_FLAGS)
 	cd Cabal    && $(CABAL) install   --distpref=dist-bootstrapping --inplace
 	-cd hpc    && $(CABAL) clean     --distpref=dist-bootstrapping
 	cd hpc    && $(CABAL) configure --distpref=dist-bootstrapping --with-compiler=$(GHC) --with-hc-pkg=$(GHC_PKG) --package-db=$(HERE_ABS)/$@.tmp
-	cd hpc    && $(CABAL) build     --distpref=dist-bootstrapping
+	cd hpc    && $(CABAL) build     --distpref=dist-bootstrapping $(BUILD_FLAGS)
 	cd hpc    && $(CABAL) install   --distpref=dist-bootstrapping --inplace
 	mv $@.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


More information about the Glasgow-haskell-users mailing list