Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow NTL to build on Solaris with Sun or GNU linker #6380

Closed
sagetrac-drkirkby mannequin opened this issue Jun 21, 2009 · 11 comments
Closed

Allow NTL to build on Solaris with Sun or GNU linker #6380

sagetrac-drkirkby mannequin opened this issue Jun 21, 2009 · 11 comments

Comments

@sagetrac-drkirkby
Copy link
Mannequin

sagetrac-drkirkby mannequin commented Jun 21, 2009

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/

Component: porting: Solaris

Keywords: solaris ntl makefile GNUism

Author: David Kirkby

Reviewer: William Stein

Merged: sage-4.1.1.alpha0

Issue created by migration from https://trac.sagemath.org/ticket/6380

@sagetrac-drkirkby sagetrac-drkirkby mannequin added this to the sage-4.1.1 milestone Jun 21, 2009
@sagetrac-drkirkby sagetrac-drkirkby mannequin self-assigned this Jun 21, 2009
@williamstein
Copy link
Contributor

comment:1

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

@rlmill
Copy link
Mannequin

rlmill mannequin commented Jul 2, 2009

comment:2

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

@rlmill rlmill mannequin added s: needs work and removed s: positive review labels Jul 2, 2009
@rlmill
Copy link
Mannequin

rlmill mannequin commented Jul 2, 2009

comment:3

Replying to @rlmill:

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

@sagetrac-drkirkby
Copy link
Mannequin Author

sagetrac-drkirkby mannequin commented Jul 9, 2009

Reviewer: was

@sagetrac-drkirkby
Copy link
Mannequin Author

sagetrac-drkirkby mannequin commented Jul 9, 2009

comment:4

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)

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Jul 15, 2009

comment:6

Replying to @sagetrac-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

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Jul 15, 2009

Changed reviewer from was to William Stein

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Jul 15, 2009

comment:7

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".

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Jul 15, 2009

Author: David Kirkby

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Jul 16, 2009

comment:8

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 :-(

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Jul 16, 2009

Merged: sage-4.1.1.alpha0

@sagetrac-mvngu sagetrac-mvngu mannequin closed this as completed Jul 16, 2009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant