Ticket #5008 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

ghc-7 produces 10 times bigger binaries on macs than ghc-6

Reported by: maeder Owned by:
Priority: highest Milestone: 7.2.1
Component: Compiler Version: 7.0.2
Keywords: Cc: pumpkingod@…, johan.tibell@…, william.knop.nospam@…
Operating System: MacOS X Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

see  http://www.haskell.org/pipermail/glasgow-haskell-users/2011-March/020146.html

echo main = putStrLn \"hello\" > H.hs
ghc --make -O -fforce-recomp H.hs
ls -lh H

This is also a problem on powerpc

Change History

  Changed 2 years ago by pumpkin

  • cc pumpkingod@… added

  Changed 2 years ago by tibbe

  • cc johan.tibell@… added

  Changed 2 years ago by igloo

  • priority changed from normal to highest
  • milestone set to 7.2.1

This is probably because object splitting was turned off (#4013). It should be fixed with the HEAD provided you build with XCode >= 3.2. I'll leave the ticket open until that's confirmed.

  Changed 2 years ago by altaic

The issue is still present in my build of HEAD (OSX 10.6 x86_64) from yesterday.

  Changed 2 years ago by altaic

  • cc william.knop.nospam@… added

  Changed 2 years ago by maeder

I can confirm that "ghc --info" shows ("Object splitting","YES") for ghc-6.12.3 and "NO" for ghc-7.0.2.

follow-up: ↓ 9   Changed 2 years ago by altaic

In my recent HEAD build with overly large binaries, ghc --info shows ("Object splitting supported","YES")

follow-up: ↓ 10   Changed 2 years ago by simonmar

Does this affect the platform release too?

in reply to: ↑ 7 ; follow-up: ↓ 12   Changed 2 years ago by maeder

Replying to altaic:

In my recent HEAD build with overly large binaries, ghc --info shows ("Object splitting supported","YES")

I've just recompiled ghc-7.0.2 with "Object splitting supported" (in config.mk.in) and now the hello binary has just "915K" and I observed no other problems.

in reply to: ↑ 8   Changed 2 years ago by maeder

Replying to simonmar:

Does this affect the platform release too?

I suppose so, it should be repacked.

  Changed 2 years ago by maeder

 http://www.informatik.uni-bremen.de/agbkb/forschung/formal_methods/CoFI/hets/intel-mac/ghcs/ghc-7.0.2-x86_64-apple-darwin.tar.bz2

is an experimental OS 10.6 64-bit distribution with object splitting and without sdk-stuff introduced by aclocal.m4. The hello binary has "1,1M" but is no longer linked against /usr/lib/libgcc_s.1.dylib.

  [("Project name","The Glorious Glasgow Haskell Compilation System")
 ,("Project version","7.0.2")
 ,("Booter version","6.10.4")
 ,("Stage","2")
 ,("Build platform","x86_64-apple-darwin")
 ,("Host platform","x86_64-apple-darwin")
 ,("Target platform","x86_64-apple-darwin")
 ,("Have interpreter","YES")
 ,("Object splitting","YES")
 ,("Have native code generator","YES")
 ,("Have llvm code generator","YES")
 ,("Support SMP","YES")
 ,("Unregisterised","NO")
 ,("Tables next to code","YES")
 ,("RTS ways","l debug  thr thr_debug thr_l thr_p ")
 ,("Leading underscore","YES")
 ,("Debug on","False")
 ,("LibDir","/Users/Shared/maeder/lib/ghc-7.0.2")
 ,("Global Package DB","/Users/Shared/maeder/lib/ghc-7.0.2/package.conf.d")
 ,("C compiler flags","[\"-m64\",\"-fno-stack-protector\"]")
 ,("Gcc Linker flags","[\"-m64\"]")
 ,("Ld Linker flags","[\"-arch\",\"x86_64\"]")
 ]

in reply to: ↑ 9   Changed 2 years ago by altaic

Replying to maeder:

I've just recompiled ghc-7.0.2 with "Object splitting supported" (in config.mk.in) and now the hello binary has just "915K" and I observed no other problems.

That's odd. I rebuilt ghc HEAD against OS X 10.6's SDK / Xcode 4, and the hello binary is now just 1.0M. With my build from the other day it was over 7M.

  Changed 2 years ago by igloo

  • status changed from new to closed
  • resolution set to fixed

Maybe you had XCode < 3.2 before. Anyway, sounds like this is fixed in HEAD, so I'll close the ticket. Thanks everyone!

Note: See TracTickets for help on using tickets.