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
Hello AMD64, I cannot test this my-self, have no access to amd64. Can you please confirm and find cause?
take nostrip out of FEATURES
(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?
(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.
Thank you so much!