
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
<

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
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 tech@openbsd.org

dermiste wrote:
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 :
Bootstrapping from HC files isn't supported in 6.10.1, it was last supported in 6.6.1. We aim to have it working again for 6.12. Sorry for the inconvenience! Cheers, Simon
participants (3)
-
dermiste
-
Matthias Kilian
-
Simon Marlow