Opened 7 years ago

Closed 7 years ago

#19292 closed enhancement (fixed)

Don't source sage-env in configure

Reported by: Jeroen Demeyer Owned by:
Priority: major Milestone: sage-6.10
Component: build: configure Keywords:
Cc: Merged in:
Authors: Jeroen Demeyer Reviewers: Travis Scrimshaw, Volker Braun
Report Upstream: N/A Work issues:
Branch: 1bd3296 (Commits, GitHub, GitLab) Commit: 1bd3296cae6f5328180f985ad9d779a1bd9b3b0b
Dependencies: Stopgaps:

Status badges

Description (last modified by Jeroen Demeyer)

There is really no reason to source sage-env in configure. There are a few environment variables needed (like SAGE_ROOT and SAGE_LOCAL) but these are defined in configure anyway.

Also drop $SAGE_ROOT/build/bin and $SAGE_ROOT/src/bin from the $PATH.

Change History (14)

comment:1 Changed 7 years ago by Jeroen Demeyer

Description: modified (diff)

comment:2 Changed 7 years ago by Jeroen Demeyer

Branch: u/jdemeyer/ticket/19292

comment:3 Changed 7 years ago by Jeroen Demeyer

Commit: 47e33dac54248ac02ff018b210f0a0df9f9534db
Status: newneeds_review

New commits:

47e33daDo not source sage-env in configure

comment:4 Changed 7 years ago by Travis Scrimshaw

Reviewers: Travis Scrimshaw
Status: needs_reviewpositive_review


comment:5 Changed 7 years ago by Volker Braun

Status: positive_reviewneeds_work

Here is the reason:

[buildslave-sage@volker-desktop build]$ make clean
make build/make/Makefile
make[1]: Entering directory '/mnt/disk/home/buildslave-sage/slave/sage_git/build'
rm -f config.log
mkdir -p logs/pkgs
ln -s logs/pkgs/config.log config.log
running CONFIG_SHELL=/bin/sh /bin/sh ./configure --no-create --no-recursion
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for root user... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for ar... yes
checking for m4... yes
checking for ranlib... yes
checking for strip... yes
checking for GNU or BSD tar... /usr/bin/tar
checking for GNU make... /usr/bin/make
checking for latex... yes
checking for perl... /usr/bin/perl
checking for Perl version 5.8.0 or later... yes
checking for dpkg... no
checking for dpkg-architecture... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/mnt/disk/home/buildslave-sage/slave/sage_git/build':
configure: error: C compiler cannot create executables
See `config.log' for more details
If you would like to try to build Sage anyway (to help porting),
export the variable 'SAGE_PORT' to something non-empty.
Makefile:23: recipe for target 'build/make/Makefile' failed
make[1]: *** [build/make/Makefile] Error 1
make[1]: Leaving directory '/mnt/disk/home/buildslave-sage/slave/sage_git/build'
Makefile:16: recipe for target 'clean' failed
make: *** [clean] Error 2


configure:4259: checking whether the C compiler works
configure:4281: gcc    conftest.c  >&5
/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/libexec/gcc/x86_64-unknown-linux-gnu/4.9.2/cc1: error while loading shared 
libraries: cannot open shared object file: No such file or directory

comment:6 Changed 7 years ago by git

Commit: 47e33dac54248ac02ff018b210f0a0df9f9534db1bd3296cae6f5328180f985ad9d779a1bd9b3b0b

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

1bd3296Do not use any Sage PATH in configure

comment:7 Changed 7 years ago by Jeroen Demeyer

Milestone: sage-6.9sage-6.10
Status: needs_workneeds_review

comment:8 Changed 7 years ago by Volker Braun

Status: needs_reviewneeds_info

Can you then do a "make clean" if you don't have a system-wide fortran compiler?

comment:9 Changed 7 years ago by Nils Bruin

With this change in place, do we know that sage-env gets sourced only from bash scripts? This is relevant for #9386, where we do have a good solution using bash-isms. Writing the same functionality without relying on bash would be quite painful.

comment:10 in reply to:  8 Changed 7 years ago by Jeroen Demeyer

Replying to vbraun:

Can you then do a "make clean" if you don't have a system-wide fortran compiler?

The problem with the gcc test did not appear if you don't have a C compiler. The problem was if you have a broken C compiler. Apparently, having a broken C compiler is a hard error in autoconf.

In any case, I tested all configure-related tickets on, simply compiling Sage. I have not yet tested make clean with this new version.

comment:11 Changed 7 years ago by Jeroen Demeyer

Status: needs_infoneeds_review

On, I cannot reproduce the problem from 5. On which machine was that?

In any case, if you test this ticket, could you please test #19292 + #19313 together?

comment:12 Changed 7 years ago by Travis Scrimshaw

I don't feel confident enough to break my gcc (or even how to do that) to continue to review this ticket. Volker, Nils, could one of you finish the review?

comment:13 Changed 7 years ago by Volker Braun

Reviewers: Travis ScrimshawTravis Scrimshaw, Volker Braun
Status: needs_reviewpositive_review

comment:14 Changed 7 years ago by Volker Braun

Branch: u/jdemeyer/ticket/192921bd3296cae6f5328180f985ad9d779a1bd9b3b0b
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.