Opened 12 years ago

Last modified 8 years ago

#9914 closed defect

Remove libraries from extension modules when they are not needed there at build time — at Version 4

Reported by: leif Owned by: leif
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: build Keywords: module_list.py PARI ImportError newforms homspace mwrank upgrade update
Cc: jhpalmieri, mhansen, mpatel, kcrisman, jpflori Merged in:
Authors: Leif Leonhardy Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by GeorgSWeber)

Many extension modules in devel/sage/module_list.py are linked against libraries they do not use, some at least not directly.

This is inefficient, isn't nice or at least confusing and can (actually does) cause trouble.

See e.g. this comment for a discussion why.

This ticket will only address the removal of some unnecessary libraries listed; there are most probably more.

ADDED LATER: See however the later remarks about that claim of being unnecessary ...

Change History (4)

comment:1 follow-up: Changed 12 years ago by leif

  • Authors set to Leif Leonhardy
  • Cc jhpalmieri mpatel added
  • Keywords PARI ImportError newforms homspace mwrank upgrade update added
  • Status changed from new to needs_review

I've attached a first patch that removes PARI from libraries of:

  • sage.libs.cremona.homspace
  • sage.libs.cremona.newforms
  • sage.libs.mwrank.mwrank

Hope this doesn't cause trouble on non-Unices (like e.g. Cygwin), otherwise we would have to add uname_specific(...) (which is defined in module_list.py for such purposes).

(This patch fixes one of the upgrade issues discussed at #9896; these are in general not limited to MacOS X.)

Setting this to "needs review" to perhaps get it merged (early) into Sage 4.6.*, though more changes (to module_list.py) are desirable.

comment:2 in reply to: ↑ 1 ; follow-up: Changed 12 years ago by drkirkby

Replying to leif:

Hope this doesn't cause trouble on non-Unices (like e.g. Cygwin),

I assume you tested this on Linux - that is a non-Unix!

Solaris, recent OS X, AIX 5.3 or later and one of the more recent HP-UX releases are Unix.

Even the {{{df}} command of Linux violates the Unix standard.

Dave

comment:3 in reply to: ↑ 2 Changed 12 years ago by leif

Replying to drkirkby:

Replying to leif:

Hope this doesn't cause trouble on non-Unices (like e.g. Cygwin),

I assume you tested this on Linux

I did.

  • that is a non-Unix!

U[nN][iI][xX] is a trademark, but also a stretchable term. ;-)

Should I say Ux-like OSs?

comment:4 Changed 12 years ago by GeorgSWeber

  • Description modified (diff)
  • Status changed from needs_review to needs_work
  • Summary changed from Remove unused libraries from extension modules to Remove libraries from extension modules when they are not needed there at build time

Sorry, but this will certainly break on Cygwin!

Just have a look at the Makefile for the "g0nntl" library (in the eclib spkg, see the file /src/g0n/Makefile, line 41):

NTLLFLAGS = -L$(NTLLIBDIR) -lntl -lgmp -lpari

This means that the g0nntl library has the pari library as a dependency. And on Cywgin (Windows in general), not only the "primary" libraries have to be declared as dependencies during compile time (i.e. for building e.g. an extension module) --- but *all* libraries, i.e. also the "secondary", "tertiary", and so on ... (one may consider this a bug, a deficiency, a nuisance, whatever --- we have to live with it)

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

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.

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.

Note: See TracTickets for help on using tickets.