Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only ./bootstrap should glob build/pkgs #29114

Closed
mkoeppe opened this issue Jan 30, 2020 · 61 comments
Closed

Only ./bootstrap should glob build/pkgs #29114

mkoeppe opened this issue Jan 30, 2020 · 61 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Jan 30, 2020

Right now both ./bootstrap and ./configure (via m4/sage_spkg_collect.m4) glob build/pkgs.

In this ticket, we move this code into bootstrap, making the generated configure script more static, more straightforward to read and debug, and slightly faster because less work (and file system accesses) is done at the run time of configure.

Before:

$ time ./configure -q --without-system-ntl
real	0m40.860s
user	0m24.260s
sys	0m16.266s

After:

real	0m32.485s
user	0m20.773s
sys	0m10.462s

There are no changes in functionality.

We make a cosmetic fix to the ./configure --help output, fixing #33345 comment:20.

Even after this ticket, package-version.txt and dependencies are processed at configure run time, not at bootstrap time. So simple package upgrades can still be done by developers without having to run ./bootstrap.

CC: @dimpase @embray @orlitzky @jhpalmieri

Component: build: configure

Author: Matthias Koeppe

Branch/Commit: e7b8c3b

Reviewer: Michael Orlitzky

Issue created by migration from https://trac.sagemath.org/ticket/29114

@mkoeppe mkoeppe added this to the sage-9.1 milestone Jan 30, 2020
@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 31, 2020

Author: Matthias Koeppe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 31, 2020

Dependencies: #28095

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 31, 2020

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 31, 2020

comment:6

Branch is on top of #28095.


New commits:

cf5607eAdd configure options '--enable-SPKG', --disable-SPKG' for optional/experimental SPKG
e4675d1Actually implement --enable-SPKG and --disable-SPKG
a3e0e47Change type of gmp, mpir to 'standard' (they are mutually exclusive standard packages)
4ed7b05Fix indentation of '--with-mp=' options in configure --help
82ee84dsage_spkg_enable.m4: Popdef what wass pushdef-ed
f7a84e0Enumerate packages in ./bootstrap; only warn about missing 'type' files; use the generated list in m4/sage_spkg_collect.m4 instead of globbing

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 31, 2020

Commit: f7a84e0

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 31, 2020

Changed commit from f7a84e0 to 355d147

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 31, 2020

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

6ec6413Merge branch 'develop' of git://trac.sagemath.org/sage into t/29114/no-spkg-globbing-in-configure
9295a74sage_spkg_enable.m4: Popdef what wass pushdef-ed
355d147Enumerate packages in ./bootstrap; only warn about missing 'type' files; use the generated list in m4/sage_spkg_collect.m4 instead of globbing

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 31, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

bbd6521Makefile [configure]: also depend on build/pkgs/type

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 31, 2020

Changed commit from 355d147 to bbd6521

@dimpase
Copy link
Member

dimpase commented Jan 31, 2020

comment:9

Could you explain what "glob" means here?

@dimpase
Copy link
Member

dimpase commented Jan 31, 2020

comment:10

This reminds me of #27373 - which becomes obsolete as soon as this ticket and #29113 is done.

@embray
Copy link
Contributor

embray commented Jan 31, 2020

comment:11

It seems this is adding a bunch of previously unnecessary complication only because #29038, which I strongly objected to, was merged. I didn't step in then because I was busy with other things. Can we please roll back #29038 instead? I'm absolute convinced there's no need for it.

@embray
Copy link
Contributor

embray commented Jan 31, 2020

comment:13

See #29118 for an alternative proposal.

@dimpase
Copy link
Member

dimpase commented Jan 31, 2020

comment:14

I think we should progress, even if the route is not optimal, and Matthias has a lot of time for working on the build system now.

I hate to see ./configure running many times as I launch make, it really slows working on build system down, and I hope #29113 will happen soon.

@embray
Copy link
Contributor

embray commented Jan 31, 2020

comment:15

I should add, some of the changes in this ticket look reasonable. But it's mixed up with a bunch of other stuff (the way this is built on top of #28095 in particular is confusing). I'd like to start with #29118 and then see some fixes to individual bugs that predate #29038 .

@embray
Copy link
Contributor

embray commented Jan 31, 2020

comment:16

Replying to @dimpase:

I think we should progress, even if the route is not optimal, and Matthias has a lot of time for working on the build system now.

