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

Repair "sage -b" broken by #29411 #30153

Closed
mkoeppe opened this issue Jul 16, 2020 · 35 comments
Closed

Repair "sage -b" broken by #29411 #30153

mkoeppe opened this issue Jul 16, 2020 · 35 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Jul 16, 2020

(from jhpalmieri, #30123)

Note that sage -b doesn't work any more: it tries to do cd "$SAGE_SRC" && $MAKE, but SAGE_SRC/Makefile.in was removed in #29411. (If you have done an incremental build, the Makefile is still there.)

Depends on #30128

CC: @jhpalmieri @orlitzky @kliem

Component: build

Author: Matthias Koeppe, John Palmieri, Michael Orlitzky

Branch: 2d95def

Reviewer: John Palmieri, Matthias Koeppe

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

@mkoeppe mkoeppe added this to the sage-9.2 milestone Jul 16, 2020
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 16, 2020

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 16, 2020

New commits:

95c0b68build/make/Makefile.in: Add target SPKG-no-deps for all SPKGs
cb4262fsrc/bin/sage: Repair ./sage -b etc. by using make sagelib-clean, make sagelib-no-deps

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 16, 2020

Commit: cb4262f

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 16, 2020

Author: Matthias Koeppe

@orlitzky
Copy link
Contributor

comment:3

Can you base this on #30128 and then source sage-env-config before sage-env in that new Makefile target?

@jhpalmieri
Copy link
Member

comment:4
  • If I touch a .pyx file and do sage -b, nothing happens: make: `sagelib-no-deps' is up to date.
  • Same with sage --ba-force: nothing happens, even though this is supposed to force rebuilding everything in the Sage library.
  • It looks like the logger is invoked, and it didn't used to be. This might be a good change, not sure, but it is a change.
  • git status reports that the empty file build/make/sagelib-no-deps is present and untracked. Does sagelib-no-deps need to be added as a phony target, or something like that?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 16, 2020

comment:5

Replying to @orlitzky:

Can you base this on #30128 and then source sage-env-config before sage-env in that new Makefile target?

Sure, will do

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 16, 2020

comment:6

Replying to @jhpalmieri:

  • git status reports that the empty file build/make/sagelib-no-deps is present and untracked. Does sagelib-no-deps need to be added as a phony target, or something like that?

Yes... will fix it

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 16, 2020

Changed commit from cb4262f to 03a2dbe

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 16, 2020

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

2f141c8Trac #30128: always source sage-env-config before sage-env.
554282aTrac #30128: enforce sourcing of sage-env-config before src/bin/sage-env.
7a91c05build/make/Makefile.in: Add target SPKG-no-deps for all SPKGs
4fc909csrc/bin/sage: Repair ./sage -b etc. by using make sagelib-clean, make sagelib-no-deps
03a2dbebuild/make/Makefile.in: Make SPKG-no-deps targets phony; for script packages, create the correct installation stamp file

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 16, 2020

Changed commit from 03a2dbe to 62ddd02

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 16, 2020

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

62ddd02build/make/Makefile.in [SPKG-no-deps]: Do not forget to source sage-env-config

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 16, 2020

comment:9

Replying to @jhpalmieri:

  • If I touch a .pyx file and do sage -b, nothing happens: make: `sagelib-no-deps' is up to date.
  • Same with sage --ba-force: nothing happens, even though this is supposed to force rebuilding everything in the Sage library.

This should be fixed now.

  • It looks like the logger is invoked, and it didn't used to be. This might be a good change, not sure, but it is a change.

Yes, it was convenient to go through the Makefile, and I think this change is good as it improves uniformity.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 16, 2020

Dependencies: #30128

@jhpalmieri
Copy link
Member

comment:11

I think this works. The first time I got a file build/make/sagelib-no-deps, but maybe I forgot to run ./bootstrap/.configure/etc. It's working now.

  • Can we add a comment in Makefile.in explaining what $(1)-no-deps is and how it should be used? I'm guessing that it tries to build the package but ignores its dependencies. Does that have any uses aside from the Sage library? I've made an attempt.

  • For pip packages, you have added $(1)-clean a second time to the .PHONY list. Should there be a $(1)-uninstall target for these? In that case, change one $(1)-clean to $(1)-uninstall.

Could we change the build rules so that

$$(INST)/$(1)-$(2)

just does $(1)-build-deps and $(1)-no-deps? It would cut out a tiny bit of code duplication. I guess we can't force the dependencies to be built before the package, so maybe not.

@jhpalmieri
Copy link
Member

@jhpalmieri
Copy link
Member

comment:13

By the way, we should deprecate sage --ba-force: #30160.


New commits:

830843btrac 30153: add, clarify some comments

@jhpalmieri
Copy link
Member

Changed commit from 62ddd02 to 830843b

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 16, 2020

comment:14

Replying to @jhpalmieri:

  • Can we add a comment in Makefile.in explaining what $(1)-no-deps is and how it should be used? I'm guessing that it tries to build the package but ignores its dependencies. Does that have any uses aside from the Sage library? I've made an attempt.

Thanks very much, this is perfect.

Regarding other uses - we could reimplement sage -p in terms of this. I just wasn't sure if we want to do this on the same ticket.

  • For pip packages, you have added $(1)-clean a second time to the .PHONY list. Should there be a $(1)-uninstall target for these? In that case, change one $(1)-clean to $(1)-uninstall.

Thanks for catching this. I think you fixed it already. For deprecating/renaming -clean to -uninstall, we have #29097. Probably best not to do everything on one ticket.

Could we change the build rules so that

$$(INST)/$(1)-$(2)

just does $(1)-build-deps and $(1)-no-deps? It would cut out a tiny bit of code duplication. I guess we can't force the dependencies to be built before the package, so maybe not.

I don't see an elegant way to do this, unfortunately.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 17, 2020

Changed author from Matthias Koeppe to Matthias Koeppe, John Palmieri

@jhpalmieri
Copy link
Member

comment:16

This looks okay to me. Positive review on your contributions.

@jhpalmieri
Copy link
Member

Reviewer: John Palmieri

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 17, 2020

comment:17

Thanks!

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 17, 2020

Changed reviewer from John Palmieri to John Palmieri, Matthias Koeppe

@orlitzky
Copy link
Contributor

comment:18

Late to the party, sorry. I think my new commit factors out the no-deps code as requested.

If I missed something or if you'd rather do it on another ticket, just put the old branch back and mark it as positive review again. Everything is working now.

@orlitzky
Copy link
Contributor

Changed commit from 830843b to 1a0e5c3

@orlitzky
Copy link
Contributor

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 17, 2020

Changed author from Matthias Koeppe, John Palmieri to Matthias Koeppe, John Palmieri, Michael Orlitzky

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 17, 2020

comment:19

Thanks.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 25, 2020

Changed branch from u/mjo/ticket/30153 to u/mkoeppe/ticket/30153

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 25, 2020

comment:21

Merged 9.2.beta6


New commits:

2d95defMerge tag '9.2.beta6' into t/30153/repair__sage__b__broken_by__29411

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jul 25, 2020

Changed commit from 1a0e5c3 to 2d95def

@vbraun
Copy link
Member

vbraun commented Jul 28, 2020

Changed branch from u/mkoeppe/ticket/30153 to 2d95def

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Aug 13, 2020

Changed commit from 2d95def to none

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Aug 13, 2020

comment:23

I think the recursive invocation of $(MAKE) leads to builds with extremely high parallel load when MAKE="make -j8" as recommended in Sage build documentation. I think this is part of why lately many builds on GH Actions are failing. To be fixed in #30345

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

4 participants