Static libraries

130 views
Skip to first unread message

Marc Mezzarobba

unread,
Oct 10, 2019, 11:26:29 AM10/10/19
to sage-...@googlegroups.com
Hi,

Maybe a stupid question, but: does Sage really need to build all
these static libraries? Why?

456M ./local/lib/libgiac.a
144M ./local/lib/libec.a
120M ./local/lib/libppl_c.a
107M ./local/lib/libpari.a
69M ./local/lib/libppl.a
48M ./local/lib/libsymmetrica.a
31M ./local/lib/python3.7/config-3.7m-x86_64-linux-gnu/libpython3.7m.a
24M ./local/lib/libgsl.a
16M ./local/lib/python2.7/config/libpython2.7.a
16M ./local/lib/libsqlite3.a
16M ./local/lib/libfplll.a
7,7M ./local/lib/ecl-16.1.2/libcmp.a
7,5M ./local/lib/libbraiding.a
5,9M ./local/lib/libSingular.a
5,4M ./local/lib/libyasm.a
4,5M ./local/lib/ecl-16.1.2/libasdf.a
3,7M ./local/lib/libfactory.a
3,1M ./local/lib/libecm.a
2,3M ./local/libexec/singular/MOD/gfanlib.a
2,2M ./local/lib/libpolys.a
2,2M ./local/lib/libgslcblas.a
1,6M ./local/lib/libgfan.a
1,6M ./local/lib/libgc.a
1,6M ./local/lib/libcddgmp.a
1,1M ./local/lib/libiml.a
1,1M ./local/lib/libgd.a
900K ./local/lib/libplanarity.a
880K ./local/lib/ecl-16.1.2/libdefsystem.a
796K ./local/lib/libcdd.a
564K ./local/lib/ecl-16.1.2/libdeflate.a
536K ./local/lib/libgivaro.a
472K ./local/share/gap/pkg/SmallGrp-1.3/small8/sml1536.a
448K ./local/lib/ecl-16.1.2/libsockets.a
372K ./local/share/gap/pkg/SmallGrp-1.3/small6/sml1152.a
364K ./local/share/gap/pkg/SmallGrp-1.3/small6/sml1920.a
344K ./local/lib/python2.7/site-packages/numpy/core/lib/libnpymath.a
320K ./local/lib/libomalloc.a
292K ./local/lib/liblrcalc.a
232K ./local/lib/ecl-16.1.2/libecl-help.a
204K ./local/libexec/singular/MOD/gitfan.a
200K ./local/share/gap/pkg/SmallGrp-1.3/small7/sml512.a
200K ./local/lib/ecl-16.1.2/libprofile.a
184K ./local/lib/ecl-16.1.2/librt.a
180K ./local/lib/libcord.a
176K ./local/lib/libratpoints.a
172K ./local/lib/libhomfly.a
172K ./local/lib/ecl-16.1.2/libecl-cdb.a
168K ./local/libexec/singular/MOD/cohomo.a
140K ./local/lib/ecl-16.1.2/libecl-curl.a
132K ./local/lib/ecl-16.1.2/libserve-event.a
132K ./local/lib/ecl-16.1.2/libql-minitar.a
124K ./local/share/gap/pkg/SmallGrp-1.3/small5/sml1728.a
124K ./local/libexec/singular/MOD/Order.a
120K ./local/share/gap/pkg/SmallGrp-1.3/small2/sml896.a
116K ./local/share/gap/pkg/SmallGrp-1.3/small2/sml640.a
116K ./local/libexec/singular/MOD/syzextra.a
112K ./local/share/gap/pkg/SmallGrp-1.3/small5/sml1600.a
112K ./local/share/gap/pkg/SmallGrp-1.3/small5/sml1344.a
108K ./local/share/gap/pkg/SmallGrp-1.3/small2/sml960.a
104K ./local/share/gap/pkg/SmallGrp-1.3/small5/sml1440.a
100K ./local/share/gap/pkg/SmallGrp-1.3/small5/sml1944.a
100K ./local/share/gap/pkg/SmallGrp-1.3/small2/sml384.a
96K ./local/share/gap/pkg/SmallGrp-1.3/small5/sml1296.a
96K ./local/share/gap/pkg/SmallGrp-1.3/small2/sml576.a
96K ./local/share/gap/pkg/SmallGrp-1.3/small2/sml256.a
96K ./local/lib/ecl-16.1.2/libecl-quicklisp.a
92K ./local/share/gap/pkg/SmallGrp-1.3/small2/sml864.a
72K ./local/share/gap/pkg/SmallGrp-1.3/small3/sml768.a
72K ./local/lib/ecl-16.1.2/libsb-bsd-sockets.a
64K ./local/libexec/singular/MOD/pyobject.a
44K ./local/libexec/singular/MOD/interval.a
32K ./local/lib/libatomic_ops_gpl.a
28K ./local/lib/libsingular_resources.a
24K ./local/lib/librw.a
24K ./local/lib/libatomic_ops.a
16K ./local/share/gap/pkg/SmallGrp-1.3/id3/id768.a
12K ./local/share/gap/pkg/SmallGrp-1.3/id5/id1344.a
12K ./local/libexec/singular/MOD/python_module.a
12K ./local/libexec/singular/MOD/bigintm.a
8,0K ./local/share/gap/pkg/SmallGrp-1.3/id2/id832.a
8,0K ./local/share/gap/pkg/SmallGrp-1.3/id2/id800.a
8,0K ./local/share/gap/pkg/SmallGrp-1.3/id2/id576.a
8,0K ./local/libexec/singular/MOD/customstd.a
4,0K ./local/share/gap/pkg/SmallGrp-1.3/id10/id46620.a
4,0K ./local/share/cliquer/testcase-small.a
4,0K ./local/libexec/singular/MOD/singmathic.a
4,0K ./local/libexec/singular/MOD/polymake.a

