Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#24907 closed defect (fixed)

GCC is installed multiple times

Reported by: jdemeyer Owned by:
Priority: blocker Milestone: sage-8.2
Component: build: configure Keywords:
Cc: embray Merged in:
Authors: Jeroen Demeyer Reviewers: Volker Braun
Report Upstream: N/A Work issues:
Branch: a682787 (Commits, GitHub, GitLab) Commit:
Dependencies: #24867 Stopgaps:

Status badges

Description

#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

Change History (23)

comment:1 Changed 4 years ago by jdemeyer

  • Branch set to u/jdemeyer/gcc_is_installed_multiple_times

comment:2 Changed 4 years ago by jdemeyer

  • Commit set to c242b0d76c6c8608edc7f4509716b32a5ff03ade
  • Status changed from new to needs_review

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

comment:3 Changed 4 years ago by mkoeppe

+            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?

comment:4 Changed 4 years ago by jdemeyer

  • Status changed from needs_review to needs_work

comment:5 Changed 4 years ago by git

  • Commit changed from c242b0d76c6c8608edc7f4509716b32a5ff03ade to 5c7b7fc36da9844dcad9c88140d7a2dc3d235d57

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

comment:6 Changed 4 years ago by jdemeyer

  • Status changed from needs_work to needs_review

comment:7 Changed 4 years ago by mkoeppe

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.

comment:8 Changed 4 years ago by vbraun

  • Reviewers set to Volker Braun
  • Status changed from needs_review to positive_review

comment:9 Changed 4 years ago by vbraun

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

comment:10 follow-up: Changed 4 years ago by vbraun

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

comment:11 Changed 4 years ago by vbraun

  • Status changed from positive_review to needs_work

comment:12 Changed 4 years ago by vbraun

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

comment:13 Changed 4 years ago by jdemeyer

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

comment:14 in reply to: ↑ 10 Changed 4 years ago by jdemeyer

  • Cc embray added

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.

comment:15 Changed 4 years ago by git

  • Commit changed from 5c7b7fc36da9844dcad9c88140d7a2dc3d235d57 to a682787fb43197162f4f562bec4f311431994561

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"

comment:16 Changed 4 years ago by jdemeyer

  • Status changed from needs_work to needs_review

comment:17 Changed 4 years ago by vbraun

  • Branch changed from u/jdemeyer/gcc_is_installed_multiple_times to a682787fb43197162f4f562bec4f311431994561
  • Resolution set to fixed
  • Status changed from needs_review to closed

comment:18 Changed 4 years ago by embray

  • Commit a682787fb43197162f4f562bec4f311431994561 deleted

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...

comment:19 follow-up: Changed 4 years ago by embray

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?

Last edited 4 years ago by embray (previous) (diff)

comment:20 in reply to: ↑ 19 Changed 4 years ago by jdemeyer

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.

comment:21 follow-up: Changed 4 years ago by embray

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?

comment:22 in reply to: ↑ 21 Changed 4 years ago by jdemeyer

Replying to embray:

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

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

comment:23 Changed 4 years ago by embray

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).

Note: See TracTickets for help on using tickets.