Opened 8 years ago

Last modified 8 years ago

#11757 closed enhancement

update M4RI to version 20110901 or later — at Version 9

Reported by: malb Owned by: tbd
Priority: major Milestone: sage-4.7.2
Component: packages: standard Keywords:
Cc: leif, AlexanderDreyer Merged in:
Authors: Martin Albrecht Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #11574 Stopgaps:

Description (last modified by malb)

In #11574 it was noticed that M4RI does not provide sufficient information to allow third party software to choose the appropriate compiler flags to link against it. While a work around is provided in #11574, it is not as clean as it could be. That is, M4RI should export the flags that were used to when building it, which can then be re-used by third party code.

Version 20110901 of M4RI exports the build flags. The relevant commit to the M4RI tree is:

https://bitbucket.org/malb/m4ri/changeset/63552206b9e0

Install http://sage.math.washington.edu/home/malb/spkgs/libm4ri-20110901.spkg

Change History (9)

comment:1 follow-up: Changed 8 years ago by malb

  • Status changed from new to needs_review

Here's how the output looks like on bsd.math:

#define __M4RI_CFLAGS                   " -mmmx -msse -msse2 -msse3   -I/Users/malb/sage-4.7.2.alpha2/local/include -g -fPIC -Wall -pedantic -O2"

I'm not sure we want the "-I/Users/..." part in there though. But we set CFLAGS in spkg-install so I'm not sure how to avoid it.

comment:2 in reply to: ↑ 1 Changed 8 years ago by leif

Replying to malb:

Here's how the output looks like on bsd.math:

#define __M4RI_CFLAGS                   " -mmmx -msse -msse2 -msse3   -I/Users/malb/sage-4.7.2.alpha2/local/include -g -fPIC -Wall -pedantic -O2"

I'm not sure we want the "-I/Users/..." part in there though. But we set CFLAGS in spkg-install so I'm not sure how to avoid it.

This would introduce new potential hardcoding issues. (It shouldn't hurt if the directory later -- after moving Sage -- does no longer exist, but it could break the installation if it does, and the headers there are meanwhile incompatible.)

You could post-process the file in M4RI's spkg-install.

Do you also add __M4RI_CC? (Haven't looked at the spkg yet.)

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

Since you have -I... already in CPPFLAGS, not adding it to CFLAGS in spkg-install should also work.

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

Replying to leif:

Since you have -I... already in CPPFLAGS, not adding it to CFLAGS in spkg-install should also work.

Oh, I see M4RI doesn't honor CPPFLAGS, but it also doesn't use any of Sage's headers AFAIK, so you could simply remove -I... from CFLAGS (unless configure does weird things).

comment:5 Changed 8 years ago by malb

I've revised spkg-install accordingly and replaced the SPKG. Now we get:

#define __M4RI_CC                       "gcc -std=gnu99"
#define __M4RI_CFLAGS                   "    -g -fPIC -Wall -pedantic -O2"

comment:6 Changed 8 years ago by leif

  • Dependencies set to #11574

Added #11574 as a dependency because of ticket:11574:m4ri_20110601.patch (API change, corrected extension module dependencies in module_list.py).

(Martin, correct me if I'm wrong...)

comment:7 Changed 8 years ago by malb

Uh, yep, that's correct. Thanks!

comment:8 Changed 8 years ago by leif

  • Cc AlexanderDreyer added

Why does this still need review?

And isn't "exporting" the compiler flags meanwhile fully fixed by #11574? (Except for perhaps a .pc file.)

The description should get updated...


Or is this spkg / ticket meanwhile obsolete, superseded by the one from #11574?

I actually first thought I had merged the wrong spkg.

comment:9 Changed 8 years ago by malb

  • Description modified (diff)
Note: See TracTickets for help on using tickets.