[Samba] Re: Very HUGE binaries!?

Urs Rau urs.rau at uk.om.org
Tue Mar 29 09:54:08 GMT 2005


Gerald (Jerry) Carter wrote:

 > Gerald (Jerry) Carter wrote:
 > | Toni Verdu Carbo wrote:
 > | |     Hi!
 > | |
 > | |     I've been compiling Samba 3.0.x on a Solaris 2.6
 > | | server using GCC 3.4.1 without any problem until recently...
 > | | The problem started with 3.0.12 version, and reproduced in 3.0.13.
 > | | Doing "configure" and then "make" produces with these two
 > | | versions VERY HUGE binaries!
 > |
 > | I've tracked down the change to configure.in that caused this.
 > | YOu can work around it by either (a) stripping the resulting
 > | binaries, (b) manually removing '-g' from the Makefile, or
 > | (c) manually setting CFLAGS to any value before running
 > | configure.
 > |
 > | I'll go ahead and fix this in the SAMBA_3_0 svn tree.
 >
 > Fixed in svn now.  The patch is at
 > http://samba.org/~jerry/patches/post-3.0.13/configure_debug.patch
 >
 >

Thanks for this fix. However on my FC2 I still get huge binaries and as
a consequence huge rpms even after running your patch and then running
autogen.sh in the rpm building.

I have tried inserting "sh autogen.sh" into the samba.spec file instead
of "script/mkversion.h" in the %prep stage.

Also adding --enable-developer=no to the configure lines in %build was
to no avail.

It would appear that $RPM_OPT_FLAGS is the one that introduces
"CFLAGS=-O2 -g -march=i386 -mcpu=i686", so your patch helps set sane 
defaults for normal compiles but does not fix the problem for a rpm build.

Any advice on the cleanest way to reduce the size of the binaries and
not have them compiled with "-g"?

Thanks in advance.


Regards,


Urs Rau



More information about the samba mailing list