Opened 3 years ago

Closed 3 years ago

#5008 closed bug (fixed)

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 (13)

comment:1 Changed 3 years ago by pumpkin

  • Cc pumpkingod@… added

comment:2 Changed 3 years ago by tibbe

  • Cc johan.tibell@… added

comment:3 Changed 3 years ago by igloo

  • Milestone set to 7.2.1
  • Priority changed from normal to highest

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.

comment:4 Changed 3 years ago by altaic

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

comment:5 Changed 3 years ago by altaic

  • Cc william.knop.nospam@… added

comment:6 Changed 3 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.

comment:7 follow-up: Changed 3 years ago by altaic

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

comment:8 follow-up: Changed 3 years ago by simonmar

Does this affect the platform release too?

comment:9 in reply to: ↑ 7 ; follow-up: Changed 3 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.

comment:10 in reply to: ↑ 8 Changed 3 years ago by maeder

Replying to simonmar:

Does this affect the platform release too?

I suppose so, it should be repacked.

comment:11 Changed 3 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\"]")
 ]

comment:12 in reply to: ↑ 9 Changed 3 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.

comment:13 Changed 3 years ago by igloo

  • Resolution set to fixed
  • Status changed from new to closed

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.