--
Marc

Dima Pasechnik

unread,
Oct 10, 2019, 11:53:30 AM10/10/19
to sage-devel
The stuff in
./local/share/gap/pkg/SmallGrp-1.3/
are not static libraries, to begin with.

Otherwise, indeed, why not systematically try to add "--disable-static" in spkg-install files  to everything that accepts it, and see how it flies
(IIRC there are few places that need static libs)



--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/qnniir%2426je%241%40blaine.gmane.org.

François Bissey

unread,
Oct 10, 2019, 3:19:24 PM10/10/19
to sage-...@googlegroups.com


> On 11/10/2019, at 4:53 AM, Dima Pasechnik <dim...@gmail.com> wrote:
>
> (IIRC there are few places that need static libs)

There are a few places where people claim they want the static libraries
for performance reasons. I live perfectly well without static libraries
in sage-on-gentoo and I would think most other distros would too.

François

Dima Pasechnik

unread,
Oct 10, 2019, 3:24:12 PM10/10/19
to sage-devel
On Debian gp (from pari/gp) links statically to  libpari, for performance reasons.

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.

Volker Braun

unread,
Oct 12, 2019, 7:30:33 AM10/12/19
to sage-devel
IMHO its a bug to have static libraries in any sort of maintainable distribution, besides the wasted disk space its also an unnecessary headache to understand the binary dependencies. There is some theoretical performance increase, but if you are really chasing the last few percentage points then you'll want to build everything with your own optimized compiler flags anyways. 

E. Madison Bray

unread,
Dec 16, 2019, 6:32:43 AM12/16/19
to sage-devel
On Thu, Oct 10, 2019 at 9:24 PM Dima Pasechnik <dim...@gmail.com> wrote:
>
> On Debian gp (from pari/gp) links statically to libpari, for performance reasons.

Okay, but that's no reason Sage needs to install static libs in
$SAGE_LOCAL/lib. It should only ever be necessary if one package
needs to statically link a library from another package at build time
for some reason...
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq1qR6EJeTxUS%3DfO7cuLmCaBUqgmj23Sze1W6q%2B6UbqeWw%40mail.gmail.com.

Dima Pasechnik

unread,
Dec 19, 2019, 10:43:09 PM12/19/19
to sage-devel
On Mon, Dec 16, 2019 at 7:32 PM E. Madison Bray <erik....@gmail.com> wrote:
>
> On Thu, Oct 10, 2019 at 9:24 PM Dima Pasechnik <dim...@gmail.com> wrote:
> >
> > On Debian gp (from pari/gp) links statically to libpari, for performance reasons.
>
> Okay, but that's no reason Sage needs to install static libs in
> $SAGE_LOCAL/lib. It should only ever be necessary if one package
> needs to statically link a library from another package at build time
> for some reason...

