Opened 6 months ago

Last modified 5 months ago

#27853 new enhancement

polymake: Install gcc if system gcc older than 5.1

Reported by: mkoeppe Owned by:
Priority: major Milestone:
Component: packages: experimental Keywords:
Cc: dimpase Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: u/mkoeppe/polymake__install_gcc_if_system_gcc_older_than_5_1 (Commits) Commit: e675ad2aedb79a05fe6c9626019ea68505c73cca
Dependencies: Stopgaps:

Description


Change History (11)

comment:1 Changed 6 months ago by mkoeppe

Can this be done with spkg-configure?

comment:2 Changed 6 months ago by dimpase

Do you mean the spkg-configure of polymake?

This might be a bit tricky, I'd just implement a version check, which errors out with a message to install a newer gcc. You if needed might tweak spkg-configure of gcc to make it easier.

As well, very old gcc's (say, 4.4) cannot even compile Sage's gcc.

Also note that clang typically fakes a gcc, sometimes (on OSX) quite old one.

comment:3 Changed 6 months ago by dimpase

on the other hand, yes, in polymake/spkg-config.m4 you can do something like

SAGE_SPKG_CONFIGURE([gcc], [
    sage_spkg_install_polymake=yes
    AC_REQUIRE([SAGE_SPKG_CONFIGURE_GMP])
    if test $IS_REALLY_GCC = yes ; then
       AS_CASE(["$GXX_VERSION.0"],
           [[[0-4]].*|5.0.*], [
               SAGE_MUST_INSTALL_GCC([you have $CXX version $GXX_VERSION, which is too old to build polymake])
                ])
    fi

but I am not sure whether this would kick in regardless of the experimental status of polymake.

In fact I would be in favours of dropping gcc 4 support completely, and require at least 5.1 globally.

comment:4 Changed 6 months ago by mkoeppe

  • Branch set to u/mkoeppe/polymake__install_gcc_if_system_gcc_older_than_5_1

comment:5 Changed 6 months ago by mkoeppe

  • Commit set to e675ad2aedb79a05fe6c9626019ea68505c73cca

I tried this (see branch) but it seems that this script is always run, even if polymake is not requested.


New commits:

e675ad2If polymake is to be installed, install gcc if systen gcc < 5.1

comment:6 follow-up: Changed 6 months ago by dimpase

One can have a --with-polymake=install (with default value no) switch tested in spkg-config, so that its contents is skipped, unless install is given as the value of this parameter. Except this would be a non-standard way to install a package.

[Jeez, how much I hate sage -i/-f thing... :-)]

comment:7 in reply to: ↑ 6 Changed 6 months ago by mkoeppe

Replying to dimpase:

One can have a --with-polymake=install (with default value no) switch tested in spkg-config, so that its contents is skipped, unless install is given as the value of this parameter. Except this would be a non-standard way to install a package.

Hardly an improvement.

[Jeez, how much I hate sage -i/-f thing... :-)]

Where's the ticket that will change "sage -i PACKAGE" to just reconfiguration with "--enable-PACKAGE" appended to the configure command line and "make build"?

comment:8 Changed 6 months ago by dimpase

You can read on recent (mis)adventures in this domain on #27373, #27642...

Feel free to open such a ticket though and cc me on it.

comment:9 follow-up: Changed 6 months ago by dimpase

how about we re-target this ticket to bump up the minimal gcc version to 5.1?

comment:10 in reply to: ↑ 9 Changed 6 months ago by mkoeppe

Replying to dimpase:

how about we re-target this ticket to bump up the minimal gcc version to 5.1?

It's better if that goal is not associated with an experimental package.

comment:11 Changed 5 months ago by embray

  • Milestone sage-8.8 deleted

As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9).

Note: See TracTickets for help on using tickets.