Cross-compiling from x86_64-unknown-linux-gnu to x86_64-sun-solaris2 with mkGmpConstants workaround fails to build objects for integer-gmp
Here is the script I used to get build dependencies:
sudo apt-get update
sudo apt-get install --assume-yes ghc libncurses5-dev \
mesa-common-dev freeglut3-dev libedit-dev
cabal install happy alex haddock
Here is the build bootstrap script I am using on a clean Ubuntu 13.04 install:
{{{ #!/bin/bash export TARGET=x86_64-sun-solaris2.11 export PREFIX=$HOME/Documents/gcc/cross/$TARGET export SYSROOT=$PREFIX/sysroot export PATH=$PATH:$PREFIX/bin
export GCC=$PREFIX/bin/$TARGET-gcc export LD=$PREFIX/bin/$TARGET-ld export NM=$PREFIX/bin/$TARGET-nm export OBJDUMP=$PREFIX/bin/$TARGET-objdump
git clone git://github.com/ghc/ghc pushd ghc echo "Stage1Only = YES" >> mk/build.mk cp mk/build.mk{.sample,}
- /sync-all --no-dph get
perl boot patch -d libraries/haskeline/ -p1 < \
- ./ghc-patches/0001-Include-termios.h-for-solaris2-host.-Fixes-8366.patch
cp $SYSROOT/opt/local/include/gmp.h libraries/integer-gmp/gmp/
- /configure \
--host=x86_64-unknown-linux-gnu \
--build=x86_64-unknown-linux-gnu \ --target=x86_64-sun-solaris2 \ --with-gcc=$GCC \ --with-ld=$LD \ --with-nm=$NM \ --with-objdump=$OBJDUMP
make # will fail with failure to run mkGmpDerivedConstants scp inplace/lib/bin/mkGmpDerivedConstants root@ns2:. ssh root@ns2 "./mkGmpDerivedConstants" > \
libraries/integer-gmp/mkGmpDerivedConstants/dist/GmpDerivedConstants.h
make cat << EOF >> libraries/base/include/HsBaseConfig.h #define HTYPE_DOUBLE Double #define HTYPE_FLOAT Float EOF make #make -j $(nproc) popd }}}
The log of the run is attached. It is too large for the ticket body and apparently too large for Gist as well.
Somewhere along the way the build forgets integer-gmp and no objects are built for it.
Trac metadata
Trac field | Value |
---|---|
Version | |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Build System |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |