#11635: Ensure that libraries link to the shared version of NTL by default
----------------------------------------------------------+-----------------
Reporter: kcrisman | Owner: tbd
Type: defect | Status:
needs_review
Priority: minor | Milestone:
sage-5.4
Component: cygwin | Resolution:
Keywords: cygwin ntl libtool spkg | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Karl-Dieter Crisman, Jean-Pierre Flori | Merged in:
Dependencies: | Stopgaps:
----------------------------------------------------------+-----------------
Comment (by jpflori):
I'll give it another try:
Since version 5.5, NTL officially supports building a shared version of
the library, but this require a system-wide installation of libtool(... be
also aware that no other parts of autotools are used or required, there
are only calls to "libtool -mode=link ..." in the Makefile, which is
generated by a custom configure script):
see http://www.shoup.net/ntl/doc/tour-unix.html#shared
The Sage spkg was crafted before that new build system, and build shared
libraries by patching the NTL old build system and defining custom
targets.
The problem is that on Cygwin this patched build system installs a shared
libntl.dll and static libntl.a and the .a files gets picked up by default
by the linker when -lntl is passed, whereas we would want the .dll file to
be picked.
A previous proposed workaround was to copy libntl.dll.a to libntl.dll.a
(.dll.a corresponds to import files and are picked up before .a files by
the linker) but that's more of a hack than a real fix.
So we have to solution:
- continue with our patched build system and modify the cygwin target to
build a proper import file and install it with the shared .dll and static
.a files
- use NTL libtool based build system, but that requires to be able to
include the needed piece to generate libtool (not libtoolize), that is
ltmain.sh, install-sh, config.guess and config.sub as mentioned at
http://www.gnu.org/software/libtool/manual/html_node/Distributing.html#Distributing
(or to make a system-wide libtool a Sage dependency, which looks to be a
bad idea).
IIRC to use libtoolize to generate these 4 files would need some skeleton
autotools project (i.e. a nearly empty configure.ac or Makefile.am and
IIRC that's how I generated the four libtool files, just putting the
strict minimal set of autotools macros in one of these two files).
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11635#comment:53>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.