Opened 13 years ago

Closed 13 years ago

#6380 closed defect (fixed)

[with patch, positive review] Allow NTL to build on Solaris with Sun or GNU linker

Reported by: David Kirkby Owned by: David Kirkby
Priority: major Milestone: sage-4.1.1
Component: porting: Solaris Keywords: solaris ntl makefile GNUism
Cc: Merged in: sage-4.1.1.alpha0
Authors: David Kirkby Reviewers: William Stein
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Although the ntl-5.4.2.p7 package would build on Solaris 10 with gcc 4.4.0 if the gcc was configured to use the GNU linker from binutils, the package would not build with the gcc if the compiler was configured to use the Sun linker, with the following options:

--with-ld=/usr/ccs/bin/ld --without-gnu-ld

The part of the makefile executed when building a shared library would fail if the Sun linker was used. The makefile specified the same output filename twice, but in a way the Sun linker would not tolerate.

This patch simply removes a very small bit of code (just "-Wl,-soname,libcat DIRNAME.so "), which allows NTL to build properly, irrespective of the linker that is being used.

Please see

http://sage.math.washington.edu/home/kirkby/Solaris-fixes/ntl/

Change History (9)

comment:1 Changed 13 years ago by William Stein

Summary: [with patch, needs review] Allow NTL to build on Solaris with Sun or GNU linker[with patch, positive review] Allow NTL to build on Solaris with Sun or GNU linker

Positive review, though I didn't test it with the Sun linker, it looks very sensible and doesn't break things.

An spkg with the changes checked into the repo and a typo fixed is now here:

http://sage.math.washington.edu/home/wstein/patches/ntl-5.4.2.p8.spkg

comment:2 Changed 13 years ago by Robert Miller

Summary: [with patch, positive review] Allow NTL to build on Solaris with Sun or GNU linker[with patch, needs work] Allow NTL to build on Solaris with Sun or GNU linker

Unfortunately, another ticket already got "p8", and the changes here need to be reapplied to that spkg.

comment:3 in reply to:  2 Changed 13 years ago by Robert Miller

Replying to rlm:

Unfortunately, another ticket already got "p8", and the changes here need to be reapplied to that spkg.

That spkg is available here:

http://sage.math.washington.edu/home/rlmill/ntl-5.4.2.p8.spkg

comment:4 Changed 13 years ago by David Kirkby

Reviewers: was
Summary: [with patch, needs work] Allow NTL to build on Solaris with Sun or GNU linker[with patch, needs review] Allow NTL to build on Solaris with Sun or GNU linker

OK, I've made the changes.

Please see:

http://sage.math.washington.edu/home/kirkby/Solaris-fixes/ntl-5.4.2.p9/ (different directory to last one)

I created a patchfile which shows the differences from the last copy of 'mfile' otherwise the patch would be huge and uncomprehsible, as mfile has been changed so many times. There is actually a patch in the 'patches' directory.

I just noticed I probably put the original and new files in the wrong order, as it looks like I've added stuff to the 'mfile' not taken it away. I have in fact just *removed* -Wl,-soname,libcat DIRNAME.so

Formally the line was:

$(LINK_CXX) -fPIC -shared -Wl,-soname,libcat DIRNAME.so -o libcat DIRNAME.so $(OBJ) $(GMP_LIBDIR)

now it is

$(LINK_CXX) -fPIC -shared -o libcat DIRNAME.so $(OBJ) $(GMP_LIBDIR) $(GMP_LIB)

comment:5 Changed 13 years ago by William Stein

Summary: [with patch, needs review] Allow NTL to build on Solaris with Sun or GNU linker[with patch, positive review] Allow NTL to build on Solaris with Sun or GNU linker

comment:6 in reply to:  4 Changed 13 years ago by Minh Van Nguyen

Replying to drkirkby:

OK, I've made the changes.

Please see:

http://sage.math.washington.edu/home/kirkby/Solaris-fixes/ntl-5.4.2.p9/ (different directory to last one)

The NTL spkg above contains some junk and changes were not checked in. I've checked in changes in David Kirkby's name. The updated spkg is available at

http://sage.math.washington.edu/home/mvngu/patch/ntl-5.4.2.p9.spkg

comment:7 Changed 13 years ago by Minh Van Nguyen

Authors: David Kirkby
Reviewers: wasWilliam Stein

After installing the NTL package at

http://sage.math.washington.edu/home/mvngu/patch/ntl-5.4.2.p9.spkg

and running doctests on all of the Sage library, I got this:

The following tests failed:

        sage -t -long devel/sage-main/sage/modular/hecke/morphism.py # 0 doctests failed
        sage -t -long devel/sage-main/sage/categories/morphism.pyx # 0 doctests failed

The funny thing is that it reports doctest failures, with "0 doctests failed". I reinstalled ntl-5.4.2.p8.spkg and ran all doctests again, and they passed. I then installed ntl-5.4.2.p9.spkg a second time, ran all doctests, and they now passed without any of those weird "0 doctests failed".

comment:8 Changed 13 years ago by Minh Van Nguyen

Just to let people know, this has been merged in sage-4.1.1-alpha0. I can't close this ticket because I don't have the privilege to do so. Sorry, folks :-(

comment:9 Changed 13 years ago by Minh Van Nguyen

Merged in: sage-4.1.1.alpha0
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.