[Samba] Re: Very HUGE binaries!?

2005-03-30 Thread Urs Rau
Hansjörg Maurer wrote:
Hi
I have tried this patch, but the generated Makefile still contains the 
-g CFFLAG.
(running Solaris8 with gcc)

Removing the -g manually from the Makefile works.
Did you run the source/autogen.sh script after you applied the patch?
quote from patch: 
http://samba.org/~jerry/patches/post-3.0.13/configure_debug.patch
##
## Prevent debug binaries from being built by default
## Make sure to run source/autogen.sh after applying this patch.
##
Index: source/configure.in
===
--- source/configure.in	(revision 6060)
+++ source/configure.in	(revision 6062)

Regards,
--
Urs Rau
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Re: Very HUGE binaries!?

2005-03-29 Thread Urs Rau
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
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Re: Very HUGE binaries!?

2005-03-29 Thread Urs Rau
Urs Rau wrote:
 It would appear that $RPM_OPT_FLAGS is the one that introduces 
CFLAGS=-O2 -g -march=i386 -mcpu=i686

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

For now I have added an ugly 2-liner to the beginning of the %prep and
%build sections. (in case rpm builders jump straight to the %build section)
# avoid building huge rpms
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed s/-g//`
I know I could have either reset my system wide rpmrc or set my own
~/.rpmrc, but I wanted to make sure that anybody that uses my spec file
to rebuild the rpm would also get small binaries and not have to
remember to set their own system or personal rpmrc
Is this all one can do, it feels like an ugly hack?
Regards,
Urs Rau
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba