Bug#910664: ghc: ghc package can no longer be cross-compiled

John Paul Adrian Glaubitz glaubitz at physik.fu-berlin.de
Tue Oct 9 14:09:48 BST 2018


Source: ghc
Version: 8.4.3+dfsg1-2
Severity: normal
User: helmutg at debian.org
Usertags: rebootstrap

Hello!

Trying to cross-compile the ghc package using "sbuild --host=$ARCH" now fails
with:

dh_auto_configure -- \
        --target sh4-linux-gnu --enable-unregisterised --with-ghc="/usr/bin/ghc" \
        --with-system-libffi --libdir=/usr/lib
        ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=\${prefix}/include --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=\${prefix}/lib/sh4-linux-gnu --libexecdir=\${prefix}/lib/sh4-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --host=sh4-linux-gnu --target sh4-linux-gnu --enable-unregisterised --with-ghc=/usr/bin/ghc --with-system-libffi --libdir=/usr/lib
configure: WARNING: unrecognized options: --disable-silent-rules, --disable-maintainer-mode, --disable-dependency-tracking
configure: loading site script /etc/dpkg-cross/cross-config.sh4
/etc/dpkg-cross/cross-config.sh: line 49: syntax error near unexpected token `fi'
/etc/dpkg-cross/cross-config.sh: line 49: `fi'
checking for gfind... no
checking for find... /usr/bin/find
checking for sort... /usr/bin/sort
checking for GHC Git commit id... given 51abb1c88b53e2989a2a8c2939ac4abc04bef194
checking version of ghc... 8.4.3
checking build system type... x86_64-pc-linux-gnu
checking host system type... sh4-unknown-linux-gnu
checking target system type... sh4-unknown-linux-gnu
GHC build  : x86_64-unknown-linux
GHC host   : sh4-unknown-linux
GHC target : sh4-unknown-linux
LLVM target: sh4-unknown-linux
checking for path to top of build tree... /<<BUILDDIR>>/ghc-8.4.3+dfsg1
configure: error:
You've selected:

  BUILD:  x86_64-unknown-linux   (the architecture we're building on)
  HOST:   sh4-unknown-linux    (the architecture the compiler we're building will execute on)
  TARGET: sh4-unknown-linux  (the architecture the compiler we're building will produce code for)

BUILD must equal HOST; that is, we do not support building GHC itself
with a cross-compiler.  To cross-compile GHC itself, set TARGET: stage
1 will be a cross-compiler, and stage 2 will be the cross-compiled
GHC.

>From the error message it looks like, we need to strip "--host=$ARCH" from the
configure line and just use "--target=$ARCH" for that.

Thanks,
Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz at debian.org
`. `'   Freie Universitaet Berlin - glaubitz at physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



More information about the Pkg-haskell-maintainers mailing list