[Haskell-iPhone] Build error with ghc-8.2.2 for iOS

Torsten Kemps-Benedix tkx68 at icloud.com
Fri Nov 24 09:06:54 UTC 2017


Hello all,

I try to build ghc-8.2.2 based on a brew installed ghc (8.2.1) on macOS 10.13.1 with current Xcode. I follow the guidelines at https://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling/iOS <https://ghc.haskell.org/trac/ghc/wiki/Building/CrossCompiling/iOS> and come to an error at step 5 where 

./configure CC=arm-apple-darwin10-clang --target=arm-apple-darwin10; make

is being executed.

The error reads…

arm-apple-darwin10-clang -E  -DPROFILING -DTHREADED_RTS -DDEBUG  -fno-stack-protector -Wall  -Wall -Wextra -Wstrict-prototypes  -Wmissing-prototypes  -Wmissing-declarations -Winline -Waggregate-return -Wpointer-arith -Wmissing-noreturn -Wnested-externs -Wredundant-decls  -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -DUSE_LIBFFI_FOR_ADJUSTORS -fno-strict-aliasing -fno-common -Irts/dist/build/./autogen        -Wno-unknown-pragmas -O2 -fomit-frame-pointer -g -DRtsWay=\"rts_v\" -Wno-strict-prototypes      -MM -x c rts/linker/LoadArchive.c -MF rts/dist/build/.depend-v-l-debug-thr-thr_debug-thr_l.c_asm.bit
clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
rts/linker/LoadArchive.c:57:2: error: Unknown Darwin architecture
#error Unknown Darwin architecture
 ^
1 error generated.
make[1]: *** [rts/dist/build/.depend-v-l-debug-thr-thr_debug-thr_l.c_asm] Error 1
make: *** [all] Error 2

This stems from the following code in rts/linker/LoadArchive.c…

static StgBool loadFatArchive(char tmp[static 20], FILE* f, pathchar* path)
{
    uint32_t nfat_arch, nfat_offset, cputype, cpusubtype;
#if defined(i386_HOST_ARCH)
    const uint32_t mycputype = CPU_TYPE_X86;
    const uint32_t mycpusubtype = CPU_SUBTYPE_X86_ALL;
#elif defined(x86_64_HOST_ARCH)
    const uint32_t mycputype = CPU_TYPE_X86_64;
    const uint32_t mycpusubtype = CPU_SUBTYPE_X86_64_ALL;
#elif defined(powerpc_HOST_ARCH)
    const uint32_t mycputype = CPU_TYPE_POWERPC;
    const uint32_t mycpusubtype = CPU_SUBTYPE_POWERPC_ALL;
#elif defined(powerpc64_HOST_ARCH)
    const uint32_t mycputype = CPU_TYPE_POWERPC64;
    const uint32_t mycpusubtype = CPU_SUBTYPE_POWERPC_ALL;
#elif defined(aarch64_HOST_ARCH)
    const uint32_t mycputype = CPU_TYPE_ARM64;
    const uint32_t mycpusubtype = CPU_SUBTYPE_ARM64_ALL;
#else
#error Unknown Darwin architecture
#endif

It seems that the necessary architecture is not provided here?

Any help would be very much appreciated!

Thanks!

Torsten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/iphone/attachments/20171124/b849e449/attachment.html>


More information about the iPhone mailing list