Closed
Bug 37276
Opened 25 years ago
Closed 25 years ago
Binary distribution size too large on Solaris with SW 5.0 compilers.
Categories
(SeaMonkey :: Build Config, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
M16
People
(Reporter: rich.burridge, Assigned: cls)
Details
[richb - 4/26/00]
The build configuration for the Solaris platform is incorrect when the
Sun Workshop 5.0 compilers are used to build it. The Cstd library is
statically linked with lots of the generated .so's. This is because there
is no dynamic version of this library.
A simple change to the configure.in file fixes this:
stard[50] diff -c configure.in~ configure.in
*** configure.in~ Tue Apr 25 09:17:13 2000
--- configure.in Tue Apr 25 16:42:18 2000
***************
*** 1734,1740 ****
*-solaris*)
if test ! -z "`${CC} -V 2>&1 | head -1 | grep '5.0'`" && test
"$SUNWSPRO5_VTABLE"; then
CXX="$CXX -library=iostream"
! LIBS="-liostream -lCstd -lCrun $LIBS"
else
AC_CHECK_LIB(C, demangle)
fi
--- 1734,1740 ----
*-solaris*)
if test ! -z "`${CC} -V 2>&1 | head -1 | grep '5.0'`" && test
"$SUNWSPRO5_VTABLE"; then
CXX="$CXX -library=iostream"
! LIBS="-liostream -lCrun $LIBS"
else
AC_CHECK_LIB(C, demangle)
fi
Rebuilding Mozilla with this change reduces that size of the generated .tar.gz
distribution from >16Mbytes to 9.56Mbytes. Everything seems to work.
The following things still need to be checked though:
* Are there are components that are using classes/methods from the Cstd library?
Running "ldd -r" on each .so file should determine this.
* Will some kind of similar change be needed for Sun Workshop 4.2 compilers?
tor, I've cc:ed you on this one because you know about this stuff. Comments
please.
This could have been prevented by Sun providing a dynamic version of libCstd.
Both libCrun and libCstd were included in that library line because those are
the two libraries that CC grabs by default when linking C++ programs. I'll
try doing a build without libCstd and see if I encounter problems. Given the
speed of the 5.0 compilers, it might be a while before I report back with
results. :)
No similar change is needed for the 4.2 compilers, as their entire C++ library
in the dynamic libC library.
Reporter | ||
Comment 2•25 years ago
|
||
[richb - 4/26/00]
I totally agree that Sun should provide a dynamic version of Cstd. I don't
know why that's not there. The CC man page does have a note on this issue
though (thanks to Margaret Chan for bringing it to my attention):
In the options section, and with the "-library=l" entry:
[no%]iostream
[Do not] Use libiostream, the classic
iostreams library. (If using this value,
do not use Cstd)
Build in progress...
The -liostream included in that line is also only provided as a static library,
and is needed by some mozilla code that assumes classic iostreams. If we could
do away with that, perhaps a 5.0 build could get down to the size of a gcc
build.
Reporter | ||
Comment 4•25 years ago
|
||
[richb - 4/26/00]
I've just finished doing a "ldd -r" of all the .so's (libraries and components)
in the M15 .tar.gz distribution. The only symbols not found were in
./components/libxmlterm.so, and they were:
symbol not found: __1cGnsFont2t6MpkcCCHCi_v_
(./components/libxmlterm.so)
symbol not found: __1cGnsFont2T6M_v_ (./components/libxmlterm.so)
Demangling them gives:
__1cGnsFont2t6MpkcCCHCi_v_ == nsFont::nsFont(const char*,unsigned char,unsigned
char,unsigned short,unsigned char,int)
__1cGnsFont2T6M_v_ == nsFont::~nsFont()
I'm not sure why these are missing; I'm still investigating...
tor, I hope your theory about -liostream removal is correct. It should be
easy to check.
Compiles and works fine with -lCstd removed from configure.in. r=tor
Some sizes for the CVS tip, compiled --disable-mailnews --disable-tests
--disable-debug --enable-optimize, dist/bin (including all subdirectories):
raw "strip -x"
gcc 2.95.1 28467 k 28158 k
SUNWspro5.0 39848 k 34085 k
Removing -liostream will involve some some changes. I'm not an expert in
C++ iostreams, so I haven't attempted the necessary modifications.
Reporter | ||
Comment 6•25 years ago
|
||
[richb - 4/26/00]
tor, thanks for verifying the fix for Cstd. cls, can you go ahead and make
the change? It is platform/compiler specific so I haven't tried it on
another platform.
Checked in. Thanks!
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•