Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#13755 closed defect (fixed)

Let LinBox build with MPIR > 2.5.0

Reported by: jpflori Owned by: cpernet
Priority: major Milestone: sage-5.6
Component: linbox Keywords: linbox spkg
Cc: malb, pcpa, vbraun Merged in: sage-5.6.beta1
Authors: Jean-Pierre Flori Reviewers: John Palmieri, Volker Braun
Report Upstream: Reported upstream. No feedback yet. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by kcrisman)

LinBox? does not build with MPIR > 2.5.0 because the interface for Sage, in interface/linbox-sage.[C|h] includes some headers file in a problematic order:

  • first "gmp.h" without "stdint.h", so functions related to "stdint.h" types are not defined
  • at some point "stdint.h" through other linbox header files (if available)
  • then "linbox/integer.h" which in turn includes "gmp++/gmp++.h" which includes "gmpxx.h"

As "stdint.h" was included in the way, the C++ wrapper look for the C functions related to "stdint.h" types, but these were not defined.

Use the updated spkg at http://boxen.math.washington.edu/home/jpflori/linbox-1.3.2.p0.spkg

Attachments (1)

linbox-1.3.2.p0.diff (1.6 KB) - added by jpflori 7 years ago.
spkg diff, for review only

Download all attachments as: .zip

Change History (9)

Changed 7 years ago by jpflori

spkg diff, for review only

comment:1 Changed 7 years ago by jpflori

  • Report Upstream changed from Not yet reported upstream; Will do shortly. to Reported upstream. No feedback yet.
  • Status changed from new to needs_review

After discussing this on mpir-devel, it appears it does not hurt and is even a good idea to prevent this in LinBox? itself (although some workaround could also appear in MPIR later): https://groups.google.com/d/topic/mpir-devel/m__z0PR_wBw/discussion

I've reported this on linbox-devel as well, now waiting for reactions there, but this looks clean enough to become needs_review anyway.

comment:2 Changed 7 years ago by jhpalmieri

  • Cc pcpa vbraun added

This looks okay to me, but I wouldn't mind if someone else more familiar with header files took a look at it.

comment:3 Changed 7 years ago by vbraun

  • Reviewers set to John Palmieri, Volker Braun
  • Status changed from needs_review to positive_review

Looks good to me

comment:4 Changed 7 years ago by kcrisman

  • Description modified (diff)

comment:5 follow-up: Changed 7 years ago by kcrisman

On Cygwin on XP, linbox-1.3.2 built fine with mpir-2.6.0.p0. So maybe this isn't always necessary, but whatever.

comment:6 in reply to: ↑ 5 Changed 7 years ago by jpflori

Replying to kcrisman:

On Cygwin on XP, linbox-1.3.2 built fine with mpir-2.6.0.p0. So maybe this isn't always necessary, but whatever.

That's some header inclusion black magic, so if somehow stdint.h was included before, the patch won't be needed. But it should be safer with the patch.

comment:7 Changed 7 years ago by jdemeyer

  • Merged in set to sage-5.6.beta1
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:8 Changed 5 years ago by cpernet

Just to report that the patch was applied upstream in linbox-rev5072

Note: See TracTickets for help on using tickets.