Opened 11 years ago

Closed 9 years ago

#12472 closed defect (worksforme)

GMP-ECM: disable asm redc when building with clang

Reported by: R. Andrew Ohana Owned by: Georg S. Weber
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: build Keywords:
Cc: Merged in:
Authors: Reviewers: Leif Leonhardy, Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #14151 Stopgaps:

Status badges

Description (last modified by Leif Leonhardy)

Currently using an asm redc breaks building ECM when compiling with clang; we should disable this when clang is used until it is fixed.

I've posted an spkg at http://wstein.org/home/ohanar/clang-port/sage-5.0.beta1-src/spkg/standard/ecm-6.3.p4.spkg.

Attachments (1)

ecm-clang.patch (951 bytes) - added by R. Andrew Ohana 11 years ago.
for review purposes

Download all attachments as: .zip

Change History (19)

Changed 11 years ago by R. Andrew Ohana

Attachment: ecm-clang.patch added

for review purposes

comment:1 Changed 11 years ago by R. Andrew Ohana

Status: newneeds_review

comment:2 in reply to:  description Changed 11 years ago by Jeroen Demeyer

Authors: R. Andrew Ohana

Replying to ohanar:

currently using an asm redc breaks building ecm when compiling with clang

Could you please specify in which sense it "breaks"?

comment:3 Changed 11 years ago by Jeroen Demeyer

I really dislike testing the value of "$CC". Couldn't you check the output of "$CC --version" or something like this?

comment:4 Changed 11 years ago by Jeroen Demeyer

Also, I'm updating the ecm spkg for a different reason at #12501. Would you mind basing your spkg on the one from #12501?

comment:5 Changed 11 years ago by Leif Leonhardy

Description: modified (diff)
Summary: disable asm redc when building with clangGMP-ECM: disable asm redc when building with clang

We should IMHO disable this conditionally, depending on the compiler used.

Don't know whether you've already rebased your spkg on that of #12501.

Btw., upgrading to GMP-ECM 6.4.2 "is recommended" :-) (by Paul Zimmermann).

comment:6 in reply to:  5 Changed 11 years ago by Leif Leonhardy

Description: modified (diff)

Replying to leif:

We should IMHO disable this conditionally, depending on the compiler used.

Oh, I see, your patch already does this. The ticket's description was a bit misleading...

comment:7 Changed 11 years ago by R. Andrew Ohana

yeah, sorry. I was posting a bunch of clang fixes fixes at the time :)

Also, I have not yet rebased my spkg.

Last edited 11 years ago by R. Andrew Ohana (previous) (diff)

comment:8 Changed 10 years ago by Mariah Lennox

Status: needs_reviewneeds_work

comment:9 Changed 10 years ago by Leif Leonhardy

Dependencies: #12830

Now needs to be rebased on the GMP-ECM 6.3.p7 spkg from #12830.

I also have a -- still preliminary -- p8 related to #11705, i.e., fixing the asm redc code for dynamic linking on Linux PPC64 (which now probably also needs its own ticket...)

comment:10 Changed 10 years ago by R. Andrew Ohana

Status: needs_workneeds_review

ok, rebased

comment:11 Changed 9 years ago by Jeroen Demeyer

Dependencies: #12830#14151
Status: needs_reviewneeds_work

Is this issue still valid? In any case, it needs to be rebased to ECM 6.4.4 (#14151).

Also: has upstream been contacted?

comment:12 Changed 9 years ago by Leif Leonhardy

It seems GMP-ECM 6.4.4('s configure) no longer supports --disable-asm-redc, but only --enable-asm-redc=no (for whatever reason, haven't investigated why).

FWIW, I immediately get "Illegal instruction" in make check regardless of the setting; this is with an older svn version of clang though (clang version 3.1 (trunk 155201)).

Last edited 9 years ago by Leif Leonhardy (previous) (diff)

comment:13 Changed 9 years ago by Jeroen Demeyer

Works for me (even with checking) on sage.math with Clang-3.2 and ECM-6.4.4

comment:14 in reply to:  13 ; Changed 9 years ago by Leif Leonhardy

Replying to jdemeyer:

Works for me (even with checking) on sage.math with Clang-3.2 and ECM-6.4.4

Yep, my svn version appears to be broken somehow.

Still, --disable-asm-redc doesn't work.

comment:15 in reply to:  14 Changed 9 years ago by Leif Leonhardy

Status: needs_workneeds_info

Replying to leif:

Replying to jdemeyer:

Works for me (even with checking) on sage.math with Clang-3.2 and ECM-6.4.4

Yep, my svn version appears to be broken somehow.

Works for me with clang 3.2, too, even with --enable-asm-redc (the default) on Linux x86_64; make check as well as all (long) doctests in sage/libs/libecm.py passed.

comment:16 Changed 9 years ago by Jeroen Demeyer

Authors: R. Andrew Ohana
Milestone: sage-5.10sage-duplicate/invalid/wontfix
Reviewers: Leif Leonhardy, Jeroen Demeyer
Status: needs_infoneeds_review

comment:17 Changed 9 years ago by Jeroen Demeyer

Status: needs_reviewpositive_review

comment:18 Changed 9 years ago by Jeroen Demeyer

Resolution: worksforme
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.