Opened 7 years ago

Closed 7 years ago

#12366 closed enhancement (fixed)

In mpfr, delete old libraries *after* build

Reported by: jdemeyer Owned by: tbd
Priority: minor Milestone: sage-5.0
Component: packages: standard Keywords: mpfr spkg gcc
Cc: mjo Merged in: sage-5.0.beta4
Authors: Jeroen Demeyer Reviewers: Michael Orlitzky
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by jdemeyer)

If we ever want to build our own gcc, we must not delete the mpfr libraries before building mpfr. This is because gcc links against mpfr.

spkg: http://boxen.math.washington.edu/home/jdemeyer/spkg/mpfr-2.4.2.p1.spkg

Attachments (1)

mpfr-2.4.2.p0-p1.diff (2.8 KB) - added by jdemeyer 7 years ago.
Diff for the mpfr spkg p0 -> p1, for review only

Download all attachments as: .zip

Change History (11)

comment:1 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:2 Changed 7 years ago by jdemeyer

  • Authors set to Jeroen Demeyer
  • Status changed from new to needs_review

comment:3 Changed 7 years ago by mjo

  • Cc mjo added

The MAKE=make line appeared in this changeset:

changeset:   4:4f973988b8df
user:        mabshoff@sage.math.washington.edu
date:        Mon Jan 14 17:08:19 2008 -0800
summary:     mpfr-2.3.0.p1: apply patch r5186 from mpfr repo that fixes a stack smashing issue, update SPKG.txt

but I don't see a good reason for it. Maybe there was a parallel build failure once upon a time.

comment:4 Changed 7 years ago by mjo

  • Reviewers set to Michael Orlitzky
  • Status changed from needs_review to needs_work

We should only remove the old stuff after a successful build; otherwise, we can't try again. I made some small breaking change to one of the header files:

$ sage -f mpfr-2.4.2.p1.spkg | grep -i deleting
Deleting directories from past builds of previous/current versions of mpfr-2.4.2.p1
Deleting old libraries
Deleting old headers
Error: Failed to install package 'mpfr-2.4.2.p1'.

comment:5 Changed 7 years ago by jdemeyer

I see, there is no check that "$MAKE" actually worked!

Changed 7 years ago by jdemeyer

Diff for the mpfr spkg p0 -> p1, for review only

comment:6 Changed 7 years ago by jdemeyer

  • Status changed from needs_work to needs_review

comment:7 follow-up: Changed 7 years ago by mjo

It's still possible that make install could fail, leaving GCC without an MPFR. The only solution I see to that would be to move the libs to a temp directory before make install and remove them afterwards.

Is it even worth worrying about? You don't need GCC to make install. I'll give a positive review as-is; I just want to make sure it's a conscious decision to ignore that case.

comment:8 in reply to: ↑ 7 Changed 7 years ago by jdemeyer

Replying to mjo:

It's still possible that make install could fail, leaving GCC without an MPFR. The only solution I see to that would be to move the libs to a temp directory before make install and remove them afterwards.

Is it even worth worrying about?

I think it's not so likely that "make install" would fail, since it essentially only copies files. It could fail with "No space left on device".

comment:9 Changed 7 years ago by mjo

  • Status changed from needs_review to positive_review

It can also fail if there's a bug (e.g. missing file) upstream, but someone should notice that early on. Probably more likely that we would introduce a bug in the workaround.

comment:10 Changed 7 years ago by jdemeyer

  • Merged in set to sage-5.0.beta4
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.