Ticket #3256 (new enhancement)

Opened 8 months ago

Last modified 7 months ago

[with patch; mixed review] soname and correct -fPIC handling for zn_poly

Reported by: tabbott Assigned to: mabshoff
Priority: major Milestone: sage-3.4
Component: packages Keywords: editor_mabshoff
Cc: f.r.bissey@massey.ac.nz, dmharvey

Description

I've attached a patch (developed with Francois Bissey) that should make zn_poly have shared library versioning and build the shared library with -fPIC but the static library without -fPIC.

My patch includes the relevant changes to the Debian packaging to make it fully Debian policy-compliant.

It also includes the relevant changes to spkg-install and SAGE-style copy patches that should make SAGE use the new version, though I haven't tested that part.

Attachments

zn-poly-soname-pic.patch (16.9 kB) - added by tabbott on 05/19/2008 11:44:31 AM.
zn-poly-standards.patch (1.5 kB) - added by tabbott on 05/25/2008 08:06:57 PM.

Change History

05/19/2008 11:44:31 AM changed by tabbott

  • attachment zn-poly-soname-pic.patch added.

05/19/2008 12:09:08 PM changed by mabshoff

  • cc changed from f.r.bissey@massey.ac.nz to f.r.bissey@massey.ac.nz, dmharvey.

I added David Harvey to the CC field since he is upstream. I did also do some work to get zn_poly to build in 64 bit mode on OSX [But I think I can limit this to spkg-install], so I will likely merge this in together with that patch into 3.0.2.rc0.

Cheers,

Michael

05/19/2008 03:23:16 PM changed by tabbott

I bet you'll need to change the cp -a I used when patching to just cp for it to work on solaris.

05/25/2008 08:06:40 PM changed by tabbott

By the way, the dist/debian/rules file in the current zn_poly spkg is incorrectly not marked as executable.

Also, I've attached a patch on top of the last patch that does some trivial improvements to the zn_poly Debian packaging.

05/25/2008 08:06:57 PM changed by tabbott

  • attachment zn-poly-standards.patch added.

06/13/2008 10:43:59 AM changed by mabshoff

This patch as is breaks when using either the Solaris or *BSD linker. I would suggest that for the Debian package we patch in the soname and other options only when building the Debian package.

Cheers,

Michael

06/13/2008 10:45:02 AM changed by mabshoff

  • summary changed from [with patch; needs review] soname and correct -fPIC handling for zn_poly to [with patch; mixed review] soname and correct -fPIC handling for zn_poly.

06/14/2008 01:47:37 PM changed by tabbott

What goes wrong?

In the long term, I'd like to see the patch fixed to work on all platforms and merged upstream. It's of course fine to have them just on Debian in the short term, but it's bad for sonames to be different between different distributions. So, I think our goal should be to fix the bugs.

06/14/2008 01:54:11 PM changed by dmharvey

Hi guys,

I am quite happy to merge the patch upstream as soon as y'all have figured it out. I have been distracted by another project for a couple of weeks. I will get back to zn_poly soon.

06/14/2008 02:00:32 PM changed by mabshoff

Hi,

the problem is that on Solaris the ld available does not understand the GNUism of -Wlsoname as is. Check out the soname linker options for Solaris at

http://www.fortran-2000.com/ArnaudRecipes/sharedlib.html

I did not find anything comprehensive on linker options anywhere else on the quick, but it ought to do. The patch will work on all currently working platforms, but will break on Solaris and *BSD when using the default linker. The GNU linker is usually available, but normally not installed or not in the default $PATH. And on Solaris we want to be able to build Sage without relying on GNU tools in the future. In addition gcc can be compiled on Solaris to use the Sun ld and many people on Solaris do that, so even if GNU ld is available things go horribly wrong.

Cheers,

Michael

06/19/2008 09:56:27 PM changed by craigcitro

  • keywords set to editor_mabshoff.