Skip to content

cross compiling zip-archive 0.3.3 #54

@2i3r

Description

@2i3r

I'm trying to cross-compile zip-archive as a build dependency to pandoc.
I use my specially compiled ghc which produce armhf binaries, through cabal using command bellow:

cabal new-build \
    --builddir=dist/arm-linux-gnueabihf \
    --with-ghc=arm-linux-gnueabihf-ghc \
    --with-ghc-pkg=arm-linux-gnueabihf-ghc-pkg \
    --with-gcc=arm-linux-gnueabihf-clang \
    --with-ld=arm-linux-gnueabihf-ld \
    --hsc2hs-options=--cross-compile \
    --disable-shared \
    --configure-option=--host=arm-linux-gnueabihf

The build failes, right after successfully compiling the setup binary from Setup.hs, by following errors:

`./dist/arm-linux-gnueabihf/build/arm-linux/ghc-8.6.3/zip-archive-0.3.3/setup/setup: 1: ./dist/arm-linux-gnueabihf/build/arm-linux/ghc-8.6.3/zip-archive-0.3.3/setup/setup: Syntax error: word unexpected (expecting ")")`

(just for simplicity I replaced full path to zip-archive-0.3.3 by .)
no more information I can find using -v flag to cabal, however here is the full ouput: pastebin
I'm guessing the setup binary is part of build life-cycle, and it fails to run on build machine as it cross-compiled, however I don't know how to check and/or resolve this, may be manual compile and installing?!

$ file ./dist/arm-linux-gnueabihf/build/arm-linux/ghc-8.6.3/zip-archive-0.3.3/setup/setup
./dist/arm-linux-gnueabihf/build/arm-linux/ghc-8.6.3/zip-archive-0.3.3/setup/setup: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, with debug_info, not stripped

$ uname -m
x86_64

$ arm-linux-gnueabihf-ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.6.3

$ cabal --version
cabal-install version 2.4.1.0
compiled using version 2.4.1.0 of the Cabal library

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions