HI,
This one maybe a cpack question but I notice that when I compile the FDB source code, the libfdb_c.so under my build/lib is about 2x bigger then the one I generated using “cpack -G TGZ”. So, why the cpack one is much smaller? Is it because it is a dynamic version and the one build from source is a static link one?
Thanks,
Under build/lib, it’s non-stripped binary. Maybe cpack
generate stripped binary? You can use file libfdb_c.so
to tell if it’s stripped or not.
Based on your suggestion, I compared the 3 libfdb_c.so that I have generated:
The one from build/lib which is just resulted from cmake:file …/…/…/lib/libfdb_c.so
…/…/…/lib/libfdb_c.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=9a7634a0d21caca67c5dd3f833c9f2d5ea8faa5b, with debug_info, not stripped
From RPM generated from gpack:
file …/…/…/lib/libfdb_c.so
…/…/…/lib/libfdb_c.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=9a7634a0d21caca67c5dd3f833c9f2d5ea8faa5b, with debug_info, not stripped
From TGZ generated from gpack:
ile libfdb_c.so
libfdb_c.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=9a7634a0d21caca67c5dd3f833c9f2d5ea8faa5b, stripped
The stripped version from TGZ is the smallest of the 3. It is only 7682208 in size.
The RPM version, even though it is not stripped and have debug_info, comes in second: 10728704
The compile non-stripped version is 189015776
Stripped being the smallest, that make sense. But non-stripped and have debug_info that is smaller then just non-stripped is a bit confusing.
It’s weird build/lib and RPM have different sizes. I can’t explain it if they compiled with the same flags.