Opened 3 years ago

Closed 3 years ago

#29100 closed enhancement (fixed)

spkg-configure.m4 for boost and boost_cropped

Reported by: Dima Pasechnik Owned by:
Priority: major Milestone: sage-9.1
Component: build: configure Keywords:
Cc: Matthias Köppe, Isuru Fernando, Erik Bray, Michael Orlitzky Merged in:
Authors: Dima Pasechnik Reviewers: Isuru Fernando
Report Upstream: N/A Work issues:
Branch: 6f04521 (Commits, GitHub, GitLab) Commit: 6f04521dba89873792b1cc8aa7ce423cb4dc23b5
Dependencies: #29053 Stopgaps:

Status badges

Description (last modified by Dima Pasechnik)

we use a macro from autoconf archive to test the version

Change History (18)

comment:1 Changed 3 years ago by Dima Pasechnik

Branch: u/dimpase/packages/boostconfig.m4u/dimpase/packages/boostconfig
Commit: 931cdf8bb2801d9ef16bae1e88beabd0655b906b6f04521dba89873792b1cc8aa7ce423cb4dc23b5
Dependencies: #29053

some boost-related package names are missing on #29053, added here


New commits:

6f04521add package names to distros/

comment:2 Changed 3 years ago by Dima Pasechnik

Status: newneeds_review

comment:3 Changed 3 years ago by Dima Pasechnik

Cc: Isuru Fernando Erik Bray added

comment:4 Changed 3 years ago by Dima Pasechnik

Description: modified (diff)

comment:5 Changed 3 years ago by Isuru Fernando

Reviewers: Isuru Fernando
Status: needs_reviewpositive_review

comment:6 Changed 3 years ago by Michael Orlitzky

Cc: Michael Orlitzky added

Works for me on Gentoo but it's a little scary to have the check for boost implicitly be the check for boost_cropped. It would be nice if the new macro result was cached -- then we could just repeat the check -- but I don't think it is.

Maybe check HAVE_BOOST as a safety net against changes to boost_cropped? I dunno.

comment:7 Changed 3 years ago by Dima Pasechnik

No distro I tried allowed for an incomplete install of boost.

I guess it is a historical artefact that Sage has these two packages

comment:8 in reply to:  7 Changed 3 years ago by John Palmieri

Replying to dimpase:

No distro I tried allowed for an incomplete install of boost.

I guess it is a historical artefact that Sage has these two packages

Sage needs boost_cropped, not all of boost. The boost tarball is ten times the size, boost_cropped took 8 seconds to build on my machine, and boost took 21 minutes. So if by "historical" you mean before this ticket, I guess "historical arfifact" is accurate.

comment:9 Changed 3 years ago by Dima Pasechnik

I don't know how boost_cropped was created, at least spkg-src provides no clue.

I don't know a modern Linux distro that supplies such a "cropped" thing.

comment:10 Changed 3 years ago by John Palmieri

According to spkg-src, boost_cropped is obtained from boost by just taking the subdirectory boost (i.e., boost_1_66_0/boost).

Version 0, edited 3 years ago by John Palmieri (next)

comment:11 Changed 3 years ago by Michael Orlitzky

Status: positive_reviewneeds_work

I think I see what happened. The sage library doesn't need boost at all, the boost spkg is optional. But the spkg-configure.m4 for boost causes it to be installed whenever a system copy is not present.

Instead, I think we should leave boost alone (why is it an optional package to begin with?). The spkg-configure.m4 for boost_cropped should look for a full version of boost, like it does now. And then if someone decides to install the optional boost spkg... who cares what happens.

comment:12 in reply to:  11 Changed 3 years ago by Dima Pasechnik

Status: needs_workneeds_info

Replying to mjo:

I think I see what happened. The sage library doesn't need boost at all, the boost spkg is optional. But the spkg-configure.m4 for boost causes it to be installed whenever a system copy is not present.

Instead, I think we should leave boost alone (why is it an optional package to begin with?). The spkg-configure.m4 for boost_cropped should look for a full version of boost, like it does now. And then if someone decides to install the optional boost spkg... who cares what happens.

I don't understand what I am supposed to reproduce. I think an optional package only gets installed if its installation is explicitly triggered by make or sage -i, and not merely because ./configure was not able to find a system copy.

comment:13 Changed 3 years ago by Dima Pasechnik

we have a number of optional and experimental packages with spkg-configure.m4 already, and nothing like this was ever reported.

comment:14 Changed 3 years ago by Michael Orlitzky

Status: needs_infopositive_review

Ok, I'm going to put it back to positive review then. I'm not willing to delete boost at the moment to see what happens.

The check for boost_cropped now looks even more correct to me, since that's the standard package. My comment about boost's spkg-configure.m4 no longer applies, it isn't standard and doesn't need to be detected.

comment:15 Changed 3 years ago by Michael Orlitzky

Sorry, false alarm: I tested with some other packages. If I uninstall the optional gp2c, for example...

./configure
...
checking SPKGs to install... 
    ...
    gmp-6.1.2 will not be installed (configure check)
    gmpy2-2.1.0b1
    gp2c-0.0.10.p0
    ...

That sure looks like gp2c will be installed from the spkg. That message combined with John's comment made me think for a minute that a full copy of boost was being installed in addition to (or in lieu of) boost_cropped.

comment:16 Changed 3 years ago by Matthias Köppe

#28788 addresses improving the printing of this message.

comment:17 Changed 3 years ago by Erik Bray

Yikes, that ax_boost_base.m4 is scary. I hope I never have to debug anything in it. But if it works it works, and I imagine (?) it's well tested.

comment:18 Changed 3 years ago by Volker Braun

Branch: u/dimpase/packages/boostconfig6f04521dba89873792b1cc8aa7ce423cb4dc23b5
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.