
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