#29100 closed enhancement (fixed)

spkg-configure.m4 for boost and boost_cropped

Reported by: dimpase Owned by:
Priority: major Milestone: sage-9.1
Component: build: configure Keywords:
Cc: mkoeppe, isuruf, embray, mjo 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 dimpase)

we use a macro from autoconf archive to test the version

Change History (18)

comment:1 Changed 17 months ago by dimpase

  • Branch changed from u/dimpase/packages/boostconfig.m4 to u/dimpase/packages/boostconfig
  • Commit changed from 931cdf8bb2801d9ef16bae1e88beabd0655b906b to 6f04521dba89873792b1cc8aa7ce423cb4dc23b5
  • Dependencies set to #29053

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


New commits:

6f04521add package names to distros/

comment:2 Changed 17 months ago by dimpase

  • Status changed from new to needs_review

comment:3 Changed 17 months ago by dimpase

  • Cc isuruf embray added

comment:4 Changed 17 months ago by dimpase

  • Description modified (diff)

comment:5 Changed 17 months ago by isuruf

  • Reviewers set to Isuru Fernando
  • Status changed from needs_review to positive_review

comment:6 Changed 17 months ago by mjo

  • Cc mjo 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 follow-up: Changed 17 months ago by 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

comment:8 in reply to: ↑ 7 Changed 17 months ago by jhpalmieri

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 17 months ago by dimpase

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 17 months ago by jhpalmieri

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

I'm almost positive the cropped version is a pure Sage invention, to cut down on size and to speed up building.

Last edited 17 months ago by jhpalmieri (previous) (diff)

comment:11 follow-up: Changed 17 months ago by mjo

  • Status changed from positive_review to needs_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 17 months ago by dimpase

  • Status changed from needs_work to needs_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 17 months ago by dimpase

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

comment:14 Changed 17 months ago by mjo

  • Status changed from needs_info to positive_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 17 months ago by mjo

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 17 months ago by mkoeppe

#28788 addresses improving the printing of this message.

comment:17 Changed 17 months ago by embray

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 17 months ago by vbraun

  • Branch changed from u/dimpase/packages/boostconfig to 6f04521dba89873792b1cc8aa7ce423cb4dc23b5
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.