static libs ... again

Patrice Dumas pertusus at free.fr
Sat Feb 18 10:00:52 UTC 2006


> IMHO, if you are building your own numerical crunching apps, then you 
> probably would be better off controlling all aspects of building each 
> static portion of it.  This means writing your own scripts and tuning 
> compile flags of portions of the app to maximize performance.  This may 
> also mean applying your own patches that may be unsuitable for a more 
> general purpose distribution.

This is not my use. I just do numerical models, and I don't care that much 
about speed. But I need some functions provided by libraries (lapack for 
linear algebra, fftw for fourier transforms, and general purpose math
libs like gsl or the cernlib for other utilities). I don't want to
customize them, just use them. 

> If you rely on a distribution's static libraries, then there is no 
> guarantee in the future that those static libs will remain unchanged in 
> API, so if you ever need to rebuild your app with a tiny change you 
> could be affected by far more than the change that you expected.

Indeed in case of heavy customization having static libs from fedora
may be unneeded, as you said, if a given version is needed or static libs
are tweaked. But this is not the use I have for math libs.

All in all this is another case than mine (not that it doesn't exist, 
though). In my case I can rebuild when there is an api change, I don't
want to use a given version, I really don't want to mess with those libs
internals nor compile settings. But I want to generate an executable that 
I can run on any linux distribution and rerun later, without the burden 
to have to bundle shared libs with my executable.

I understand that my need may be particular. It is possible that the 
benefit from being able to have a portable executable statically compiled 
against libs is outweight by the cost in term of space wasted by static
libraries. But if static libs are excluded it must be for that reason, not
because static libs are intrinsically bad, as I hope my personnal use
show that it is untrue. And not that I don't advocate to keep all the
static libs, but those that can be used in contexts where security
is not an issue. This includes low level libraries (glibc, libstdc++...)
math libs, plotting libs, and maybe others, but no network libs or pure 
desktop stuff.

--
Pat




More information about the fedora-extras-list mailing list