Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,929
    • Issues 4,929
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 461
    • Merge requests 461
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #8910
Closed
Open
Created Mar 19, 2014 by Christian Maeder@maeder

cross compiling for x86_64 solaris2

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.

Trac metadata
Trac field Value
Version 7.8.1-rc2
Type Task
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC kgardas
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking