Nikita Karetnikov | 15 Jun 00:54 2013

Cross-compiling GHC: ghc-cabal: /tmp/30869.o: does not exist

I'm trying to cross-compile GHC 7.6.3; 'make' fails with the mentioned
error.  How can I debug this issue?

I used Guix [1] to build a cross-compiler and related packages:

# ./pre-inst-env guix build -K gcc-cross-mips64el-linux-gnu

After that I downloaded GHC 7.6.3:

# wget http://www.haskell.org/ghc/dist/7.6.3/ghc-7.6.3-src.tar.bz2

Unpacked it:

# tar xf ghc-7.6.3-src.tar.bz2

# cd ghc-7.6.3/mk
# cp build.mk.sample build.mk

Uncommented 'BuildFlavour = unreg' and added 'INTEGER_LIBRARY = integer-simple'.

# cd ..
# export CROSS_LIBRARY_PATH=/nix/store/qkzhg178l4b3fpnj7ival0h6c1mfgi0l-glibc-cross-mips64el-linux-gnu-2.17/lib
# export CROSS_CPATH=/nix/store/qkzhg178l4b3fpnj7ival0h6c1mfgi0l-glibc-cross-mips64el-linux-gnu-2.17/include:/nix/store/g4ky5zb70y946pfjiq45sa5pv7qdqgha-linux-libre-headers-cross-mips64el-linux-gnu-3.3.8/include
# ./configure \
  --target=mips64el-linux-gnu \

--with-gcc=/nix/store/lv3vxm43mmk7f5gc1myzs0aj8pi4a4g7-gcc-cross-mips64el-linux-gnu-4.7.3/bin/mips64el-linux-gnu-gcc \

--with-ld=/nix/store/jys3nw5rg2a4lrihs7qhflxad4bwyry6-binutils-cross-mips64el-linux-gnu-2.23.2/bin/mips64el-linux-gnu-ld \
  --with-nm=/nix/store/jys3nw5rg2a4lrihs7qhflxad4bwyry6-binutils-cross-mips64el-linux-gnu-2.23.2/bin/mips64el-linux-gnu-nm
(Continue reading)


Gmane