Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why there is no static library for math functions?

Is it a standard to have only dynamic libraries mostly without their static version? I am particularly asking about math library. In my fedora 17 (linux machine on Intel 32 processor), I have latest gcc and it has libm-2.15.so and symbolic link file libm.so but there is no libm.a.

Is libm.a missing on my system?

like image 349
KawaiKx Avatar asked Oct 08 '13 04:10

KawaiKx


2 Answers

Install the static libraries:

# yum install glibc-static
like image 159
SheetJS Avatar answered Sep 30 '22 08:09

SheetJS


You ask:

Is it a standard to have only dynamic libraries mostly without their static version?

In Fedora, it is indeed standard to only package dynamic libraries. From the packaging guidelines:

Packages including libraries should exclude static libs as far as possible (eg by configuring with --disable-static). Static libraries should only be included in exceptional circumstances. Applications linking against libraries should as far as possible link against shared libraries not static versions.

and later,

In general, packagers are strongly encouraged not to ship static libs unless a compelling reason exists.

... which goes on to say that when such a library is packaged, it should be in a separate subpackage with the suffix -static, as in this case glibc-static.

like image 32
mattdm Avatar answered Sep 30 '22 07:09

mattdm