Progress on what though? I don't think you can "progress" on unsolid footing. I should note that part of the motivation behind #29038 is to enable the approach in #27824 which I also think is overcomplicated.

I don't think we should be making complicated changes on top of complicated changes to enable even more complicated changes. I hate to sound like Jeroen here because I've been on the other side of disagreements like this with him. But he'd probably be saying the same if he were here and I'd agree this time.

I would like to know what the bigger picture is to all this before making changes that don't seem well-motivated. Don't commit a sunk cost fallacy especially when it's relatively early...

@dimpase
Copy link
Member

dimpase commented Jan 31, 2020

comment:17

If you want to talk about simplification, why don't we just drop sage -i/-f instead of trying to keep this awful hack - something I proposed a year ago, and Jeroen objected...

@mkoeppe

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 17, 2022

Changed commit from 7310bd5 to 1eceb52

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 18, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

a013698m4/sage_spkg_collect.m4: Distinguish underscore packages at macroexpansion time
8421854m4/sage_spkg_collect.m4: Handle in_sdist at macroexpansion time
7115a72m4/sage_spkg_collect.m4: Suppress some whitespace in the macroexpansion

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 18, 2022

Changed commit from 1eceb52 to 7115a72

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 18, 2022

Changed commit from 7115a72 to be824d6

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 18, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

35fa89fbootstrap: Determine SPKG_TREE_VAR here, pass it as a macro argument to SAGE_SPKG_FINALIZE
8070dd9m4/sage_spkg_collect.m4: Make want_spkg a macro definition only
be824d6m4/sage_spkg_collect.m4: Replace read from requirements.txt by use of macro argument

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 18, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

e796fcfm4/sage_spkg_enable.m4: Do not AC_REQUIRE([SAGE_SPKG_COLLECT_INIT]) here

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 18, 2022

Changed commit from be824d6 to e796fcf

@mkoeppe

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 18, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

a6d70c1m4/sage_spkg_collect.m4: Make SAGE_NEED_SYSTEM_PACKAGES_VAR a macro

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 18, 2022

Changed commit from e796fcf to a6d70c1

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 18, 2022

Changed commit from a6d70c1 to e7b8c3b

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 18, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

7d77884bootstrap: More "installing..."
3b04496bootstrap: Consolidate output redirections
e7b8c3bm4/sage_spkg_collect.m4: Add missing m4_popdef

@jhpalmieri
Copy link
Member

comment:45

./configure -q is a useful command. I see this output:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named lzma
./configure: line 39392: ,: command not found

The first is probably coming from the line if "$SAGE_BOOTSTRAP_PYTHON" -c "import lzma"; then :, no big deal. The other error is from a comma all by itself on line 39392 (that's with develop; it's line 42361 with this branch). Maybe an extra comma in build/pkgs/qhull/spkg-configure.m4?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 18, 2022

comment:46

This is unrelated to the ticket and fixed in #33247

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@jhpalmieri
Copy link
Member

comment:49

In principle this looks good to me, and Sage builds. It would be great if someone more familiar with .m4 code could check the details.

@orlitzky
Copy link
Contributor

comment:50

I looked through it all and don't see anything too scary. My one question is about the grep -v ^= that was added to bootstrap. It looks like that only affects the sagemath_categories, sagemath_objects, and sage_docbuild packages. Why do those have ======... headers in their SPKG.rst to begin with?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 28, 2022

comment:51

Replying to @orlitzky:

It looks like that only affects the sagemath_categories, sagemath_objects, and sage_docbuild packages. Why do those have ======... headers in their SPKG.rst to begin with?

These files double as README.rst for these distributions, so this affects how it displays on PyPI.

@orlitzky
Copy link
Contributor

Reviewer: Michael Orlitzky

@orlitzky
Copy link
Contributor

comment:52

Ok, I don't believe in parsing SPKG.rst for package information anyway, so I don't mind the hack. (In the futue, I would rather we quit parsing that file than try to make them all nice and consistent.)

Everything else looks reasonable. Nothing broke in my sage build and there aren't any new subtle ./configure errors logged to the console.

John, don't forget to add yourself as a reviewer if you want to.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 28, 2022

comment:53

Thanks.

@vbraun
Copy link
Member

vbraun commented Mar 1, 2022

Changed branch from u/mkoeppe/no-spkg-globbing-in-configure to e7b8c3b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants