sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.41k stars 475 forks source link

Create build/bin/sage-build-env-config and call it from build/make/deps; add sage --buildsh #29052

Closed mkoeppe closed 4 years ago

mkoeppe commented 4 years ago

This is part of #21707 - "Split sage-env into 5".

We set up a new configure-generated, to-be-sourced shell script build/bin/sage-build-env-config to which we move environment variable settings from src/bin/sage-env[-config] that are only needed for:

  1. Sage-the-distribution while building spkgs,
  2. Sage-the-distribution for building sagelib.

The new script is used in addition to src/bin/sage-env in these two contexts.

We add a command sage --buildsh, like sage --sh but using the larger environment.


Follow-up:

Depends on #29233

CC: @dimpase @embray @jdemeyer @kiwifb @isuruf

Component: build

Author: Matthias Koeppe

Branch/Commit: 2ab9b09

Reviewer: Dima Pasechnik, Volker Braun

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

mkoeppe commented 4 years ago

Description changed:

--- 
+++ 
@@ -5,7 +5,7 @@
 1. Sage-the-distribution while building spkgs,
 2. Sage-the-distribution for building sagelib.

-The new script sources `src/bin/sage-env`.
+The new script is used in addition to `src/bin/sage-env` in these two contexts.

 We add a command `sage --buildsh`, like `sage --sh` but using the larger environment.
mkoeppe commented 4 years ago

Description changed:

--- 
+++ 
@@ -1,6 +1,6 @@
 This is part of #21707 - "Split `sage-env` into 5". 

-We set up a new `configure`-generated, to-be-`source`d shell script `build/bin/sage-build-env` to which we move environment variable settings from `src/bin/sage-env[-config]` that are only needed for:
+We set up a new `configure`-generated, to-be-`source`d shell script `build/bin/sage-build-env-config` to which we move environment variable settings from `src/bin/sage-env[-config]` that are only needed for:

 1. Sage-the-distribution while building spkgs,
 2. Sage-the-distribution for building sagelib.
mkoeppe commented 4 years ago

Branch: u/mkoeppe/create_build_bin_sage_build_env_and_call_it_from_build_make_depsaddsagebuildsh

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

Commit: e3e5a08

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

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

e3e5a08build/make/deps, build/make.Makefile.in: Source build/bin/sage-build-env-config for building sagelib and for script packages
mkoeppe commented 4 years ago
comment:6

Updated the branch that was on #21707.

mkoeppe commented 4 years ago

Description changed:

--- 
+++ 
@@ -9,3 +9,7 @@

 We add a command `sage --buildsh`, like `sage --sh` but using the larger environment.

+---
+
+Follow-up: 
+- `build/make/install` contains more environment settings that should be reviewed for moving to `sage-build-env-config`
jhpalmieri commented 4 years ago
comment:8

You need to document sage --buildsh: at the top of src/bin/sage, in src/doc/en/reference/repl/options.rst, maybe in src/doc/en/installation/source.rst, maybe in the developer's guide.

mkoeppe commented 4 years ago
comment:9

Thanks! Will do.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

Changed commit from e3e5a08 to 4a96e26

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

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

7ea77bbDocument 'sage -buildsh' in the output of 'sage -advanced'
4a96e26src/doc/en/reference/repl/options.rst: Document sage --buildsh
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

Changed commit from 4a96e26 to 80c6bfd

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

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

80c6bfdMerge tag '9.1.beta1' into t/29052/create_build_bin_sage_build_env_and_call_it_from_build_make_deps__add_sage___buildsh
mkoeppe commented 4 years ago
comment:12

Merged, ready for review

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

Changed commit from 80c6bfd to ecb6a8b

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

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

5244060Split out build/bin/sage-build-env-config from sage-env-config
96b6c58src/bin/sage: Add -buildsh
3491a9dbuild/make/deps, build/make.Makefile.in: Source build/bin/sage-build-env-config for building sagelib and for script packages
11f6797Document 'sage -buildsh' in the output of 'sage -advanced'
ecb6a8bsrc/doc/en/reference/repl/options.rst: Document sage --buildsh
mkoeppe commented 4 years ago
comment:14

Rebased on 9.1.beta3, needs review

dimpase commented 4 years ago
comment:16

some places say -buildsh, some say --build-sh, some say --buildsh

what's the correct one?

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

