
#8910: cross compiling for x86_64 solaris2 ----------------------------------+---------------------------------- Reporter: maeder | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc2 Keywords: | Operating System: Solaris Architecture: x86_64 (amd64) | Type of failure: Runtime crash Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ----------------------------------+---------------------------------- using a "gcc -m64" and a working ghc-7.8.0.20140228-i386-unknown-solaris2 I was able to create a 64Bit ghc-stage2 compiler that can compile a simple hello world program but may create binaries from larger sources that seg- fault. In particular "ghc-stage2 --interactive" seg-faults: {{{ [Thread debugging using libthread_db enabled] [New Thread 1 (LWP 1)] [New LWP 2 ] [New LWP 3 ] [New LWP 4 ] GHCi, version 7.8.0.20140228: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-simple ... linking ... done. Loading package base ... linking ... Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1 (LWP 1)] 0x00000000041ea4c0 in ?? () (gdb) bt #0 0x00000000041ea4c0 in ?? () #1 0x000000000369cf92 in resolveObjs () #2 0x000000000206de99 in cplU_info () #3 0x000000000000000c in ?? () #4 0x0000000003d0fe09 in base_GHCziEventziManager_zdLr88clvl8_closure () #5 0x0000000000000000 in ?? () }}} The content of my mk/build.mk is just {{{ INTEGER_LIBRARY = integer-simple }}} Creating a binary-dist also worked, but unpacking and "gmake install" failed at first because old-time, haskell98 and haskell2010 libraries were missing due to "!CrossCompiling" in ghc.mk and the second time with: {{{ Reading package info from "rts/dist/package.conf.install" ... done. "utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist" register libraries/ghc-prim dist-install "/local/home/maeder/haskell/ghc-7.8-x64-static/lib/ghc-7.8.0.20140228/bin/ghc" "/local/home/maeder/haskell/ghc-7.8-x64-static/lib/ghc-7.8.0.20140228/bin /ghc-pkg" "/local/home/maeder/haskell/ghc-7.8-x64-static/lib/ghc-7.8.0.20140228" '' '/local/home/maeder/haskell/ghc-7.8-x64-static' '/local/home/maeder/haskell/ghc-7.8-x64-static/lib/ghc-7.8.0.20140228' '/local/home/maeder/haskell/ghc-7.8-x64-static/share/doc/ghc/html/libraries' NO ghc-cabal: Bad interface file: dist-install/build/GHC/CString.hi magic number mismatch: old/corrupt interface file? (wanted 129742, got 33214052) gmake[1]: *** [install_packages] Fehler 1 }}} What am I doing wrong for cross compiling? There is also #8378 using a different build host. #8713 also seem to use x86_64 solaris2 libs. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8910 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler