Re: Linking error during stage2
On Tue, Nov 11, 2008 at 06:38:02PM +0100, dermiste wrote: I've successfully built GHC-6.10.1 from 6.6.1 on OpenBSD 4.4, and would like now to generate a hc-file-bundle to build it without pre-existing GHC. I followed the instructions in [1], but I'm stuck with this error : Linking dist-install/build/installPackage/installPackage ... /usr/ports/lang/ghc/w-ghc-6.10.1-ghc_boot/ghc-6.10.1/libraries/unix/dist/build/libHSunix-2.3.1.0.a(Semaphore.o)(.text+0xac): In function `unixzm2zi3zi1zi0_SystemziPosixziSemaphore_zdwa_info': : undefined reference to `sem_trywait' [...] Obviously, the linker skips entirely /usr/lib/libpthread.a, as all the symbols defined in semaphore.h are into it. A quick hack I used for my work on ghc-6.8: just disable System.Posix.Semaphore. --- libraries/unix/System/Posix.hs.orig Sat May 3 19:25:32 2008 +++ libraries/unix/System/Posix.hs Sun May 18 14:37:13 2008 @@ -26,7 +26,6 @@ module System.Posix ( module System.Posix.Time, module System.Posix.User, module System.Posix.Resource, - module System.Posix.Semaphore, module System.Posix.SharedMem ) where @@ -43,7 +42,6 @@ import System.Posix.Terminal import System.Posix.Time import System.Posix.User import System.Posix.Resource -import System.Posix.Semaphore import System.Posix.SharedMem {- TODO --- libraries/unix/unix.cabal.orig Sat May 3 19:25:32 2008 +++ libraries/unix/unix.cabal Sun May 18 13:44:08 2008 @@ -32,7 +32,6 @@ exposed-modules: System.Posix.User System.Posix.Signals System.Posix.Signals.Exts -System.Posix.Semaphore System.Posix.SharedMem extra-source-files: configure.ac configure It's not a proper solution, but it may help for getting the build a little bit farther (and OpenBSD doesn't support sem_open(3) anyway). Ciao, Kili -- It's a Barrier Of Entry issue: if you can't figure out which floppy to boot from, go run Gentoo. -- Matthew Jenove on [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Linking error during stage2
Hi, I've successfully built GHC-6.10.1 from 6.6.1 on OpenBSD 4.4, and would like now to generate a hc-file-bundle to build it without pre-existing GHC. I followed the instructions in [1], but I'm stuck with this error : [] gmake[2]: Leaving directory `/usr/ports/lang/ghc/w-ghc-6.10.1-ghc_boot/ghc-6.10.1/ghc' gmake[1]: Leaving directory `/usr/ports/lang/ghc/w-ghc-6.10.1-ghc_boot/ghc-6.10.1/compiler' gmake -C utils with-stage-2 gmake[1]: Entering directory `/usr/ports/lang/ghc/w-ghc-6.10.1-ghc_boot/ghc-6.10.1/utils' gmake -C installPackage with-stage-2 gmake[2]: Entering directory `/usr/ports/lang/ghc/w-ghc-6.10.1-ghc_boot/ghc-6.10.1/utils/installPackage' /usr/ports/lang/ghc/w-ghc-6.10.1-ghc_boot/ghc-6.10.1/libraries/cabal-bin /usr/local/bin/ghc /usr/ports/lang/ghc/w-ghc-6.10.1-ghc_boot/ghc-6.10.1/libraries/bootstrapping.conf configure --distpref dist-install \ --prefix=/NONEXISTENT --bindir=/NONEXISTENT --libdir=/NONEXISTENT --libexecdir=/NONEXISTENT --datadir=/NONEXISTENT --docdir=/NONEXISTENT --haddockdir=/NONEXISTENT --htmldir=/NONEXISTENT \ --with-compiler=/usr/ports/lang/ghc/w-ghc-6.10.1-ghc_boot/ghc-6.10.1/ghc/stage2-inplace/ghc --with-hc-pkg=/usr/ports/lang/ghc/w-ghc-6.10.1-ghc_boot/ghc-6.10.1/utils/ghc-pkg/install-inplace/bin/ghc-pkg --package-db /usr/ports/lang/ghc/w-ghc-6.10.1-ghc_boot/ghc-6.10.1/stage3.package.conf \ --libsubdir='$pkgid' --with-gcc=gcc --with-ld=/usr/bin/ld --hsc2hs-option=-I/usr/local/include --configure-option='--with-gmp-includes=/usr/local/include' --configure-option='--with-gmp-libraries=/usr/local/lib' --configure-option=--with-cc=gcc --with-hsc2hs=/usr/ports/lang/ghc/w-ghc-6.10.1-ghc_boot/ghc-6.10.1/utils/hsc2hs/install-inplace/bin/hsc2hs \ --constraint=Cabal == 1.6.0.1 Configuring installPackage-1.0... /usr/ports/lang/ghc/w-ghc-6.10.1-ghc_boot/ghc-6.10.1/libraries/cabal-bin /usr/local/bin/ghc /usr/ports/lang/ghc/w-ghc-6.10.1-ghc_boot/ghc-6.10.1/libraries/bootstrapping.conf build --distpref dist-install --ghc-option=-H32m --ghc-option=-O --ghc-option=-fvia-C --ghc-option=-Rghc-timing --ghc-option=-keep-hc-file --ghc-option=-Wall Preprocessing executables for installPackage-1.0... Building installPackage-1.0... Linking dist-install/build/installPackage/installPackage ... /usr/ports/lang/ghc/w-ghc-6.10.1-ghc_boot/ghc-6.10.1/libraries/unix/dist/build/libHSunix-2.3.1.0.a(Semaphore.o)(.text+0xac): In function `unixzm2zi3zi1zi0_SystemziPosixziSemaphore_zdwa_info': : undefined reference to `sem_trywait' {... five more like that ...} /usr/ports/lang/ghc/w-ghc-6.10.1-ghc_boot/ghc-6.10.1/libraries/unix/dist/build/libHSunix-2.3.1.0.a(Semaphore.o)(.text+0x17a4): In function `s29I_info': : undefined reference to `sem_unlink' collect2: ld returned 1 exit status ghc: 36084348 bytes, 5 GCs, 3492304/5176252 avg/max bytes residency (3 samples), 33M in use, 0.01 INIT (0.00 elapsed), 0.12 MUT (5.36 elapsed), 0.07 GC (0.21 elapsed) :ghc Obviously, the linker skips entirely /usr/lib/libpthread.a, as all the symbols defined in semaphore.h are into it. But its behaviour is slightly inconsistent, as I had no problem building the stage2 commenting SplitObjs in mk/build.mk some more data : I'm compiling this with the aforementioned GHC-6.10.1 bootstrapped from GHC-6.6.1. Clues anyone ? [1] http://hackage.haskell.org/trac/ghc/wiki/Building/Porting#PortingGHCtoanewplatform -- Vincent Gross So, the essence of XML is this: the problem it solves is not hard, and it does not solve the problem well. -- Jerome Simeon Phil Wadler ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users