|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 | Next > |
|
|
Porting to DragonFly BSDWhen GHC 6.12.1 is released, I'm going to have a go at porting it to
DragonFly BSD (32-bit incarnation). Is the porting page on the wikiup-to-date? -- Colin Adams Preston, Lancashire, ENGLAND _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-users |
|
|
Re: Porting to DragonFly BSDOn 04/11/2009 15:08, Colin Adams wrote:
> When GHC 6.12.1 is released, I'm going to have a go at porting it to > DragonFly BSD (32-bit incarnation). Is the porting page on the > wikiup-to-date? There are apparently some difficulties with porting right now: http://hackage.haskell.org/trac/ghc/ticket/3472 Depending on how similar the host/target archtectures are, it might be possible to follow the instructions to get a working port. We need to have another run at doing a port and iron out the bugs in the procedure. Cheers, Simon _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-users |
|
|
Re: Porting to DragonFly BSDOn Fri, Nov 06, 2009 at 08:56:00AM +0000, Simon Marlow wrote:
> On 04/11/2009 15:08, Colin Adams wrote: > >When GHC 6.12.1 is released, I'm going to have a go at porting it to > >DragonFly BSD (32-bit incarnation). Is the porting page on the > >wikiup-to-date? > > There are apparently some difficulties with porting right now: > > http://hackage.haskell.org/trac/ghc/ticket/3472 Unfortunately I didn't have much time after the OpenBSD p2k9 in Budapesst (where I got a little bit further with the bootstrapping), but I remember that I got parts of stage 1 built but then something in utils/* didn't compile. I hope to have a look this weekend (and to find the patches I wrote in Budapest). There are probably just some more pattern rules missing for the .hc file bootstrapping. > Depending on how similar the host/target archtectures are, it might be > possible to follow the instructions to get a working port. Once the make rules are complete, the Linker may be tricky (it already contains #ifdef'd sections specific to FreeBSD and OpenBSD), but I don't expect other parts of GHC to need tweaking. > We need to have another run at doing a port and iron out the bugs in the > procedure. At least I tried to correct some of the hints on the porting wiki page, but it's obviously still incomplete. Ciao, Kili _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-users |
|
|
Re: Porting to DragonFly BSDOn Wed, Nov 04, 2009 at 03:08:27PM +0000, Colin Adams wrote:
> When GHC 6.12.1 is released, I'm going to have a go at porting it to > DragonFly BSD (32-bit incarnation). Is the porting page on the > wikiup-to-date? Maybe you could start with something like: $ curl -o ghc-6.10.4-3.tar.bz2 \ ; http://www.goetz-isenmann.de/dfly/ghc-6.10.4-3.tar.bz2 $ curl -o cabal http://www.goetz-isenmann.de/dfly/cabal $ tar xzf ghc-6.10.4-3.tar.bz2 -C /var/tmp/isenmann $ PATH=/var/tmp/isenmann/ghc-6.10.4-3/bin:$PATH $ ./cabal update $ ./cabal install --user cabal-install I have just recompiled this ghc with itself using the attached patches and --prefix=/var/tmp/isenmann on dragonfly 2.4.1 (32bit). The patches are only a stupid "do the same for dragonfly as for freebsd" with two exceptions AFAIR: (a) use -pthread not -lthr, and (b) this -D_POSIX_VERSION=199309 in rts/Makefile, that's most probably the wrong way to fix a (can't remember the details) build problem. Until now I had no time and energie to dig deeper into the problem [1], that looks to me, like rts/Linker cannot load any object file that references errno. My guess is, that for dragonflys "extern __thread int errno;" we do not only need to add a new case in rts/Linker.c but also need to generate different code for this thread local storage access. Goetz [1] $ ghci GHCi, version 6.10.4: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer ... linking ... done. ghc: /var/tmp/isenmann/ghc-6.10.4-3/lib/ghc-6.10.4/base-4.1.0.0/HSbase-4.1.0.0.o: unhandled ELF relocation(Rel) type 15 Loading package base ... linking ... ghc: unable to load package `base' diff -ru ghc-6.10.4-orig/compiler/nativeGen/NCG.h ghc-6.10.4/compiler/nativeGen/NCG.h --- ghc-6.10.4-orig/compiler/nativeGen/NCG.h 2009-07-14 19:10:51 +0200 +++ ghc-6.10.4/compiler/nativeGen/NCG.h 2009-11-06 21:10:07 +0100 @@ -38,6 +38,12 @@ # define IF_OS_freebsd(x,y) y #endif -- - - - - - - - - - - - - - - - - - - - - - +#if dragonfly_TARGET_OS +# define IF_OS_dragonfly(x,y) x +#else +# define IF_OS_dragonfly(x,y) y +#endif +-- - - - - - - - - - - - - - - - - - - - - - #if netbsd_TARGET_OS # define IF_OS_netbsd(x,y) x #else diff -ru ghc-6.10.4-orig/configure ghc-6.10.4/configure --- ghc-6.10.4-orig/configure 2009-07-14 19:24:26 +0200 +++ ghc-6.10.4/configure 2009-11-06 21:10:07 +0100 @@ -2307,6 +2307,15 @@ HostVendor_CPP='unknown' HostOS_CPP='freebsd' ;; +i[3456]86-*-dragonfly*) + HostPlatform=i386-unknown-dragonfly # hack again + TargetPlatform=i386-unknown-dragonfly + BuildPlatform=i386-unknown-dragonfly + HostPlatform_CPP='i386_unknown_dragonfly' + HostArch_CPP='i386' + HostVendor_CPP='unknown' + HostOS_CPP='dragonfly' + ;; i[3456]86-*-freebsd2*) # Older FreeBSDs are a.out HostPlatform=i386-unknown-freebsd2 # hack again TargetPlatform=i386-unknown-freebsd2 diff -ru ghc-6.10.4-orig/configure.ac ghc-6.10.4/configure.ac --- ghc-6.10.4-orig/configure.ac 2009-07-14 19:10:53 +0200 +++ ghc-6.10.4/configure.ac 2009-11-06 21:10:07 +0100 @@ -260,6 +260,15 @@ HostVendor_CPP='unknown' HostOS_CPP='freebsd' ;; +i[[3456]]86-*-dragonfly*) + HostPlatform=i386-unknown-dragonfly # hack again + TargetPlatform=i386-unknown-dragonfly + BuildPlatform=i386-unknown-dragonfly + HostPlatform_CPP='i386_unknown_dragonfly' + HostArch_CPP='i386' + HostVendor_CPP='unknown' + HostOS_CPP='dragonfly' + ;; i[[3456]]86-*-freebsd2*) # Older FreeBSDs are a.out HostPlatform=i386-unknown-freebsd2 # hack again TargetPlatform=i386-unknown-freebsd2 diff -ru ghc-6.10.4-orig/distrib/configure-bin.ac ghc-6.10.4/distrib/configure-bin.ac --- ghc-6.10.4-orig/distrib/configure-bin.ac 2009-07-14 19:10:52 +0200 +++ ghc-6.10.4/distrib/configure-bin.ac 2009-11-06 21:10:07 +0100 @@ -42,6 +42,8 @@ TargetPlatform=i386-unknown-freebsd2;; i[[3456]]86-*-freebsd[[3-9]]*) TargetPlatform=i386-unknown-freebsd;; +i[[3456]]86-*-dragonfly*) + TargetPlatform=i386-unknown-dragonfly;; i[[3456]]86-*-netbsd*) TargetPlatform=i386-unknown-netbsd;; i[[3456]]86-*-openbsd*) diff -ru ghc-6.10.4-orig/driver/mangler/ghc-asm.lprl ghc-6.10.4/driver/mangler/ghc-asm.lprl --- ghc-6.10.4-orig/driver/mangler/ghc-asm.lprl 2009-07-14 19:10:52 +0200 +++ ghc-6.10.4/driver/mangler/ghc-asm.lprl 2009-11-06 21:10:07 +0100 @@ -160,12 +160,12 @@ $T_HDR_vector = "\.text\n\t\.align 4\n"; # NB: requires padding #--------------------------------------------------------# - } elsif ( $TargetPlatform =~ /^i386-.*-(solaris2|linux|gnu|freebsd|netbsd|openbsd|kfreebsdgnu)$/m ) { + } elsif ( $TargetPlatform =~ /^i386-.*-(solaris2|linux|gnu|freebsd|dragonfly|netbsd|openbsd|kfreebsdgnu)$/m ) { $T_STABBY = 0; # 1 iff .stab things (usually if a.out format) $T_US = ''; # _ if symbols have an underscore on the front $T_PRE_APP = # regexp that says what comes before APP/NO_APP - ($TargetPlatform =~ /-(linux|gnu|freebsd|netbsd|openbsd)$/m) ? '#' : '/' ; + ($TargetPlatform =~ /-(linux|gnu|freebsd|dragonfly|netbsd|openbsd)$/m) ? '#' : '/' ; $T_CONST_LBL = '^\.LC(\d+):$'; # regexp for what such a lbl looks like $T_POST_LBL = ':'; $T_X86_PRE_LLBL_PAT = '\.L'; @@ -216,7 +216,7 @@ $T_HDR_vector = "\.text\n\t\.align 8\n"; #--------------------------------------------------------# - } elsif ( $TargetPlatform =~ /^x86_64-.*-(linux|openbsd|freebsd|netbsd)$/m ) { + } elsif ( $TargetPlatform =~ /^x86_64-.*-(linux|openbsd|freebsd|dragonfly|netbsd)$/m ) { $T_STABBY = 0; # 1 iff .stab things (usually if a.out format) $T_US = ''; # _ if symbols have an underscore on the front diff -ru ghc-6.10.4-orig/libraries/unix/System/Posix/Signals.hsc ghc-6.10.4/libraries/unix/System/Posix/Signals.hsc --- ghc-6.10.4-orig/libraries/unix/System/Posix/Signals.hsc 2009-07-14 19:20:42 +0200 +++ ghc-6.10.4/libraries/unix/System/Posix/Signals.hsc 2009-11-06 21:10:07 +0100 @@ -292,7 +292,7 @@ raiseSignal :: Signal -> IO () raiseSignal sig = throwErrnoIfMinus1_ "raiseSignal" (c_raise sig) -#if defined(__GLASGOW_HASKELL__) && (defined(openbsd_HOST_OS) || defined(freebsd_HOST_OS)) +#if defined(__GLASGOW_HASKELL__) && (defined(openbsd_HOST_OS) || defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS)) foreign import ccall unsafe "genericRaise" c_raise :: CInt -> IO CInt #else diff -ru ghc-6.10.4-orig/mk/config.mk.in ghc-6.10.4/mk/config.mk.in --- ghc-6.10.4-orig/mk/config.mk.in 2009-07-14 19:10:53 +0200 +++ ghc-6.10.4/mk/config.mk.in 2009-11-06 21:10:07 +0100 @@ -298,7 +298,7 @@ # Whether to include GHCi in the compiler. Depends on whether the RTS linker # has support for this OS/ARCH combination. -OsSupportsGHCi=$(strip $(patsubst $(HostOS_CPP), YES, $(findstring $(HostOS_CPP), mingw32 cygwin32 linux solaris2 freebsd netbsd openbsd darwin))) +OsSupportsGHCi=$(strip $(patsubst $(HostOS_CPP), YES, $(findstring $(HostOS_CPP), mingw32 cygwin32 linux solaris2 freebsd dragonfly netbsd openbsd darwin))) ArchSupportsGHCi=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 x86_64 powerpc sparc sparc64))) ifeq "$(OsSupportsGHCi)$(ArchSupportsGHCi)" "YESYES" diff -ru ghc-6.10.4-orig/rts/Linker.c ghc-6.10.4/rts/Linker.c --- ghc-6.10.4-orig/rts/Linker.c 2009-07-14 19:10:53 +0200 +++ ghc-6.10.4/rts/Linker.c 2009-11-06 21:10:07 +0100 @@ -61,12 +61,12 @@ #include <sys/wait.h> #endif -#if defined(ia64_HOST_ARCH) || defined(linux_HOST_OS) || defined(freebsd_HOST_OS) || defined(netbsd_HOST_OS) || defined(openbsd_HOST_OS) +#if defined(ia64_HOST_ARCH) || defined(linux_HOST_OS) || defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS) || defined(openbsd_HOST_OS) #define USE_MMAP #include <fcntl.h> #include <sys/mman.h> -#if defined(linux_HOST_OS) || defined(freebsd_HOST_OS) || defined(netbsd_HOST_OS) || defined(openbsd_HOST_OS) +#if defined(linux_HOST_OS) || defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS) || defined(openbsd_HOST_OS) #ifdef HAVE_UNISTD_H #include <unistd.h> #endif @@ -74,7 +74,7 @@ #endif -#if defined(linux_HOST_OS) || defined(solaris2_HOST_OS) || defined(freebsd_HOST_OS) || defined(netbsd_HOST_OS) || defined(openbsd_HOST_OS) +#if defined(linux_HOST_OS) || defined(solaris2_HOST_OS) || defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS) || defined(openbsd_HOST_OS) # define OBJFORMAT_ELF #elif defined(cygwin32_HOST_OS) || defined (mingw32_HOST_OS) # define OBJFORMAT_PEi386 @@ -1327,7 +1327,7 @@ } else { if ((W_)result > 0x80000000) { // oops, we were given memory over 2Gb -#if defined(freebsd_HOST_OS) +#if defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS) // Some platforms require MAP_FIXED. This is normally // a bad idea, because MAP_FIXED will overwrite // existing mappings. diff -ru ghc-6.10.4-orig/rts/Makefile ghc-6.10.4/rts/Makefile --- ghc-6.10.4-orig/rts/Makefile 2009-07-14 19:10:53 +0200 +++ ghc-6.10.4/rts/Makefile 2009-11-06 21:10:07 +0100 @@ -139,7 +139,7 @@ STANDARD_OPTS += -I../includes -I. -Iparallel -Ism # COMPILING_RTS is only used when building Win32 DLL support. -STANDARD_OPTS += -DCOMPILING_RTS +STANDARD_OPTS += -DCOMPILING_RTS -D_POSIX_VERSION=199309 # HC_OPTS is included in both .c and .cmm compilations, whereas CC_OPTS is # only included in .c compilations. HC_OPTS included the WAY_* opts, which diff -ru ghc-6.10.4-orig/rts/RtsUtils.c ghc-6.10.4/rts/RtsUtils.c --- ghc-6.10.4-orig/rts/RtsUtils.c 2009-07-14 19:10:52 +0200 +++ ghc-6.10.4/rts/RtsUtils.c 2009-11-06 21:10:07 +0100 @@ -461,7 +461,7 @@ * genericRaise(), rather than raise(3). */ int genericRaise(int sig) { -#if defined(THREADED_RTS) && (defined(openbsd_HOST_OS) || defined(freebsd_HOST_OS)) +#if defined(THREADED_RTS) && (defined(openbsd_HOST_OS) || defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS)) return pthread_kill(pthread_self(), sig); #else return raise(sig); _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-users |
|
|
Re: Porting to DragonFly BSD>>>>> "Goetz" == Goetz Isenmann <info@...> writes:
Goetz> Maybe you could start with something like: Goetz> $ curl -o ghc-6.10.4-3.tar.bz2 \ ; Goetz> http://www.goetz-isenmann.de/dfly/ghc-6.10.4-3.tar.bz2 $ Goetz> curl -o cabal http://www.goetz-isenmann.de/dfly/cabal $ tar Goetz> xzf ghc-6.10.4-3.tar.bz2 -C /var/tmp/isenmann $ Goetz> PATH=/var/tmp/isenmann/ghc-6.10.4-3/bin:$PATH $ ./cabal Goetz> update $ ./cabal install --user cabal-install This looks confusing to me - you name the file .bz2 yet you are saying use tar xzf to extract it (as if it were gzipped0. Whatever, I can't decompress it. -- Colin Adams Preston Lancashire _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-users |
|
|
Re: Porting to DragonFly BSDOn 06/11/2009 23:25, Goetz Isenmann wrote:
> On Wed, Nov 04, 2009 at 03:08:27PM +0000, Colin Adams wrote: >> When GHC 6.12.1 is released, I'm going to have a go at porting it to >> DragonFly BSD (32-bit incarnation). Is the porting page on the >> wikiup-to-date? > > Maybe you could start with something like: > > $ curl -o ghc-6.10.4-3.tar.bz2 \ > ; http://www.goetz-isenmann.de/dfly/ghc-6.10.4-3.tar.bz2 > $ curl -o cabal http://www.goetz-isenmann.de/dfly/cabal > $ tar xzf ghc-6.10.4-3.tar.bz2 -C /var/tmp/isenmann > $ PATH=/var/tmp/isenmann/ghc-6.10.4-3/bin:$PATH > $ ./cabal update > $ ./cabal install --user cabal-install > > I have just recompiled this ghc with itself using the attached > patches and --prefix=/var/tmp/isenmann on dragonfly 2.4.1 (32bit). > > The patches are only a stupid "do the same for dragonfly as for > freebsd" with two exceptions AFAIR: (a) use -pthread not -lthr, and > (b) this -D_POSIX_VERSION=199309 in rts/Makefile, that's most probably > the wrong way to fix a (can't remember the details) build problem. > > Until now I had no time and energie to dig deeper into the problem > [1], that looks to me, like rts/Linker cannot load any object file > that references errno. > > My guess is, that for dragonflys "extern __thread int errno;" we do > not only need to add a new case in rts/Linker.c but also need to > generate different code for this thread local storage access. Great work. I've added Dragonfly BSD to the list of Tier 2 platforms: http://hackage.haskell.org/trac/ghc/wiki/Platforms Would you be willing to be the maintainer for GHC on Dragonfly? We should get these patches into GHC. Most of them look straightforward, but I'm slightly suspicious of this: -STANDARD_OPTS += -DCOMPILING_RTS +STANDARD_OPTS += -DCOMPILING_RTS -D_POSIX_VERSION=199309 why was that necessary? Cheers, Simon _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-users |
|
|
Re: Porting to DragonFly BSDOn Mon, Nov 09, 2009 at 10:44:47AM +0000, Simon Marlow wrote:
> We should get these patches into GHC. Most of them look > straightforward, but I'm slightly suspicious of this: > > -STANDARD_OPTS += -DCOMPILING_RTS > +STANDARD_OPTS += -DCOMPILING_RTS -D_POSIX_VERSION=199309 > > why was that necessary? Good that you ask. Can't remember why it was necessary back in april to build ghc-6.10.2 on dragonfly-2.2.1. Cannot reproduce the problem today with ghc-6.10.4 on dragonfly-2.4.1. I am glad, that we do not need this define any more. I think it was a ugly workaround at best. _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-users |
|
|
Re: Porting to DragonFly BSDOn November 9, 2009 12:39:25 Goetz Isenmann wrote:
> On Mon, Nov 09, 2009 at 10:44:47AM +0000, Simon Marlow wrote: > > We should get these patches into GHC. Most of them look > > straightforward, but I'm slightly suspicious of this: > > > > -STANDARD_OPTS += -DCOMPILING_RTS > > +STANDARD_OPTS += -DCOMPILING_RTS -D_POSIX_VERSION=199309 > > > > why was that necessary? > > Good that you ask. Can't remember why it was necessary back in april > to build ghc-6.10.2 on dragonfly-2.2.1. Cannot reproduce the problem > today with ghc-6.10.4 on dragonfly-2.4.1. > > I am glad, that we do not need this define any more. I think it was a > ugly workaround at best. glibc under Linux. For example, "man feature_test_macros" says you need to define _POSIX_C_SOURCE to 199309 or greater to use POSIX.1b functionality. Cheers! -Tyson _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-users |
|
|
Re: Porting to DragonFly BSD>>>>> "Goetz" == Goetz Isenmann <info@...> writes:
Goetz> Until now I had no time and energie to dig deeper into the Goetz> problem [1], that looks to me, like rts/Linker cannot load Goetz> any object file that references errno. Goetz> My guess is, that for dragonflys "extern __thread int Goetz> errno;" we do not only need to add a new case in Goetz> rts/Linker.c but also need to generate different code for Goetz> this thread local storage access. Goetz> [1] $ ghci GHCi, version 6.10.4: Goetz> http://www.haskell.org/ghc/ :? for help Loading package Goetz> ghc-prim ... linking ... done. Loading package integer Goetz> ... linking ... done. ghc: Goetz> /var/tmp/isenmann/ghc-6.10.4-3/lib/ghc-6.10.4/base-4.1.0.0/HSbase-4.1.0.0.o: Goetz> unhandled ELF relocation(Rel) type 15 Goetz> Loading package base ... linking ... ghc: unable to load Goetz> package `base' After some googling, and learning very little, I speclated that simply adding a third line for R_386_TLS_IE with the same action as the first line - just storing value, might work: case R_386_TLS_IE: *pP = value; break; This seems to work up to a point. That is I get no crashes in ghci. I do appear to have some line-feed problems. So if I type: Prelude> let x = 10 It appears to do nothing, but that is not the case - I can then overtype with :t x and ghci responds with: x :: Integerxx = 10 Prelude> So maybe this is a readline/haskelline issue? I then tried a cabal install of my website application. This fails, but I think it is because I need to apply various patches to haskelldb modules that are not yet in hackage. -- Colin Adams Preston Lancashire _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-users |
|
|
Re: Porting to DragonFly BSDOn Sat, Nov 14, 2009 at 04:16:58PM +0000, Colin Paul Adams wrote:
> Goetz> Until now I had no time and energie to dig deeper into the > Goetz> problem [1], that looks to me, like rts/Linker cannot load > Goetz> any object file that references errno. Seems to be worse when I try to build snapshot ghc-6.13.20091111. I get a relocation error much earlier during the stage2 build. > Goetz> My guess is, that for dragonflys "extern __thread int > Goetz> errno;" we do not only need to add a new case in > Goetz> rts/Linker.c but also need to generate different code for > Goetz> this thread local storage access. I am still not sure, but the generated code might be ok 001e5565 <__hscore_get_errno>: 1e5565: 55 push %ebp 1e5566: 89 e5 mov %esp,%ebp 1e5568: 65 a1 00 00 00 00 mov %gs:0x0,%eax 1e556e: 8b 15 00 00 00 00 mov 0x0,%edx 1e5574: 8b 04 10 mov (%eax,%edx,1),%eax 1e5577: c9 leave 1e5578: c3 ret The corresponding relocation info is 001e5570 R_386_TLS_IE errno > Goetz> [1] $ ghci GHCi, version 6.10.4: > Goetz> http://www.haskell.org/ghc/ :? for help Loading package > Goetz> ghc-prim ... linking ... done. Loading package integer > Goetz> ... linking ... done. ghc: > Goetz> /var/tmp/isenmann/ghc-6.10.4-3/lib/ghc-6.10.4/base-4.1.0.0/HSbase-4.1.0.0.o: > Goetz> unhandled ELF relocation(Rel) type 15 > > Goetz> Loading package base ... linking ... ghc: unable to load > Goetz> package `base' > > After some googling, and learning very little, I speclated that simply > adding a third line for R_386_TLS_IE with the same action as the first > line - just storing value, might work: > > case R_386_TLS_IE: *pP = value; break; > > This seems to work up to a point. That is I get no crashes in ghci. simple will work. At least it should pass this test: When you try to open a file that does not exist Prelude> System.IO.openFile "xxx" System.IO.ReadMode you should get *** Exception: xxx: openFile: does not exist (No such file or directory) and not (Unknown error: ...). My current strategie is, to avoid the problem in a first step. With the attached errno_ptr.{h,c} I create a shared library, that encapsulates the errno access, install the header file as /usr/pkg/include/errno_ptr.h and the shared lib as /usr/pkg/lib/liberrno_ptr.so Building ghc-6.10.4 with the attached patch (only a quick hack, to check the idea) I get a result, that looks much better. @Colin: Maybe you can test and use this hack. @Simon: I am not sure, in which direction I should look for solving this problem: 1. Avoid the tls problem a) Try to convince the dragonfly people, that it might be useful, to have something like the errno access wrapper in libc. b) If (1a) fails, try to create a patch for netbsd pkgsrc and/or ghc, so that an access wrapper will be created and installed as part of a ghc installation on dragonfly. 2. Fix the problem a) Try to add the necessary logic into the ghc runtime. b) Try to use the platforms loader. Have no clue, if and how (2a) or (2b) are possible, where to get some help or at least the necessary information. Goetz int *errno_ptr(void); #include <errno.h> #include <errno_ptr.h> int *errno_ptr(void) { return (&errno); } #! /bin/sh gcc -shared -o liberrno_ptr.so -I. -fPIC -O2 errno_ptr.c diff -ru ghc-6.10.4/compiler/nativeGen/NCG.h ghc-6.10.4-dfly-5/compiler/nativeGen/NCG.h --- ghc-6.10.4/compiler/nativeGen/NCG.h 2009-07-14 19:10:51 +0200 +++ ghc-6.10.4-dfly-5/compiler/nativeGen/NCG.h 2009-11-11 17:53:20 +0100 @@ -38,6 +38,12 @@ # define IF_OS_freebsd(x,y) y #endif -- - - - - - - - - - - - - - - - - - - - - - +#if dragonfly_TARGET_OS +# define IF_OS_dragonfly(x,y) x +#else +# define IF_OS_dragonfly(x,y) y +#endif +-- - - - - - - - - - - - - - - - - - - - - - #if netbsd_TARGET_OS # define IF_OS_netbsd(x,y) x #else diff -ru ghc-6.10.4/configure ghc-6.10.4-dfly-5/configure --- ghc-6.10.4/configure 2009-07-14 19:24:26 +0200 +++ ghc-6.10.4-dfly-5/configure 2009-11-11 17:53:20 +0100 @@ -2307,6 +2307,15 @@ HostVendor_CPP='unknown' HostOS_CPP='freebsd' ;; +i[3456]86-*-dragonfly*) + HostPlatform=i386-unknown-dragonfly # hack again + TargetPlatform=i386-unknown-dragonfly + BuildPlatform=i386-unknown-dragonfly + HostPlatform_CPP='i386_unknown_dragonfly' + HostArch_CPP='i386' + HostVendor_CPP='unknown' + HostOS_CPP='dragonfly' + ;; i[3456]86-*-freebsd2*) # Older FreeBSDs are a.out HostPlatform=i386-unknown-freebsd2 # hack again TargetPlatform=i386-unknown-freebsd2 diff -ru ghc-6.10.4/configure.ac ghc-6.10.4-dfly-5/configure.ac --- ghc-6.10.4/configure.ac 2009-07-14 19:10:53 +0200 +++ ghc-6.10.4-dfly-5/configure.ac 2009-11-11 17:53:20 +0100 @@ -260,6 +260,15 @@ HostVendor_CPP='unknown' HostOS_CPP='freebsd' ;; +i[[3456]]86-*-dragonfly*) + HostPlatform=i386-unknown-dragonfly # hack again + TargetPlatform=i386-unknown-dragonfly + BuildPlatform=i386-unknown-dragonfly + HostPlatform_CPP='i386_unknown_dragonfly' + HostArch_CPP='i386' + HostVendor_CPP='unknown' + HostOS_CPP='dragonfly' + ;; i[[3456]]86-*-freebsd2*) # Older FreeBSDs are a.out HostPlatform=i386-unknown-freebsd2 # hack again TargetPlatform=i386-unknown-freebsd2 diff -ru ghc-6.10.4/distrib/configure-bin.ac ghc-6.10.4-dfly-5/distrib/configure-bin.ac --- ghc-6.10.4/distrib/configure-bin.ac 2009-07-14 19:10:52 +0200 +++ ghc-6.10.4-dfly-5/distrib/configure-bin.ac 2009-11-11 17:53:20 +0100 @@ -42,6 +42,8 @@ TargetPlatform=i386-unknown-freebsd2;; i[[3456]]86-*-freebsd[[3-9]]*) TargetPlatform=i386-unknown-freebsd;; +i[[3456]]86-*-dragonfly*) + TargetPlatform=i386-unknown-dragonfly;; i[[3456]]86-*-netbsd*) TargetPlatform=i386-unknown-netbsd;; i[[3456]]86-*-openbsd*) diff -ru ghc-6.10.4/driver/mangler/ghc-asm.lprl ghc-6.10.4-dfly-5/driver/mangler/ghc-asm.lprl --- ghc-6.10.4/driver/mangler/ghc-asm.lprl 2009-07-14 19:10:52 +0200 +++ ghc-6.10.4-dfly-5/driver/mangler/ghc-asm.lprl 2009-11-11 17:53:20 +0100 @@ -160,12 +160,12 @@ $T_HDR_vector = "\.text\n\t\.align 4\n"; # NB: requires padding #--------------------------------------------------------# - } elsif ( $TargetPlatform =~ /^i386-.*-(solaris2|linux|gnu|freebsd|netbsd|openbsd|kfreebsdgnu)$/m ) { + } elsif ( $TargetPlatform =~ /^i386-.*-(solaris2|linux|gnu|freebsd|dragonfly|netbsd|openbsd|kfreebsdgnu)$/m ) { $T_STABBY = 0; # 1 iff .stab things (usually if a.out format) $T_US = ''; # _ if symbols have an underscore on the front $T_PRE_APP = # regexp that says what comes before APP/NO_APP - ($TargetPlatform =~ /-(linux|gnu|freebsd|netbsd|openbsd)$/m) ? '#' : '/' ; + ($TargetPlatform =~ /-(linux|gnu|freebsd|dragonfly|netbsd|openbsd)$/m) ? '#' : '/' ; $T_CONST_LBL = '^\.LC(\d+):$'; # regexp for what such a lbl looks like $T_POST_LBL = ':'; $T_X86_PRE_LLBL_PAT = '\.L'; @@ -216,7 +216,7 @@ $T_HDR_vector = "\.text\n\t\.align 8\n"; #--------------------------------------------------------# - } elsif ( $TargetPlatform =~ /^x86_64-.*-(linux|openbsd|freebsd|netbsd)$/m ) { + } elsif ( $TargetPlatform =~ /^x86_64-.*-(linux|openbsd|freebsd|dragonfly|netbsd)$/m ) { $T_STABBY = 0; # 1 iff .stab things (usually if a.out format) $T_US = ''; # _ if symbols have an underscore on the front diff -ru ghc-6.10.4/libraries/base/base.cabal ghc-6.10.4-dfly-5/libraries/base/base.cabal --- ghc-6.10.4/libraries/base/base.cabal 2009-07-14 19:13:10 +0200 +++ ghc-6.10.4-dfly-5/libraries/base/base.cabal 2009-11-14 22:40:17 +0100 @@ -164,12 +164,14 @@ cbits/dirUtils.c cbits/inputReady.c cbits/selectUtils.c - include-dirs: include + include-dirs: include /usr/pkg/include includes: HsBase.h install-includes: HsBase.h HsBaseConfig.h WCsubst.h dirUtils.h consUtils.h Typeable.h if os(windows) { extra-libraries: wsock32, user32, shell32 } + extra-lib-dirs: /usr/pkg/lib + extra-libraries: errno_ptr extensions: CPP -- We need to set the package name to base (without a version number) -- as it's magic. diff -ru ghc-6.10.4/libraries/base/include/HsBase.h ghc-6.10.4-dfly-5/libraries/base/include/HsBase.h --- ghc-6.10.4/libraries/base/include/HsBase.h 2009-07-14 19:13:10 +0200 +++ ghc-6.10.4-dfly-5/libraries/base/include/HsBase.h 2009-11-14 22:41:12 +0100 @@ -53,7 +53,7 @@ #endif #endif #if HAVE_ERRNO_H -#include <errno.h> +#include <errno_ptr.h> #endif #if HAVE_STRING_H #include <string.h> @@ -220,8 +220,8 @@ # endif #endif -INLINE int __hscore_get_errno(void) { return errno; } -INLINE void __hscore_set_errno(int e) { errno = e; } +INLINE int __hscore_get_errno(void) { return *errno_ptr(); } +INLINE void __hscore_set_errno(int e) { *errno_ptr() = e; } #if !defined(_MSC_VER) INLINE int __hscore_s_isreg(mode_t m) { return S_ISREG(m); } diff -ru ghc-6.10.4/libraries/process/cbits/runProcess.c ghc-6.10.4-dfly-5/libraries/process/cbits/runProcess.c --- ghc-6.10.4/libraries/process/cbits/runProcess.c 2009-07-14 19:19:22 +0200 +++ ghc-6.10.4-dfly-5/libraries/process/cbits/runProcess.c 2009-11-14 22:43:20 +0100 @@ -13,6 +13,7 @@ #if !(defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)) #include "execvpe.h" +#include <errno_ptr.h> /* ---------------------------------------------------------------------------- UNIX versions @@ -215,7 +216,7 @@ else if (WIFSIGNALED(wstat)) { - errno = EINTR; + *errno_ptr() = EINTR; return -1; } else @@ -226,7 +227,7 @@ if (res == 0) return 0; - if (errno == ECHILD) + if (*errno_ptr() == ECHILD) { *pExitCode = 0; return 1; @@ -241,7 +242,7 @@ while (waitpid(handle, &wstat, 0) < 0) { - if (errno != EINTR) + if (*errno_ptr() != EINTR) { return -1; } diff -ru ghc-6.10.4/libraries/unix/System/Posix/Signals.hsc ghc-6.10.4-dfly-5/libraries/unix/System/Posix/Signals.hsc --- ghc-6.10.4/libraries/unix/System/Posix/Signals.hsc 2009-07-14 19:20:42 +0200 +++ ghc-6.10.4-dfly-5/libraries/unix/System/Posix/Signals.hsc 2009-11-11 17:53:20 +0100 @@ -292,7 +292,7 @@ raiseSignal :: Signal -> IO () raiseSignal sig = throwErrnoIfMinus1_ "raiseSignal" (c_raise sig) -#if defined(__GLASGOW_HASKELL__) && (defined(openbsd_HOST_OS) || defined(freebsd_HOST_OS)) +#if defined(__GLASGOW_HASKELL__) && (defined(openbsd_HOST_OS) || defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS)) foreign import ccall unsafe "genericRaise" c_raise :: CInt -> IO CInt #else diff -ru ghc-6.10.4/libraries/unix/cbits/execvpe.c ghc-6.10.4-dfly-5/libraries/unix/cbits/execvpe.c --- ghc-6.10.4/libraries/unix/cbits/execvpe.c 2009-07-14 19:20:42 +0200 +++ ghc-6.10.4-dfly-5/libraries/unix/cbits/execvpe.c 2009-11-14 22:42:15 +0100 @@ -18,7 +18,7 @@ #include <sys/time.h> #include <stdlib.h> #include <string.h> -#include <errno.h> +#include <errno_ptr.h> /* * We want the search semantics of execvp, but we want to provide our @@ -115,7 +115,7 @@ retry: (void) execve(bp, argv, envp); - switch (errno) { + switch (*errno_ptr()) { case EACCES: eacces = 1; break; @@ -147,9 +147,9 @@ } } if (eacces) - errno = EACCES; - else if (!errno) - errno = ENOENT; + *errno_ptr() = EACCES; + else if (!*errno_ptr()) + *errno_ptr() = ENOENT; done: if (path) free(path); diff -ru ghc-6.10.4/mk/config.mk.in ghc-6.10.4-dfly-5/mk/config.mk.in --- ghc-6.10.4/mk/config.mk.in 2009-07-14 19:10:53 +0200 +++ ghc-6.10.4-dfly-5/mk/config.mk.in 2009-11-11 17:53:20 +0100 @@ -298,7 +298,7 @@ # Whether to include GHCi in the compiler. Depends on whether the RTS linker # has support for this OS/ARCH combination. -OsSupportsGHCi=$(strip $(patsubst $(HostOS_CPP), YES, $(findstring $(HostOS_CPP), mingw32 cygwin32 linux solaris2 freebsd netbsd openbsd darwin))) +OsSupportsGHCi=$(strip $(patsubst $(HostOS_CPP), YES, $(findstring $(HostOS_CPP), mingw32 cygwin32 linux solaris2 freebsd dragonfly netbsd openbsd darwin))) ArchSupportsGHCi=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 x86_64 powerpc sparc sparc64))) ifeq "$(OsSupportsGHCi)$(ArchSupportsGHCi)" "YESYES" diff -ruN ghc-6.10.4-orig/rts/Linker.c ghc-6.10.4/rts/Linker.c --- ghc-6.10.4-orig/rts/Linker.c 2009-07-14 19:10:53 +0200 +++ ghc-6.10.4/rts/Linker.c 2009-11-27 09:49:16 +0100 @@ -61,12 +61,12 @@ #include <sys/wait.h> #endif -#if defined(ia64_HOST_ARCH) || defined(linux_HOST_OS) || defined(freebsd_HOST_OS) || defined(netbsd_HOST_OS) || defined(openbsd_HOST_OS) +#if defined(ia64_HOST_ARCH) || defined(linux_HOST_OS) || defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS) || defined(openbsd_HOST_OS) #define USE_MMAP #include <fcntl.h> #include <sys/mman.h> -#if defined(linux_HOST_OS) || defined(freebsd_HOST_OS) || defined(netbsd_HOST_OS) || defined(openbsd_HOST_OS) +#if defined(linux_HOST_OS) || defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS) || defined(openbsd_HOST_OS) #ifdef HAVE_UNISTD_H #include <unistd.h> #endif @@ -74,7 +74,7 @@ #endif -#if defined(linux_HOST_OS) || defined(solaris2_HOST_OS) || defined(freebsd_HOST_OS) || defined(netbsd_HOST_OS) || defined(openbsd_HOST_OS) +#if defined(linux_HOST_OS) || defined(solaris2_HOST_OS) || defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS) || defined(openbsd_HOST_OS) # define OBJFORMAT_ELF #elif defined(cygwin32_HOST_OS) || defined (mingw32_HOST_OS) # define OBJFORMAT_PEi386 @@ -1327,7 +1327,7 @@ } else { if ((W_)result > 0x80000000) { // oops, we were given memory over 2Gb -#if defined(freebsd_HOST_OS) +#if defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS) // Some platforms require MAP_FIXED. This is normally // a bad idea, because MAP_FIXED will overwrite // existing mappings. diff -ru ghc-6.10.4/rts/RtsUtils.c ghc-6.10.4-dfly-5/rts/RtsUtils.c --- ghc-6.10.4/rts/RtsUtils.c 2009-07-14 19:10:52 +0200 +++ ghc-6.10.4-dfly-5/rts/RtsUtils.c 2009-11-11 17:53:20 +0100 @@ -461,7 +461,7 @@ * genericRaise(), rather than raise(3). */ int genericRaise(int sig) { -#if defined(THREADED_RTS) && (defined(openbsd_HOST_OS) || defined(freebsd_HOST_OS)) +#if defined(THREADED_RTS) && (defined(openbsd_HOST_OS) || defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS)) return pthread_kill(pthread_self(), sig); #else return raise(sig); --- ghc-6.10.4/libraries/base/cbits/inputReady.c-orig 2009-07-14 19:13:10 +0200 +++ ghc-6.10.4/libraries/base/cbits/inputReady.c 2009-11-14 23:24:53 +0100 @@ -7,6 +7,8 @@ /* select and supporting types is not Posix */ /* #include "PosixSource.h" */ #include "HsBase.h" +#include <errno.h> +#include <errno_ptr.h> /* * inputReady(fd) checks to see whether input is available on the file @@ -42,7 +44,7 @@ tv.tv_usec = (msecs % 1000) * 1000; while ((ready = select(maxfd, &rfd, &wfd, NULL, &tv)) < 0 ) { - if (errno != EINTR ) { + if (*errno_ptr() != EINTR ) { return -1; } } _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-users |
|
|
Re: Porting to DragonFly BSD>>>>> "Goetz" == Goetz Isenmann <info@...> writes:
Goetz> @Colin: Maybe you can test and use this hack. I won't have any time for the next three weeks (work then holiday). -- Colin Adams Preston Lancashire _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-users |
|
|
Re: Porting to DragonFly BSDOn Nov 14, 2009, at 11:16 , Colin Paul Adams wrote:
> This seems to work up to a point. That is I get no crashes in ghci. > > I do appear to have some line-feed problems. So if I type: > > Prelude> let x = 10 > > It appears to do nothing, but that is not the case - I can then > overtype with :t x and ghci responds with: > > x :: Integerxx = 10 > Prelude> > > So maybe this is a readline/haskelline issue? -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@... system administrator [openafs,heimdal,too many hats] allbery@... electrical and computer engineering, carnegie mellon university KF8NH _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-users |
|
|
Re: Porting to DragonFly BSDOn 15/11/2009 12:42, Goetz Isenmann wrote:
> @Simon: I am not sure, in which direction I should look for solving > this problem: > > 1. Avoid the tls problem > a) Try to convince the dragonfly people, that it might be useful, > to have something like the errno access wrapper in libc. > b) If (1a) fails, try to create a patch for netbsd pkgsrc and/or > ghc, so that an access wrapper will be created and installed > as part of a ghc installation on dragonfly. You can write an access wrapper for errno, compile it into a .so shared object, and have GHCi load the .so. > 2. Fix the problem > a) Try to add the necessary logic into the ghc runtime. Have a look at what the system's linker does to resolve this reference: compile a C program, load it up into gdb, and disassemble the code. > b) Try to use the platforms loader. See above. Also when we have a dynamically linked GHCi this problem will partly go away for you (http://hackage.haskell.org/trac/ghc/ticket/3658). Cheers, Simon _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-users |
|
|
Re: Porting to DragonFly BSDOn November 15, 2009 07:42:46 Goetz Isenmann wrote:
> I am still not sure, but the generated code might be ok > > 001e5565 <__hscore_get_errno>: > 1e5565: 55 push %ebp > 1e5566: 89 e5 mov %esp,%ebp > 1e5568: 65 a1 00 00 00 00 mov %gs:0x0,%eax > 1e556e: 8b 15 00 00 00 00 mov 0x0,%edx > 1e5574: 8b 04 10 mov (%eax,%edx,1),%eax > 1e5577: c9 leave > 1e5578: c3 ret > > The corresponding relocation info is > > 001e5570 R_386_TLS_IE errno executable model . It is assuming that the TLS memory has already been allocated and is at the location pointed to by the word at %gs:0x0. The default when working with position-independent code is the dynamic model. It has to go through ___tls_get_addr in order to give the dynamic loader a chance to allocate the thread local storage memory if this is the first access The GNU variant of the code for this model is 0x00 leal x@tlsgd(,%ebx,1),%eax 0x07 call ___tls_get_addr@plt It returns the address in eax. The two relocation are R_386_TLS_GD to load eax to point to the GOT entry for the desired symbol and R_386_PLT32 for the call ___tls_get_addr. For more details on the four different modes (each one is a successive optimization of the general dynamic model for cases where the symbol is in the some shared object and/or the TLS memory is know to be allocated) http://people.redhat.com/drepper/tls.pdf (pages 19, 27, 36, and 44 give the code for the fully generic and each combination of the optimizations respectively). Under gcc you can specify the model via the "-ftls-model=<model>" option or on a per-identifier basis with __attribute__((tls_model("<model>"))). Besides changing what code is emitted, it sets the STATIC_TLS flag in the dynamic section to tell force allocation at thread creation if required. Cheers! -Tyson _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-users |
|
|
Re: Porting to DragonFly BSDOn November 15, 2009 07:42:46 Goetz Isenmann wrote:
> 001e5565 <__hscore_get_errno>: > 1e5565: 55 push %ebp > 1e5566: 89 e5 mov %esp,%ebp > 1e5568: 65 a1 00 00 00 00 mov %gs:0x0,%eax > 1e556e: 8b 15 00 00 00 00 mov 0x0,%edx > 1e5574: 8b 04 10 mov (%eax,%edx,1),%eax > 1e5577: c9 leave > 1e5578: c3 ret > > The corresponding relocation info is > > 001e5570 R_386_TLS_IE errno > > > After some googling, and learning very little, I speclated that simply > > adding a third line for R_386_TLS_IE with the same action as the first > > line - just storing value, might work: > > > > case R_386_TLS_IE: *pP = value; break; > > > > This seems to work up to a point. That is I get no crashes in ghci. to the absolute address of the GOT [global offset table] slot" that is assigned to the TLS (thread local storage) symbol. http://people.redhat.com/drepper/tls.pdf (middle of page 37) The GOT slot is assigned a R_386_TLS_TPOFF relocation for the symbol. So, what you are suppose to get is: 1- While linking, the linker resolves the R_386_TLS_IE relocation by updating the instruction with the absolute address of the corresponding GOT slot. 2- While loading, the dynamic linker resolves the R_386_TLS_TPOFF relocation by updating the GOT slot to contain the offset of the symbol relative to the TLS pointer (which is stored at %gs:0x0). 3- The program then computes the address of the TLS variable by loading the TLS pointer (the "mov %gs:0x0,%eax" instruction) and adding to it the symbols TLS offset as stored in the GOT table (the updated "mov 0x0,%edx" instruction). Cheers! -Tyson _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-users |
|
|
Re: Porting to DragonFly BSDSorry, are there any advancements in dragonflybsd port of ghc?
-- aycan _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-users |
|
|
Re: Porting to DragonFly BSDOn Thu, Nov 26, 2009 at 08:38:35PM +0200, Aycan iRiCAN wrote:
> Sorry, are there any advancements in dragonflybsd port of ghc? I am still using the patches and the errno access wrapper, that were attached to my last message. If you need a bootstrap compiler, you can download http://www.goetz-isenmann.de/dfly/ghc-6.10.4-dfly-5.tar.bz2, extract this into /var/tmp, download http://www.goetz-isenmann.de/dfly/liberrno_ptr.so, and put this into /usr/pkg/lib. Have not noticed any problems with this configuration so far. And since this works for me, I currently prefer to learn haskell. As time permits, I also like (a) to read about the upcoming ghc shared library support, (b) to read the tls documentation, and (c) to get something into pkgsrc, that will give use a working ghc for dragonfly But I fear, that this will not happen during the next few weeks. _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-users |
|
|
Re: Porting to DragonFly BSD>>>>> "Goetz" == Goetz Isenmann <info@...> writes:
Goetz> My current strategie is, to avoid the problem in a first Goetz> step. Goetz> With the attached errno_ptr.{h,c} I create a shared Goetz> library, that encapsulates the errno access, install the Goetz> header file as /usr/pkg/include/errno_ptr.h and the shared Goetz> lib as /usr/pkg/lib/liberrno_ptr.so Goetz> Building ghc-6.10.4 with the attached patch (only a quick Goetz> hack, to check the idea) I get a result, that looks much Goetz> better. Goetz> @Colin: Maybe you can test and use this hack. I've finally got round to trying this. I'm having a problem which maybe has a simple known solution. What I have done so far: 1) Built and deployed the shared library as detailed above 2) Applied the diff with patch <diff-name 3) cd chc-6.10.4 4) ./configure 5) make Make immediately fails with: "./mk/boilerplate.mk", line 41: Need an operator "./mk/boilerplate.mk", line 44: Need an operator "./mk/config.mk", line 29: Need an operator "./mk/config.mk", line 30: Need an operator "./mk/config.mk", line 31: Need an operator "./mk/config.mk", line 32: Need an operator "./mk/config.mk", line 33: Need an operator "./mk/config.mk", line 169: Need an operator "./mk/config.mk", line 171: Need an operator "./mk/config.mk", line 173: Need an operator "./mk/config.mk", line 196: Need an operator "./mk/config.mk", line 210: Need an operator "./mk/config.mk", line 268: Need an operator "./mk/config.mk", line 270: Need an operator "./mk/config.mk", line 272: Need an operator Error expanding embedded variable. I'm not exactly familiar with makefile syntax, so I could see anything that rang alarm bells. Line 41 looks like: ifneq "$(way)" "" -- Colin Adams Preston Lancashire _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-users |
|
|
Re: Porting to DragonFly BSDOn Tue, Dec 15, 2009 at 12:53 PM, Colin Paul Adams
<colin@...> wrote: > > [..snip..] > > I've finally got round to trying this. I'm having a problem which > maybe has a simple known solution. > > What I have done so far: > > 1) Built and deployed the shared library as detailed above > 2) Applied the diff with patch <diff-name > 3) cd chc-6.10.4 > 4) ./configure > 5) make You should use gmake instead of make. > Make immediately fails with: > > "./mk/boilerplate.mk", line 41: Need an operator > "./mk/boilerplate.mk", line 44: Need an operator > > [..snip..] -- Thanos Tsouanas http://mpla.math.uoa.gr/~thanos/ _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-users |
|
|
|
| < Prev | 1 - 2 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |