Opened 5 years ago

Closed 5 years ago

#19292 closed enhancement (fixed)

Don't source sage-env in configure

Reported by: jdemeyer 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) Commit: 1bd3296cae6f5328180f985ad9d779a1bd9b3b0b
Dependencies: Stopgaps:

Description (last modified by jdemeyer)

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 5 years ago by jdemeyer

  • Description modified (diff)

comment:2 Changed 5 years ago by jdemeyer

  • Branch set to u/jdemeyer/ticket/19292

comment:3 Changed 5 years ago by jdemeyer

  • Commit set to 47e33dac54248ac02ff018b210f0a0df9f9534db
  • Status changed from new to needs_review

New commits:

47e33daDo not source sage-env in configure

comment:4 Changed 5 years ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

LGTM.

comment:5 Changed 5 years ago by vbraun

  • Status changed from positive_review to needs_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

config.log:

[...]
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: libgmp.so.16: cannot open shared object file: No such file or directory
[...]

comment:6 Changed 5 years ago by git

  • Commit changed from 47e33dac54248ac02ff018b210f0a0df9f9534db to 1bd3296cae6f5328180f985ad9d779a1bd9b3b0b

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

1bd3296Do not use any Sage PATH in configure

comment:7 Changed 5 years ago by jdemeyer

  • Milestone changed from sage-6.9 to sage-6.10
  • Status changed from needs_work to needs_review

comment:8 follow-up: Changed 5 years ago by vbraun

  • Status changed from needs_review to needs_info

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

comment:9 Changed 5 years ago by nbruin

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 5 years ago by jdemeyer

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 home.vbraun.cc, simply compiling Sage. I have not yet tested make clean with this new version.

comment:11 Changed 5 years ago by jdemeyer

  • Status changed from needs_info to needs_review

On home.vbraun.cc, 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 5 years ago by tscrim

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 5 years ago by vbraun

  • Reviewers changed from Travis Scrimshaw to Travis Scrimshaw, Volker Braun
  • Status changed from needs_review to positive_review

comment:14 Changed 5 years ago by vbraun

  • Branch changed from u/jdemeyer/ticket/19292 to 1bd3296cae6f5328180f985ad9d779a1bd9b3b0b
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.