Changed commit from ecb6a8b to a0c3c59

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

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

a0c3c59Fix "--build-sh" -> "--buildsh" in a comment
mkoeppe commented 4 years ago
comment:18

Both -buildsh and --buildsh work.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

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

c1f0e62Merge tag '9.1.beta4' into t/29052/create_build_bin_sage_build_env_and_call_it_from_build_make_deps__add_sage___buildsh
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

Changed commit from a0c3c59 to c1f0e62

mkoeppe commented 4 years ago
comment:20

Patchbot errors on helmholtz are due to bootstrap prerequisites missing on that host.

Needs review...

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

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

0dc97dbClean src/doc/en/installation/*.txt in bootstrap-clean, not misc-clean
8bd4f53Merge branch 't/29233/bootstrap____make_distclean_broken' into t/29052/create_build_bin_sage_build_env_and_call_it_from_build_make_deps__add_sage___buildsh
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

Changed commit from c1f0e62 to 8bd4f53

mkoeppe commented 4 years ago

Dependencies: #29233

dimpase commented 4 years ago
comment:23

ok

dimpase commented 4 years ago

Reviewer: Dima Pasechnik

mkoeppe commented 4 years ago
comment:24

Thank you!

vbraun commented 4 years ago
comment:25
[dochtml] Error building the documentation.
[dochtml] Traceback (most recent call last):
[dochtml]   File "/home/buildbot/slave/sage_git/build/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
[dochtml]     "__main__", mod_spec)
[dochtml]   File "/home/buildbot/slave/sage_git/build/local/lib/python3.7/runpy.py", line 85, in _run_code
[dochtml]     exec(code, run_globals)
[dochtml]   File "/home/buildbot/slave/sage_git/build/local/lib/python3.7/site-packages/sage_setup/docbuild/__main__.py", line 2, in <module>
[dochtml]     main()
[dochtml]   File "/home/buildbot/slave/sage_git/build/local/lib/python3.7/site-packages/sage_setup/docbuild/__init__.py", line 1720, in main
[dochtml]     builder()
[dochtml]   File "/home/buildbot/slave/sage_git/build/local/lib/python3.7/site-packages/sage_setup/docbuild/__init__.py", line 327, in _wrapper
[dochtml]     getattr(get_builder(document), 'inventory')(*args, **kwds)
[dochtml]   File "/home/buildbot/slave/sage_git/build/local/lib/python3.7/site-packages/sage_setup/docbuild/__init__.py", line 552, in _wrapper
[dochtml]     self._build_everything_except_bibliography(lang, format, *args, **kwds)
[dochtml]   File "/home/buildbot/slave/sage_git/build/local/lib/python3.7/site-packages/sage_setup/docbuild/__init__.py", line 538, in _build_everything_except_bibliography
[dochtml]     build_many(build_ref_doc, non_references)
[dochtml]   File "/home/buildbot/slave/sage_git/build/local/lib/python3.7/site-packages/sage_setup/docbuild/__init__.py", line 280, in build_many
[dochtml]     _build_many(target, args, processes=NUM_THREADS)
[dochtml]   File "/home/buildbot/slave/sage_git/build/local/lib/python3.7/site-packages/sage_setup/docbuild/utils.py", line 283, in build_many
[dochtml]     raise worker_exc.original_exception
[dochtml] pkgconfig.pkgconfig.PackageNotFoundError: cblas not found not found
dimpase commented 4 years ago
comment:26

was it a build from scratch, or an incremental one?

vbraun commented 4 years ago
comment:27

Both incremental and after "make distclean"

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

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

2ab9b09Move SAGE_PKG_CONFIG_PATH, SAGE_NAUTY_BINS_PREFIX back to src/bin/sage-env-config.in
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

Changed commit from 8bd4f53 to 2ab9b09

mkoeppe commented 4 years ago
comment:29

Thanks for catching this.

dimpase commented 4 years ago

Changed reviewer from Dima Pasechnik to Dima Pasechnik, Volker Braun

dimpase commented 4 years ago
comment:30

OK, it works now. The previous iteration somehow built, but didn't work, as it turned out, sorry.

vbraun commented 4 years ago

Changed branch from u/mkoeppe/create_build_bin_sage_build_env_and_call_it_from_build_make_depsaddsagebuildsh to 2ab9b09