#9914: Remove libraries from extension modules when they are not needed there at
build time
------------------------------+---------------------------------------------
   Reporter:  leif            |       Owner:  leif                              
                                     
       Type:  defect          |      Status:  needs_work                        
                                     
   Priority:  major           |   Milestone:  sage-4.6                          
                                     
  Component:  build           |    Keywords:  module_list.py PARI ImportError 
newforms homspace mwrank upgrade update
     Author:  Leif Leonhardy  |    Upstream:  N/A                               
                                     
   Reviewer:                  |      Merged:                                    
                                     
Work_issues:                  |  
------------------------------+---------------------------------------------

Comment(by leif):

 Replying to [comment:4 GeorgSWeber]:
 > Sorry, but this will certainly break on Cygwin!

 Did you read the comments here or at the other ticket? I explicitly asked
 if this is needed on Cygwin (twice), cc'ed Mike, and suggested to use
 {{{uname_specific()}}} in that case.

 > Just have a look at the Makefile for the "g0nntl" library (in the eclib
 spkg, see the file /src/g0n/Makefile, line 41):
 > [[BR]]
 > NTLLFLAGS = -L$(NTLLIBDIR) -lntl -lgmp -lpari

 Bad example, since you can safely remove PARI there (too; and also from
 {{{NTLLFLAGS}}} in all other Makefiles); NTL uses GMP, but not PARI. (Only
 {{{procs/parifact.*}}} uses PARI, so PARI has to be linked to all
 executables and shared libraries that contain / use ''that'', e.g.
 {{{libjcntl.{so,dylib,dll}}}}, which in turn is linked to
 {{{libg0nntl.*}}}.)

 (Note that "pari" is '''not''' listed in the {{{libraries}}} of
 {{{sage.libs.cremona.mat}}}, though "jcntl" is, and "g0nntl", too.)

 Even if e.g. {{{libg0nntl.so}}} directly depended on PARI, none of the
 extension modules whose {{{libraries}}} I've changed does.

 There's a difference between dynamically and statically linking btw.

 > I've changed the title of the ticket somewhat, to reflect this, and
 added a line to the description.

 By ''"removing ... from the extension modules"'' I meant removing the in
 fact (locally) unused libraries from the dynamic (dependencies) section,
 i.e. for example the {{{NEEDED}}} entries in ELF.

 > If this ticket is meant to fix some OS X specific issue (see the main
 ticket at trac #9896), I'd propose to use the "uname_specific" feature in
 such a way, that the change to the module_list.py affects Darwin --- and
 only Darwin.

 Again, as mentioned in my first comment here, and also at #9896, this is a
 ''general'' problem which is unrelated to Darwin as the OS.

 > Ensuring that the change is visible on only as few system as possible,
 as few systems as possible are affected of a possible breakage by such a
 change.

 The opposite is closer to what is needed: if at all, PARI has to be listed
 in {{{libraries}}} ''only on Cygwin'' (or MS Windows) if you're right (but
 see above); I'm not sure if it would be required on older Darwins as well.

 So I'll update the patch to use {{{uname_specific()}}} (if that makes you
 happy ;-) - I'd really like to give it a try ''as is'' on Cygwin), which
 then should be tested (also) on MacOS X 10.4 (Tiger).

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9914#comment:5>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to