Status and future of the LLVM backend

Joachim Breitner mail at joachim-breitner.de
Mon Dec 8 14:49:07 UTC 2014


Hi,


Am Montag, den 08.12.2014, 08:20 -0500 schrieb Ben Gamari:
> > Again Google finds me a bug, but this time one that has no fix
> > associated with it:
> > https://ghc.haskell.org/trac/ghc/ticket/8951
> >
> > Ben, can you help me out here?
> >
> I've been unable to reproduce this issue in my environment. The build
> succeeded using your packaging on my Odroid XU running Debian Jessie.

Weird. Can you try creating a sid chroot and building it in there?

I managed to finish the build with this patch attached:

Index: ghc-7.8.20141119/includes/stg/SMP.h
===================================================================
--- ghc-7.8.20141119.orig/includes/stg/SMP.h
+++ ghc-7.8.20141119/includes/stg/SMP.h
@@ -14,13 +14,13 @@
 #ifndef SMP_H
 #define SMP_H
 
-#if defined(THREADED_RTS)
-
 #if arm_HOST_ARCH && defined(arm_HOST_ARCH_PRE_ARMv6)
 void arm_atomic_spin_lock(void);
 void arm_atomic_spin_unlock(void);
 #endif
 
+#if defined(THREADED_RTS)
+
 /* ----------------------------------------------------------------------------
    Atomic operations
    ------------------------------------------------------------------------- */
Index: ghc-7.8.20141119/rts/OldARMAtomic.c
===================================================================
--- ghc-7.8.20141119.orig/rts/OldARMAtomic.c
+++ ghc-7.8.20141119/rts/OldARMAtomic.c
@@ -14,8 +14,6 @@
 #include <sched.h>
 #endif
 
-#if defined(THREADED_RTS)
-
 #if arm_HOST_ARCH && defined(arm_HOST_ARCH_PRE_ARMv6)
 
 static volatile int atomic_spin = 0;
@@ -51,6 +49,3 @@ void arm_atomic_spin_unlock()
 } 
 
 #endif  /* arm_HOST_ARCH && defined(arm_HOST_ARCH_PRE_ARMv6) */
-
-#endif  /* defined(THREADED_RTS) */
-


So what does that tell us? Maybe Peter can help us: Is it normal for a
Debian system to pretend that its a pre-v6 ARM, even if the actual
hardware is not?

> Unfortunately every subsequent build seems to fail with this
> build system issue,
> 
>     ...
>     "inplace/bin/ghc-cabal" configure libraries/integer-gmp dist-install "" --with-ghc="/mnt/ext/ghc/debian/ghc-7.8.20141119/inplace/bin/ghc-stage1" --with-ghc-pkg="/mnt/ext/ghc/debian/ghc-7.8.20141119/inplace/bin/gh
>     c-pkg"  --disable-library-for-ghci --enable-library-vanilla --enable-library-profiling --enable-shared --with-hscolour="/usr/bin/HsColour" --configure-option=CFLAGS=" -fno-stack-protector   " --configure-option=L
>     DFLAGS="   " --configure-option=CPPFLAGS="   " --gcc-options=" -fno-stack-protector       " --with-gcc="/usr/bin/gcc" --with-ld="/usr/bin/ld" --configure-option=--with-cc="/usr/bin/gcc" --with-ar="/usr/bin/ar" --
>     with-ranlib="/usr/bin/ranlib" --with-alex="/home/ben/.cabal/bin/alex" --with-happy="/home/ben/.cabal/bin/happy"
>     Configuring integer-gmp-0.5.1.0...
>     configure: WARNING: unrecognized options: --with-compiler, --with-gcc
>     configure: error: cannot run /bin/bash ./config.sub
>     libraries/integer-gmp/ghc.mk:4: recipe for target 'libraries/integer-gmp/dist-install/package-data.mk' failed
> 
> It seems that this is likely due to dh_autoreconf which overwrites all
> config.subs with /usr/share/misc/config.sub. It's totally unclear to me
> how the first build succeeded, however.
> 
> Have you seen this in the past?

Yes, likely a bug in dh_autoreconf that does not handle rebuilds well
(or a bug in how we use it).

Until that is fixed I use
rm -rf ghc-7.8.20141119 && dpkg-source -x ghc_7.8.20141119-6.dsc && cd
ghc-7.8.20141119/ && schroot -r -c ghc -- debuild -uc -us

to get a clean state again. I’ll have to look into that eventually.
Autoconf is a mess.

Greetings,
Joachim

-- 
Joachim “nomeata” Breitner
  mail at joachim-breitner.dehttp://www.joachim-breitner.de/
  Jabber: nomeata at joachim-breitner.de  • GPG-Key: 0xF0FBF51F
  Debian Developer: nomeata at debian.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20141208/b14dee7b/attachment.sig>


More information about the ghc-devs mailing list