Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 116887

Summary: crypto++-5.2.1 - /usr/lib64/libcrypto++.a is 48MB ! Debug info have been included!
Product: Gentoo Linux Reporter: BlaisorBlade <blaisorblade_spam>
Component: New packagesAssignee: Crypto team [DISABLED] <crypto+disabled>
Status: RESOLVED INVALID    
Severity: minor CC: amd64
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description BlaisorBlade 2005-12-27 08:16:08 UTC
While looking around for another bug, I discovered that (on an amd64 system) I have:

# du /usr/lib64/libcrypto++.a
48M     /usr/lib64/libcrypto++.a
# epm -qf /usr/lib64/libcrypto++.a
crypto++-5.2.1

There is no shared version of this library, not even in the package.

I went to my 32-bit chroot (which was and still is a fully functional system in dual boot with my 64-bit one) and saw that:

# du /usr/lib/libcrypto++.a
13M     /usr/lib/libcrypto++.a
# epm -qf /usr/lib/libcrypto++.a
crypto++-5.2.1

The fact that switching to a 64-bit arch the increase in size is so big is extraordinary!

In fact, when I went looking at the binary with binutils, I noticed two problems :
a) there are about 100 object files in the library and each one contains about 200 .gnu.linkonce sections for different symbols.

b) debug info are still included. They are not included in the 32-bit version - possibly the library is auto-stripped on 32-bit but not on 64-bit, for instance due to being installed in /usr/lib64 rather than /usr/lib.

This can be seen via:

objdump -h /usr/lib64/libcrypto++.a |grep debug

The Makefile in the source tarball uses -g, and suggests being changed for "release" builds.

# can't use -fno-rtti yet because it causes problems with exception handling in GCC 2.95.2
CXXFLAGS = -g
# Uncomment the following two lines to do a release build.
# Note that you must define NDEBUG for your own application if you define it for Crypto++.
# Make sure you run the validation tests and test your own program thoroughly
# after turning on -O2. The GCC optimizer may have bugs that cause it to generate incorrect code.
# Try removing -fdata-sections if you get "undefined external reference" errors.
# CXXFLAGS = -O2 -DNDEBUG -ffunction-sections -fdata-sections
# LDFLAGS = -Wl,--gc-sections
Comment 1 Alon Bar-Lev (RETIRED) gentoo-dev 2006-10-23 09:35:23 UTC
Hello AMD64,
I cannot test this my-self, have no access to amd64.
Can you please confirm and find cause?
Comment 2 Simon Stelling (RETIRED) gentoo-dev 2006-10-24 08:56:00 UTC
take nostrip out of FEATURES
Comment 3 Alon Bar-Lev (RETIRED) gentoo-dev 2006-10-24 09:03:39 UTC
(In reply to comment #2)
> take nostrip out of FEATURES

Thanks Simon,
Do you refer the ebuild?
Or do you say it works for you, and the user configuration is wrong?
Comment 4 Simon Stelling (RETIRED) gentoo-dev 2006-10-24 09:07:24 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > take nostrip out of FEATURES
> 
> Thanks Simon,
> Do you refer the ebuild?

It'd be RESTRICT then, but you don't have that anyway.

> Or do you say it works for you, and the user configuration is wrong?

Yes. "While looking around for another bug" gave him away.
Comment 5 Alon Bar-Lev (RETIRED) gentoo-dev 2006-10-24 09:10:19 UTC
Thank you so much!