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

./configure --prefix=SAGE_LOCAL #21479

Closed
mkoeppe opened this issue Sep 12, 2016 · 157 comments
Closed

./configure --prefix=SAGE_LOCAL #21479

mkoeppe opened this issue Sep 12, 2016 · 157 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Sep 12, 2016

I propose to support choosing a location for the SAGE_LOCAL tree, using

./configure --prefix=SAGE_LOCAL

(the default would be, as before, the local subdirectory of SAGE_ROOT - see patch on the ticket).

I am fully aware that Sage's build system does not have a separation between 'make' and 'make install'; see #21495 for that.

Nevertheless, SAGE_LOCAL should be considered the same as the prefix in the sense of the autotools.

This ticket is a step towards #21566.

Release manager configure tarball: http://sage.ugent.be/www/jdemeyer/sage/configure-214.tar.gz

CC: @jdemeyer @embray @kiwifb @nexttime @dimpase

Component: build

Author: Matthias Koeppe, Jeroen Demeyer

Branch: e5926b1

Reviewer: Jeroen Demeyer, Erik Bray, Matthias Koeppe

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

@mkoeppe mkoeppe added this to the sage-7.4 milestone Sep 12, 2016
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 12, 2016

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 12, 2016

New commits:

fa16faeUse AC_PREFIX_DEFAULT to default prefix to SAGE_ROOT/local

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 12, 2016

Commit: fa16fae

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 12, 2016

Author: Matthias Koeppe

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@sagetrac-felixs
Copy link
Mannequin

sagetrac-felixs mannequin commented Sep 15, 2016

comment:6

(i completely agree with this)

a main obstacle is: the build system writes to $prefix during the build...

i suggest to do the transition one-package-at-a-time, and after --disable-$package is in place.

with --disable-all, it will be easiest to avoid writing to $prefix.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 15, 2016

comment:7

On this short term ticket, we do allow "make" to write into $prefix; and "make install" will be a no-op.

More ambitious plans are to be discussed on the long term ticket #21495, not on this ticket. Thanks.

@sagetrac-felixs
Copy link
Mannequin

sagetrac-felixs mannequin commented Sep 15, 2016

comment:8

i agree that there are intermediate steps to take. but i don't yet fully understand this approach.

i think the behaviour of just "make" should not change, regardless of --prefix. it works perfectly well and as intended right now. clearly it should do something different under the hood, but that's not on this ticket.

we do allow "make" to write into $prefix

why would you need/want that? can you please give an example?

my feeling is, that entangling prefix and SAGE_LOCAL further complicates the transition considerably. there will be no way to tell whether "this part still uses SAGE_LOCAL" vs. "this has already been cleaned". newcomers tend to grep a variable from the code, see how it is used and use it the same way. for a looong time to come.

@jdemeyer
Copy link

Changed author from Matthias Koeppe to Matthias Koeppe, Jeroen Demeyer

@jdemeyer jdemeyer modified the milestones: sage-7.4, sage-7.5 Sep 15, 2016
@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link

Changed author from Matthias Koeppe, Jeroen Demeyer to Matthias Koeppe

@jdemeyer
Copy link

comment:10

I made a new ticket (#21501) to allow $SAGE_LOCAL to be changed.

@jdemeyer
Copy link

Dependencies: #21501

@sagetrac-felixs
Copy link
Mannequin

sagetrac-felixs mannequin commented Sep 15, 2016

comment:11

i wrote

entangling prefix and SAGE_LOCAL further complicates the transition considerably.

@mkoeppe i've thought about it. it seems, the alternatives are much worse (#21501) or much more ambitious.

please go ahead with prefix==SAGE_LOCAL.

please consider to add a remark in some documentation (better place: configure --help?) on this temporary sort of prefix, such as

"currently, make install is a no-op, that will change (hopefully). you should not expect a fully functional installation in $prefix before make install has finished."

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 15, 2016

comment:12

Thanks Felix for the discussion.

If you want to help, could you work on rebasing #15105.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 18, 2016

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

64e697dAllow a custom $SAGE_LOCAL directory
dc81cf6Merge remote-tracking branch 'trac/u/jdemeyer/ticket/21501' into t/21479/__configure___prefix_sage_local
ac12edcMerge tag '7.4.beta5' into t/21479/__configure___prefix_sage_local
924b30bHandle --prefix

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 18, 2016

Changed commit from fa16fae to 924b30b

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 18, 2016

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

6f8eaacFixup

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 18, 2016

Changed commit from 924b30b to 6f8eaac

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 18, 2016

comment:15

Here's a first version of what I have in mind.

Some concerns:

  • bootstrap. It's somewhat unclear what to do here. By the way, is it supposed to use the distribution's Python or ours?
  • sage-location.

@jdemeyer
Copy link

comment:16

I don't like the duplication in build/make/install and src/bin/sage-env.

Here is a suggestion: add a new file, say src/bin/sage-config (or whatever you want to call it) to deal with configurable things like SAGE_LOCAL. You can also define the other SAGE_* directories (except SAGE_ROOT) there.

Then you can source this file in both src/bin/sage-env and build/make/install, which can then be independent of configure.

And I don't see the point of changing $SAGE_ROOT/sage because that is additional duplication.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 30, 2017

comment:119

No, this error disappears if you run autoreconf - and regenerate the configure package for the release using your scripts.

@jdemeyer
Copy link

comment:120

Replying to @mkoeppe:

regenerate the configure package for the release using your scripts.

If only the release manager would do this when testing a ticket...

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 30, 2017

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

2a069b1Update configure tarball

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 30, 2017

Changed commit from 890d417 to 2a069b1

@jdemeyer

This comment has been minimized.

@vbraun
Copy link
Member

vbraun commented Mar 30, 2017

comment:123

merge failure

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 31, 2017

comment:124

... with the configure tarball version

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 31, 2017

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

f624c95bootstrap: Don't use sage-env, set PATH directly
2dccfb0Restore lost comment
2aafa6fIndentation fix
4eeb130Install sage-env-config, not sage-env-config.in
8965a08Use SAGE_SCRIPTS_DIR to source sage-env-config
7b4dfbfSource sage-env but silence errors
44110ceLet "make install" build Sage
7d2595cRevert unneeded changes
1e98d9cHardcode path to sage-download-file
e5926b1Update configure tarball

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 31, 2017

Changed commit from 2a069b1 to e5926b1

@jdemeyer
Copy link

comment:126

Hopefully this is the final thing needed for this ticket...

@jdemeyer

This comment has been minimized.

@vbraun
Copy link
Member

vbraun commented Apr 3, 2017

Changed branch from u/jdemeyer/__configure___prefix_sage_local to e5926b1

@jhpalmieri
Copy link
Member

comment:128

As a consequence of this ticket, with a fresh tarball or after running make distclean, ./sage -i PKG fails, as does ./sage --sh. The error message says

Error: You must set either the SAGE_LOCAL or SAGE_SCRIPTS_DIR environment variable to run this
Error setting environment variables by sourcing '/Users/palmieri/Desktop/TEMP/sage-8.0.beta1/src/bin/sage-env';
possibly contact sage-devel (see http://groups.google.com/group/sage-devel).

Should these commands work out of the box? Running ./configure fixes this, I think, so should the error message be changed, at least?

@jhpalmieri
Copy link
Member

Changed commit from e5926b1 to none

@vbraun
Copy link
Member

vbraun commented Apr 13, 2017

comment:129

I think its reasonable to ask that one runs at least configure once before trying to launch any scripts in the source tarball. So +1 for changing the error message...

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