-
-
Notifications
You must be signed in to change notification settings - Fork 565
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
Ensure that libraries link to the shared version of NTL by default #11635
Comments
This comment has been minimized.
This comment has been minimized.
comment:1
New spkg at http://sage.math.washington.edu/home/kcrisman/ntl-5.5.2.p0.spkg. No guarantees on whether this works, or even is necessary (!) but I strongly suspect both. You'll know it works if you do everything at #6743, including this, and then Sage has a segfault on startup. In case there is any doubt that this is Cygwin-only:
|
Author: Karl-Dieter Crisman |
comment:3
Interestingly, the most recent alpha I tested all the Cygwin stuff on a few weeks ago already had NTL 5.5.2!
and it seemed to work fine (in the sense that it got to the Pari segfault when initializing). That doesn't mean that later in the process things wouldn't happen, but at least for now this ticket can be lower priority, if it's needed at all, since we have to figure out how to get past that error first. |
comment:5
This appears to be the same issue as #12104, which should probably be closed as a duplicate then. |
comment:6
Since the 4.8.alpha3 spkg still is 5.5.2 with no patches, this spkg should still be valid to fix this. |
comment:7
Oh, and no longer 'needs info', because #12104 shows that it's needed to start Sage. |
comment:9
No idea! I just copied models from other spkgs. Feel free to only copy and/or make links where actually appropriate. I have never claimed to be anything close to an expert; I've only focused on getting it to work by following other spkgs I've seen. I would love to have this "correct" so that we never have to worry about it again. |
comment:10
Replying to @kcrisman:
This might even be part of the problem at #9167. |
comment:11
Replying to @kcrisman:
Just for posterity (addressing the comments at #12104, perhaps?), here is the rationale for naming it dll.a, from #9050.
|
comment:12
Replying to @kcrisman:
that means that only in the cases when both static and dynamic libraries are built, this is needed. |
comment:13
Replying to @kcrisman:
IMHO, this is, at best, a bad hack. In principle, *.dll.a files are import libraries for *.dll libaries, |
comment:14
Well, as I said in comment:9, I would more than happy to have someone who actually knows what they are talking about to fix this and post a different spkg :) especially if it ended up fixing #9167. Go for it! |
comment:15
Replying to @kcrisman:
It's probably OK to have "real" (i.e. dynamic libs, not misnamed dll.a or other files) .dlls in local/bin/, and bad to have them in local/lib/. At least that's what a Cygwin-aware libtool will be doing. |
comment:16
Can you be more specific (if only so I can make a good spkg)? Please check which of the following should be copied, which should be linked (with
|
comment:17
Here's something else potentially relevant.
|
comment:58
I can't review that piece, sadly. I guess it would also be helpful to make sure this actually solves the Cygwin problem. I still have to get Sage to start, forking problems, sigh... |
comment:59
Actually, now it does, magically. Somehow installing cvxopt and sage-location resetting paths did the job. As to the rest: I like the removed files (Debian and non-patches) and most of the patch file changes, though I can't speak for mfile.patch. The changes in |
comment:60
There is no need for soft links and/or copying files and/or renaming them. Using libtool, the upstream build system install the following files on Cygwin:
When using -lntl, ld will find first libntl.dll.a and in the end link to the dynamic library cygntl.dll. On other systems the difference in file installed are minimal and will surely go unnoticed and the shared library will still gets picked up first. |
comment:61
This seems to be fine on Mac - relevant tests pass, if anything more quickly.
I mean, if the Sage library passes tests with this, I'm inclined to say let's get this in. I still don't understand why upstream needs libtool to do its installing, but if that's a fairly standard solution in this kind of package then that should be okay too.[[Image()]] |
comment:62
Okay, I can't give a 100% positive review because I know nothing about libtool, but using the upstream solution makes a heck of a lot more sense if we don't have to add any other dependencies and just a few files, and the pieces I do understand of it make sense. I built 5.5.rc0 with this on sage.math from scratch, and used Jeroen, do you get what JP is trying to do and can you give this positive review based on that part of the changes in the spkg? |
Reviewer: Karl-Dieter Crisman |
comment:63
Ping. I almost think it would be better to just put this in and let the test farm find any problems; using upstream's tools seems logical. |
comment:64
Replying to @kcrisman:
You mean the Sage buildbot, right? In that case, just put the ticket to positive review if you are convinced that testing is the only thing remaining to be done. |
comment:65
Minor comment: you should quote
|
comment:66
And libtool should not be part of the Mercurial history, since it's just upstream files (similar to src). |
comment:67
There is also a strange file I am preparing a new spkg. |
This comment has been minimized.
This comment has been minimized.
Spkg diff, for review only. |
comment:69
Attachment: ntl-5.5.2.p0.diff.gz Thanks for improving the spkg. |
comment:71
Sweet, I'll try this out on XP again right now. Thanks |
Merged: sage-5.6.beta3 |
Changed author from Karl-Dieter Crisman, Jean-Pierre Flori to Jean-Pierre Flori |
comment:73
I think that my role as author was fairly limited in the final version, and presumably someone needs to have reviewed me in any case ;-) |
In #11547, we added copying of several needed dlls on Cygwin. However, in the meantime NTL had a fairly major update (#5731).
From version 5.5, NTL provides a new build system using libtool (although libtool itself is not provided!) to generate shared libraries.
On Cygwin, libtool properly install the shared library as cygntl-?.dll in the bin directory and the import file as libntl.dll.a in the lib directory, together with a libtool file libntl.la and a static version of the library as libntl.a.
In particular, this ensures that the shared version is linked with by default because ld/gcc/g++ find the .dll.a file in the lib directory (which points to the dll file in the bin directory) before the .a file.
Moreover, only moving the previously built libntl.dll to libntl.dll.a was not a solution.
Indeed, the built file hardcoded its own build-time name into itself (as a DT_SONAME on linux), so that libraries linked to it (before or after renaming, does not matter) would in fact search for a file with the build time name... and fail.
spkg: http://boxen.math.washington.edu/home/jdemeyer/spkg/ntl-5.5.2.p0.spkg
This spkg vastly simplifies the old spkg-install, uses the (slightly patched) upstream build system and includes its own version of libtool (or rather the tools needed to generate it on the fly).
CC: @mwhansen @dimpase @jpflori @jdemeyer
Component: porting: Cygwin
Keywords: cygwin ntl libtool spkg
Author: Jean-Pierre Flori
Reviewer: Karl-Dieter Crisman
Merged: sage-5.6.beta3
Issue created by migration from https://trac.sagemath.org/ticket/11635
The text was updated successfully, but these errors were encountered: