Shared vs Static (please read)

Peter Jr. Quiring pquiring at hotmail.com
Thu Dec 15 23:48:26 UTC 2005


I'm a C++ programmer that is porting from Windows to the Linux world.  So 
far things are great.  I've recently tried to use the -static option with 
gcc to generate binaries that are more portable, and so far it works.  The 
only problem is that in FC5 the static libs are being removed (libjpeg-devel 
- see ticket # 145971).  I understand that Shared libraries save space and 
this is good for software that is bundled with the OS, but for third party 
vendors, static would be a more ideal solution.  I own my own company with 
one product available for Windows (currently it's my bread and butter).  I 
don't have the resources available (just me) to release a Linux based 
solution for every major distro out there such as the Wine project does (fyi 
: I've contributed to that project - a few lines).  The size of these 
libraries is not that much, my system only has 30MBs of static libs, 
compared to the 3GB disc image size.
I tried to move a binary built on FC5 to a FC4 system and of course it 
didn't work (openssl version mismatch).  So by removing static libs Fedora 
will be hurting the little guys (like me).   I also know that some functions 
(like dlopen()) currently do not work in static mode, but some of my apps 
don't need this functionality.  I've written my own DNS client, so the 
gethostaddr() etc functions I don't need.  Does anyone know if it would be 
possible to use most libraries as static and maybe just use the shared 
version of dl, or glibc?

I can see Linux (possibly Fedora) taking on Windows head-to-head some day, 
but without static libs Fedora would be crippling our options and force some 
of us to other options.

If you would like to check out my "free" projects, goto 
http://digiforce.sourceforge.net and http://javaforce.sourceforge.net.
Anyways, Thanks for listening.





More information about the fedora-devel-list mailing list