#5847: Update GMP-ECM to 6.3
------------------------------------------------------------+---------------
Reporter: mabshoff | Owner:
leif
Type: enhancement | Status:
needs_info
Priority: major | Milestone:
sage-4.7.1
Component: packages | Resolution:
Keywords: MPIR elliptic curves libecm ecm spkg | Work_issues:
Upstream: N/A | Reviewer:
Leif Leonhardy, Dima Pasechnik
Author: Mike Hansen, Leif Leonhardy, Jeroen Demeyer | Merged:
Dependencies: |
------------------------------------------------------------+---------------
Changes (by leif):
* status: needs_work => needs_info
Comment:
Replying to [comment:98 mariah]:
> sage-4.7.1-alpha1 built with http://spkg-
upload.googlecode.com/files/ecm-6.3.p2.spkg on skynet/flavius
(x86_64-Linux-k8-fc) fails test:
{{{
...
ImportError: /home/mariah/sage/sage-4.7.1.alpha1-x86_64-Linux-k8-fc-
review-5847/local/lib/python/site-packages/sage/libs/libecm.so: cannot
enable executable stack as shared object requires: Permission denied
}}}
>
> Looking at the build I see
>
{{{
...
Adding '-fPIC' to CFLAGS since we don't (also) build a shared library.
...
Settings from SAGE_LOCAL/include/gmp.h:
CC=gcc
CFLAGS=-O2 -m64 -march=k8 -mtune=k8
Using CC=gcc
Using CFLAGS=-march=native -g -O3 -fPIC
Using CPPFLAGS=
Using LDFLAGS=
...
}}}
>
> '''Strongly''' suggest ecm be built with same CFLAGS values as gmp/mpir
as recommended by ecm INSTALL file.
[[BR]]
Hi Mariah,
this failure is rather unrelated to the GMP-ECM package itself (since we
only build a static library, see above), but a "common" Fedora (>=14 /
SELinux) / GCC problem; cf. e.g. #10188.
The `libecm.so` extension module -- which erroneously carries the
"executable stack" flag -- is built by Cython from `libecm.pyx`.
Could you please first try
{{{
#!sh
$ execstack -c local/lib/python/site-packages/sage/libs/libecm.so
}}}
and rerun the test?
(Taking the flags from MPIR / `gmp.h` wouldn't help anyway in this case.)
----
If the above works, you could then patch `module_list.py`:
{{{
#!diff
diff --git a/module_list.py b/module_list.py
--- a/module_list.py
+++ b/module_list.py
@@ -561,6 +561,7 @@
Extension('sage.libs.libecm',
sources = ['sage/libs/libecm.pyx'],
libraries = ['ecm', 'gmp'],
+ extra_compile_args=["-Wl,-z,noexecstack"],
depends = [SAGE_ROOT + "/local/include/ecm.h"]),
Extension('sage.libs.mwrank.mwrank',
}}}
Then you probably have to touch `libecm.pyx` in order to convince Cython
to rebuild the module before issuing `./sage -b`. Afterwards the tests
should pass without the need to rerun `execstack`. (You can check the
flag's setting by running `execstack -q ...`.)
Let me know if the above works and/or if you need a Mercurial patch for
that... ;-)
(Just curious: Which GCC version are you using now? The problem may or
should have arised with earlier version of Sage on Fedora, too.)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5847#comment:99>
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.