Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#11351 closed defect (fixed)

make flintqs-20070817 spkg build with -m64 rather than -march=opteron

Reported by: mariah Owned by: Mariah Lenox
Priority: major Milestone: sage-4.7.2
Component: packages: standard Keywords: sd32 quadratic sieve
Cc: Merged in: sage-4.7.2.alpha3
Authors: Mariah Lenox Reviewers: Martin Albrecht
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by leif)

sage-4.7.rc2 built on an opteron system [skynet:flavius (x86_64-Linux-k8-fc)] with SAGE_FAT_BINARY="yes", and then moved to another x86_64-Linux system will fail with a segmentation fault on the following code:

set_random_seed(0)
p = next_prime(randrange(2^96))
q = next_prime(randrange(2^97))
n = p * q
qsieve(n) 

qsieve is from the flintqs-20070817 spkg, which by default builds with -march=opteron on all x86_64 systems (and in 32-bit mode).


New spkg: http://sage.math.washington.edu/home/leif/Sage/spkgs/flintqs-20070817.p6.spkg

Attachments (2)

flintqs-20070817.p6.spkg (53.0 KB) - added by mariah 8 years ago.
flintqs-20070817.p5-p6.diff (1.9 KB) - added by mariah 8 years ago.
diff for review purposes only

Download all attachments as: .zip

Change History (13)

Changed 8 years ago by mariah

Changed 8 years ago by mariah

diff for review purposes only

comment:1 Changed 8 years ago by mariah

  • Authors set to Mariah Lenox
  • Description modified (diff)
  • Status changed from new to needs_review

comment:2 Changed 8 years ago by leif

Quite messy.

We should just apply a single patch to the Makefile, and set / pass the appropriate variables (CXXFLAGS, CXXINCS -- usually CPPFLAGS, LIBS, perhaps CXXFLAG64, which we can put into CXXFLAGS).

Also, $(CPP) should be $(CXX); the FLINT (1.5.x) Makefile is btw. equally bad.

-m64 or an analogue (if SAGE64=yes) is only necessary on 64-bit platforms that default to 32-bit builds, i.e. SunOS / Solaris and MacOS X 10.5.

Using stdint.h, uint32_t and uint64_t would be more portable, too.

comment:3 follow-up: Changed 8 years ago by mderickx

dear leif,

Your comment sounds like there is a lot still to be done. Do you think this tickets needs to change it's status to "needs_work" or do you want to give it a positive review and open a new ticket for your comment?

comment:4 Changed 8 years ago by malb

  • Reviewers set to Martin Albrecht
  • Status changed from needs_review to positive_review

Looks good to me.

comment:5 Changed 8 years ago by was

  • Keywords sd32 added

comment:6 in reply to: ↑ 3 Changed 8 years ago by leif

Replying to mderickx:

dear leif,

Your comment sounds like there is a lot still to be done. Do you think this tickets needs to change it's status to "needs_work" or do you want to give it a positive review and open a new ticket for your comment?

I would have been happy if some of that had been fixed here. The new spkg "works", so I didn't set the ticket to "needs work", but having a couple of scary Makefiles is still odd...

(I'm well aware some others really like postponing things... ;-) And I'm personally not going to open up a follow-up for that atm.)

comment:7 Changed 8 years ago by malb

Apologies, for some reason (I blame the jetlag!) I didn't even read the comments. Sorry!

comment:8 Changed 8 years ago by leif

  • Keywords quadratic sieve added

I wonder why we have this separate spkg at all, as Bill's quadratic sieve, presumably even a newer version, is included in FLINT (1.x) anyway.

comment:9 Changed 8 years ago by leif

  • Description modified (diff)

comment:10 Changed 8 years ago by leif

  • Merged in set to sage-4.7.2.alpha3
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:11 Changed 7 years ago by leif

  • Description modified (diff)

Had to fix invalid changelog entry headings and file permissions.

Corrected spkg at new location.

Note: See TracTickets for help on using tickets.