[Haskell-cafe] Re: [haskell] ANNOUNCE: HNOP 0.1
mvanier at cs.caltech.edu
Fri Jun 30 18:45:57 EDT 2006
[Moving to haskell-cafe]
OK, after going through this several times, here's what I've found:
1) The Debian linux build of haskell produces large executables.
2) The generic x86 binary distribution produces smallish executables
(383765 bytes; still kind of large; stripped it's 191584 bytes).
3) I removed my entire source distribution, and recompiled from scratch with
this build.mk file:
SRC_HC_OPTS = -H64m -O2
GhcLibHcOpts = -O2 -fgenerics
SplitObjs = YES
I did an "autoreconf; configure; make; make install" and then recompiled hnop
from scratch. I got large executables (2838528 bytes unstripped, 1540072 stripped).
I'm at a loss here. Somehow, the SplitObjs option doesn't seem to be doing the
job. Any suggestions would be appreciated.
Donald Bruce Stewart wrote:
> Hmm. Did you build from scratch? Perhaps the libraries didn't get
> rebuilt with split objs ?
>> I've tried doing a manual build with SplitObjs set to YES, but without
>> success; either the compiler was broken or it would still generate large
>> executables. So as a sanity check, I installed the debian unstable build.
>> But that one also gives me a huge executable:
>> % ls -l
>> total 2720
>> -rw-r--r-- 1 mvanier mvanier 818 Jun 29 20:48 LICENSE
>> -rw-r--r-- 1 mvanier mvanier 308 Jun 30 04:59 Main.hi
>> -rw-r--r-- 1 mvanier mvanier 80 Jun 29 20:48 Main.hs
>> -rw-r--r-- 1 mvanier mvanier 1928 Jun 30 04:59 Main.o
>> -rw-r--r-- 1 mvanier mvanier 43 Jun 29 20:48 Makefile
>> -rwxr-xr-x 1 mvanier mvanier 2756151 Jun 30 04:59 hnop
>> -rw-r--r-- 1 mvanier mvanier 807 Jun 29 23:56 hnop.tar.gz
>> Am I the only person in the world with this problem?
>> Also, for some inexplicable reason, debian puts ghci into /usr/X11R6/bin,
>> though ghc is in the more sensible /usr/bin/ghc.
>> Donald Bruce Stewart wrote:
>>>> Nope, just ghc-6.4.2 that I compiled myself on a Dell x86 laptop (Pentium
>>>> M). I didn't use any strange configure options. Is there a special
>>>> configure flag for split objects? If not, how is this determined?
>>> Ah ha! You need to add -split-objs to the build.mk used by ghc to build
>>> its libraries, as described here:
>>> You want:
>>> SplitObjs = YES
>>> in mk/build.mk
>>> It's not enabled by default, since it doesn't work on every platform.
>>> The ghc that is distributed in the debian package system does have split
>>> objs on, though.
More information about the Haskell-Cafe