a further size saving might be achieved by letting GSL use OpenBLAS
rather than built its own BLAS.
While OpenBLAS is listed as GSL's dependency, it's actually not used
in Sage (so it's puzzling to me
why $(BLAS) is even a dependency of GSL, perhaps some historical reasons)

Alternatively one, I suppose, may use GSL's BLAS in the whole of Sage,
and do not build OpenBLAS
(this is certainly a loss in efficiency, but a win in ease of building etc)

Dima


>
> > On Thu, Oct 10, 2019 at 2:19 PM François Bissey <frp.b...@gmail.com> wrote:
> >>
> >>
> >>
> >> > On 11/10/2019, at 4:53 AM, Dima Pasechnik <dim...@gmail.com> wrote:
> >> >
> >> > (IIRC there are few places that need static libs)
> >>
> >> There are a few places where people claim they want the static libraries
> >> for performance reasons. I live perfectly well without static libraries
> >> in sage-on-gentoo and I would think most other distros would too.
> >>
> >> François
> >>
> >> --
> >> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> >> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/04A0AAD6-458C-45EC-A01B-35CA55059FDB%40gmail.com.
> >
> > --
> > You received this message because you are subscribed to the Google Groups "sage-devel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq1qR6EJeTxUS%3DfO7cuLmCaBUqgmj23Sze1W6q%2B6UbqeWw%40mail.gmail.com.
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAOTD34Yn-V0i5aaz%2Bi6M9J6kUEx%2BK1s%2Bby%2ByupbAfHZE0OotzQ%40mail.gmail.com.

Isuru Fernando

unread,
Dec 19, 2019, 11:18:14 PM12/19/19
to sage-devel
On Thu, Dec 19, 2019 at 9:43 PM Dima Pasechnik <dim...@gmail.com> wrote:
On Mon, Dec 16, 2019 at 7:32 PM E. Madison Bray <erik....@gmail.com> wrote:
>
> On Thu, Oct 10, 2019 at 9:24 PM Dima Pasechnik <dim...@gmail.com> wrote:
> >
> > On Debian gp (from pari/gp) links statically to  libpari, for performance reasons.
>
> Okay, but that's no reason Sage needs to install static libs in
> $SAGE_LOCAL/lib.  It should only ever be necessary if one package
> needs to statically link a library from another package at build time
> for some reason...

a further size saving might be achieved by letting GSL use OpenBLAS
rather than built its own BLAS.
While OpenBLAS is listed as GSL's dependency, it's actually not used
in Sage (so it's puzzling to me
why $(BLAS) is even a dependency of GSL, perhaps some historical reasons)


Alternatively one, I suppose, may use GSL's BLAS in the whole of Sage,
and do not build OpenBLAS
(this is certainly a loss in efficiency, but a win in ease of building etc)

No, GSL's gslcblas provides only CBLAS API and doesn't provide BLAS or LAPACK APIs.

Isuru

Dima


>
> > On Thu, Oct 10, 2019 at 2:19 PM François Bissey <frp.b...@gmail.com> wrote:
> >>
> >>
> >>
> >> > On 11/10/2019, at 4:53 AM, Dima Pasechnik <dim...@gmail.com> wrote:
> >> >
> >> > (IIRC there are few places that need static libs)
> >>
> >> There are a few places where people claim they want the static libraries
> >> for performance reasons. I live perfectly well without static libraries
> >> in sage-on-gentoo and I would think most other distros would too.
> >>
> >> François
> >>
> >> --
> >> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> >> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/04A0AAD6-458C-45EC-A01B-35CA55059FDB%40gmail.com.
> >
> > --
> > You received this message because you are subscribed to the Google Groups "sage-devel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq1qR6EJeTxUS%3DfO7cuLmCaBUqgmj23Sze1W6q%2B6UbqeWw%40mail.gmail.com.
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAOTD34Yn-V0i5aaz%2Bi6M9J6kUEx%2BK1s%2Bby%2ByupbAfHZE0OotzQ%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages