#16105: Stop linking everything to libntl
-------------------------------------------------+-------------------------
       Reporter:  darij                          |        Owner:
           Type:  defect                         |       Status:  closed
       Priority:  blocker                        |    Milestone:  sage-6.2
      Component:  build                          |   Resolution:  fixed
       Keywords:  ntl, crash                     |    Merged in:
        Authors:  Jeroen Demeyer                 |    Reviewers:  Volker
Report Upstream:  N/A                            |  Braun
         Branch:                                 |  Work issues:
  2770a55d98ddb44edb113207e00c502baf30acb6       |       Commit:
   Dependencies:                                 |     Stopgaps:
-------------------------------------------------+-------------------------

Comment (by fbissey):

 I almost feel like I am watching on the side while eating popcorn :) ...
 But that will probably create me a bit of work in sage-on-gentoo by
 breaking patches :P

 So I will take a serious look at this because I don't want to clean as
 little as possible. Jeroen, is there a reason why you are inconsistent in
 removing stdc++ in extension that are marked "language = c++". I am
 presuming that stdc++ is always brought in by the c++ compiler. So, in the
 patch I would expect it to be removed from:
  * sage.algebras.quatalg.quaternion_algebra_element
  * sage.algebras.quatalg.quaternion_algebra_cython
  * sage.numerical.backends.glpk_graph_backend

 Now I will try to work through the libs on my sage-on-gentoo install which
 is all compiled with --as-needed and see if you got the minimal set of
 library. I already have an answer for the top one in your patch, gmpxx is
 not needed:
 {{{
 ldd -r /usr/lib64/python2.7/site-
 packages/sage/algebras/quatalg/quaternion_algebra_element.so
         linux-vdso.so.1 (0x00007fffe372b000)
         libcsage.so => /usr/lib64/libcsage.so (0x00007f6d4cb06000)
         libflint.so.2.4.3 => /usr/lib64/libflint.so.2.4.3
 (0x00007f6d4c778000)
         libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007f6d4c507000)
         libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-
 gnu/4.8.2/libstdc++.so.6 (0x00007f6d4c1ff000)
         libpython2.7.so.1.0 => /usr/lib64/libpython2.7.so.1.0
 (0x00007f6d4be4e000)
         libc.so.6 => /lib64/libc.so.6 (0x00007f6d4baa0000)
         libntl-6.1.0.so => /usr/lib64/libntl-6.1.0.so (0x00007f6d4b6fe000)
         libpari-gmp.so.3 => /usr/lib64/libpari-gmp.so.3
 (0x00007f6d4b0bd000)
         libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-
 gnu/4.8.2/libgcc_s.so.1 (0x00007f6d4aea5000)
         libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6d4ac88000)
         libmpfr.so.4 => /usr/lib64/libmpfr.so.4 (0x00007f6d4aa2d000)
         libm.so.6 => /lib64/libm.so.6 (0x00007f6d4a730000)
         /lib64/ld-linux-x86-64.so.2 (0x00007f6d4cf88000)
         libdl.so.2 => /lib64/libdl.so.2 (0x00007f6d4a52c000)
         libutil.so.1 => /lib64/libutil.so.1 (0x00007f6d4a329000)
         libgf2x.so.1 => /usr/lib64/libgf2x.so.1 (0x00007f6d4a113000)
 }}}
 And readelf is even more minimalist:
 {{{
 readelf -d /usr/lib64/python2.7/site-
 packages/sage/algebras/quatalg/quaternion_algebra_element.so

 Dynamic section at offset 0x26c90 contains 30 entries:
   Tag        Type                         Name/Value
  0x0000000000000001 (NEEDED)             Shared library: [libcsage.so]
  0x0000000000000001 (NEEDED)             Shared library:
 [libflint.so.2.4.3]
  0x0000000000000001 (NEEDED)             Shared library: [libgmp.so.10]
  0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
  0x0000000000000001 (NEEDED)             Shared library:
 [libpython2.7.so.1.0]
  0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
  0x000000000000000c (INIT)               0x5938
 }}}
 libpari probably comes through libcsage, all the rest, indirect linking...

--
Ticket URL: <http://trac.sagemath.org/ticket/16105#comment:37>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to