sagemath / sage

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

GCC is installed multiple times #24907

Closed jdemeyer closed 6 years ago

jdemeyer commented 6 years ago

24599 introduced an import regression: GCC is installed multiple times:

jdemeyer@sardonis:~/sage-gcc$ grep 'Setting up build directory for gcc' logs/install.log 
[gcc-7.2.0] Setting up build directory for gcc-7.2.0
[gcc-7.2.0] Setting up build directory for gcc-7.2.0
[gcc-7.2.0] Setting up build directory for gcc-7.2.0

Depends on #24867

CC: @embray

Component: build: configure

Author: Jeroen Demeyer

Branch: a682787

Reviewer: Volker Braun

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

jdemeyer commented 6 years ago

Branch: u/jdemeyer/gcc_is_installed_multiple_times

jdemeyer commented 6 years ago

Commit: c242b0d

jdemeyer commented 6 years ago

New commits:

3d62226The check for broken GCC should use src/bin/sage-env
2f4dcdeRevert "Libraries should be real dependencies"
c242b0dPretend that GCC is not installed when reinstalling GCC
mkoeppe commented 6 years ago
comment:3
+            rm -f "$SAGE_LOCAL"/gcc
+            rm -f "$SAGE_LOCAL"/g++

Do you mean "$SAGE_LOCAL"/bin/gcc etc. here? And what does it mean to "pretend" that it is not installed?

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

Changed commit from c242b0d to 5c7b7fc

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

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

5c7b7fcPretend that GCC is not installed when reinstalling GCC
mkoeppe commented 6 years ago
comment:7

This looks fine to me but I don't fully understand the details of how gcc and its dependencies are installed in sage, so someone else should finish the review of this ticket.

vbraun commented 6 years ago

Reviewer: Volker Braun

vbraun commented 6 years ago
comment:9

This wasn't the cause for the breakage in ppl/givaro noted at #24703 comment:17, various 32-bit buildbots are still borked

vbraun commented 6 years ago
comment:10

In fact mpir isn't built a second time, there is only the first build which does disable the c++ interface:

buildbot@sagebd07_32s02:~/slave/sage_git/build$ grep -B 1 able-cxx logs/pkgs/mpir-3.0.0-644faf502c56f97d9accd301965fc57d6ec70868.log 
Configuring MPIR with the following options:
    --prefix="/home/buildbot/slave/sage_git/build/local" --libdir="/home/buildbot/slave/sage_git/build/local/lib" --enable-gmpcompat --enable-shared  --disable-cxx --disable-static
vbraun commented 6 years ago
comment:12

It does fix the building-gcc-twice bug tho; but maybe the remaining toolchain dependencies coud be fixed here as well?

jdemeyer commented 6 years ago
comment:13

If you insist... but one could also consider that an independent bug.

jdemeyer commented 6 years ago
comment:14

Replying to @vbraun:

In fact mpir isn't built a second time, there is only the first build which does disable the c++ interface:

I think that might have been broken in #21524.

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

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

0775ad1Revert "Libraries should be real dependencies"
bfee01bPretend that GCC is not installed when reinstalling GCC
a682787Revert "Everything should be rebuilt after GCC upgrade"
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Changed commit from 5c7b7fc to a682787

vbraun commented 6 years ago

Changed branch from u/jdemeyer/gcc_is_installed_multiple_times to a682787

embray commented 6 years ago

Changed commit from a682787 to none

embray commented 6 years ago
comment:18

I didn't even get to see this before it was closed as "fixed", but I must insist that in the future ./configure should not be doing weird things that modify $SAGE_LOCAL.

Instead this should change something about how the makefile works...

embray commented 6 years ago
comment:19

What's a reliable way to reproduce this, so that I can try out a different fix? Is it just to install Sage's gcc package, and then what? Why would the gcc in Sage be broken?

jdemeyer commented 6 years ago
comment:20

Replying to @embray:

What's a reliable way to reproduce this

Revert this commit and build Sage with SAGE_INSTALL_GCC=yes. It should only build GCC once.

Why would the gcc in Sage be broken?

Because the libraries it depends on are upgraded, see #24599.

embray commented 6 years ago
comment:21

I still cannot figure out an exact sequence of steps to reproduce this on 8.2.beta8. I install GCC, then I install giac, then I ./sage -f gcc? Seems to work... Should I go back to an older version?

jdemeyer commented 6 years ago
comment:22

Replying to @embray:

I still cannot figure out an exact sequence of steps to reproduce this

What is "this"? #24907 or #24599?

embray commented 6 years ago
comment:23

Both, really. I can't reproduce #24907 (this ticket, hence "this"). But I don't know how to reproduce it without reproducing #24599 which I also can't do (but maybe I have to go back to an older version to do that).