-
-
Notifications
You must be signed in to change notification settings - Fork 523
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
Enable VPATH builds (several independent build trees connected to one source tree) #21469
Comments
Branch: u/mkoeppe/vpath_build |
Commit: |
New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:9
The current patch makes some high-level preparations for a VPATH build, in particular the package system. "make" runs through until it gets to sagelib, which needs some more VPATH work (the current patch tries to get away by just making a symlink from $SAGE_SRC_ROOT/src to $SAGE_ROOT/src, which of course fails). I've set this to 'needs review' in the hope of receiving some feedback regarding the approach of this patch. |
comment:10
I am not sure what the objective of this ticket is. Considering the nature of sage's build system I am not sure what This is most evident in the latest commit. As a distro maintainer of sage there are already build time things in Other people may have a different opinion but there is no value in this for me so far. Possibly more work in fact. |
comment:11
Replying to @kiwifb:
A VPATH build makes it easy to build from the same source in many different configurations. Concretely, I've started to run some VMs (with Linux 64 bit, 32 bit) via Docker, which mount the Sage source directory from the host. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:13
Replying to @kiwifb:
Yes, this ticket does not address any of the issues that would arise in distribution packaging. Instead it adds a standard feature expected from autotools build system, for those who use sage as a distribution. |
comment:14
I should apologize for being so negative. Currently Seriously, yes I guess, it mostly started my brain on the fact that the separation build and runtime is not clean in vanilla sage. Your |
comment:15
Replying to @kiwifb:
No worries.
That already works with this patch.
Sounds good. Yes, I'm hoping too that it helps clarify some things as a side-effect. |
comment:16
Replying to @mkoeppe:
I sort of agree with François. Part of the problem is that Sage is a distribution (a collection of packages) as well as a Python library. The fact this this is currently mixed up in the sources (the sources of the distribution-part and the library-part are in one repo) makes it more difficult to understand what this ticket is about. For the distribution part, there really is no such thing as a build directory. There is a a temporary directory in For the library part, a |
comment:17
I think the ticket description should have a lot more information about
Note that this are 2 independent things (which are unfortunately often confused). |
comment:101
Replying to @dimpase:
It would be nice if the Sage version number that it displays at startup would show the git commit from which it is built. |
comment:102
Replying to @embray:
Just a quick note. When one says "VPATH", it refers to the source directory, not to the build directory. https://www.gnu.org/software/make/manual/html_node/General-Search.html |
comment:103
Replying to @dimpase:
Yes, with this patch one can still do non-VPATH builds, without any change. |
comment:104
Replying to @mkoeppe:
I suppose I just don't understand what happens to a VPATH build after the source tree it is built from is changed. Will it become broken, or not? |
comment:105
Are there any immediate issues left here beside comment:93? |
Work Issues: merge conflicts |
comment:107
I actually could really use this feature right now :) mkoeppe, should I try to resolve conflicts here? Or do you have time to do so, so I can review afterwards and maybe fix comment:93? |
comment:108
I hope to get back to it within the next month, but not right now. It will likely interact with some of my build-related tickets that are waiting for review... If you need this earlier, please feel free to work on it. I don't think comment 93 should hold up this ticket. Improvements could always be done in a follow-up ticket. |
comment:111
Setting new milestone based on a cursory review of ticket status, priority, and last modification date. |
comment:112
Setting a new milestone for this ticket based on a cursory review. |
Executive summary Currently,
--prefix
selects the install tree (SAGE_LOCAL
) of sage-the-distribution. But often we want several builds out of (almost) the same source tree.The
vpath
mechanism proposed here selects the build tree (SAGE_ROOT
) of sage-the-distribution. This includes the configuration and build artefacts such assrc/build/...
.VPATH builds are a powerful feature of autotools (and other) build systems. This feature allows the developer to build a package in a separate (initially empty) build directory tree. The source directory tree is only read from (and could even be mounted read-only) and is therefore always clean.
This is a powerful feature for the developer because from the same source tree many different configurations can be built and tested, without having to go through "make distclean" and reconfiguration. The source tree can also be shared, for example using a networked file system between different hosts, running different architectures. Another modern use case involves VMs. For example, Docker allows to mount the source directory from the host in the VM (see #21474).
For Sage, "different configurations" could mean different architectures (via VMs), different sets of installed packages, Py2 vs Py3, etc.
This is how it is used.
and then
The present patch implements this. BUILDDIR from the above example is reflected in the old environment variable $SAGE_ROOT; this is now to be distinguished from SRCDIR, which is reflected in the new environment variable $SAGE_VPATH. $SAGE_LOCAL defaults to BUILDDIR/local, but can of course be changed using
configure --prefix
.The present patch changes the various places where $SAGE_ROOT is used.
When "./configure" detects a VPATH build, it installs patched copies of
sage
,Makefile
andbuild/make/install
in BUILDDIR.With the current set of patches, the compilation goes through and gives a working
sage
, except for the docbuild.CC: @sagetrac-felixs @jdemeyer @kiwifb @embray @nexttime @vbraun @dimpase @fchapoton @jhpalmieri
Component: build: configure
Work Issues: merge conflicts
Author: Matthias Koeppe
Branch/Commit: u/mkoeppe/vpath_build @
05f3a91
Issue created by migration from https://trac.sagemath.org/ticket/21469
The text was updated successfully, but these errors were encountered: