Opened 8 years ago

Last modified 6 years ago

#2031 new bug

relocation overflow

Reported by: maeder Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.8.2
Keywords: Cc: pho@…
Operating System: MacOS X Architecture: powerpc
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

I've created a statically linked ghc-6.8.2 for PPC Mac OS 10.4 (Tiger). http://www.dfki.de/sks/hets/mac/versions/ghc-6.8.2-powerpc-apple-darwin-static-libs.tar.bz2

When linking our big hets binary after compilation with optimization I get millions (actually 34999 lines) of entries like:

/usr/bin/ld: PGIP/XMLparsing.o relocation overflow for relocation entry 63 in section (__TEXT,__text) (displacement too large)
...
/usr/bin/ld: SoftFOL/Sign.o relocation overflow for relocation entry 45280 in section (__TEXT,__text) (displacement too large)
collect2: ld returned 1 exit status
make: *** [hets] Error 1

I had such messages before and got rid of them by rearranging code and imports (just by wild guesses, a strategy would be helpful). It is sort of a known (Apple PPC) deficiency (and I misuse this ticket to document it here).

Linking works fine after compilation without optimization or when linking against GMP and GNUreadline frameworks using my other binary distribution.

Change History (9)

comment:1 Changed 8 years ago by igloo

  • Milestone set to 6.8.3

Thanks for the report.

comment:2 Changed 7 years ago by maeder

I've recompiled the above binary-dist using the patch from #1958. Now I get under leopard with an unoptimized binary the following error:

hets: internal error: evacuate(static): strange closure type 24576
    (GHC version 6.8.2 for powerpc_apple_darwin)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

But I'm not sure if the patch is causing this. (I may have not noticed this error before on tiger.)

comment:3 Changed 7 years ago by maeder

This evacuate(static) bug does not occur on tiger. In fact the relocation error is also gone for a slightly smaller binary.

Interestingly an optimized binary works correctly on leopard, too!

comment:4 Changed 7 years ago by igloo

  • Milestone changed from 6.8.3 to 6.10.1

comment:5 Changed 7 years ago by igloo

  • Milestone changed from 6.10.1 to 6.10.2

comment:6 Changed 6 years ago by igloo

  • Milestone changed from 6.10.2 to 6.12.1
  • Priority changed from normal to low

Dropping priority as this is not on a tier 1 platform.

comment:7 Changed 6 years ago by igloo

  • Milestone changed from 6.12.1 to _|_
  • Priority changed from low to normal

comment:8 Changed 6 years ago by PHO

  • Cc pho@… added
  • Type of failure set to None/Unknown

comment:9 Changed 6 years ago by PHO

I found a nice explanation of this problem. Sadly it won't easily go away with some compiler/linker flags...

http://markmail.org/message/3cwgu5idqer2fhnz

Note: See TracTickets for help on using tickets.