[MacPorts] #55544: gcc compiles should only be two stage (not three)

MacPorts noreply at macports.org
Mon Dec 18 21:50:38 UTC 2017


#55544: gcc compiles should only be two stage (not three)
--------------------+-----------------
 Reporter:  eiked   |      Owner:
     Type:  defect  |     Status:  new
 Priority:  Normal  |  Milestone:
Component:  ports   |    Version:
 Keywords:          |       Port:
--------------------+-----------------
 Compiling a recent version of gcc on a slow machine is a real endeavour.
 (compiling gcc7 on tiger at 400MHz takes about 5 days, oops)

 As you know, compiling gcc goes in three stages:
 - stage 1: compile new gcc version with old compiler
 - stage 2: compile new gcc with gcc as produced in stage 1
 - stage 3: compile new gcc with gcc as produced in stage 2

 and then:
 - compare results of stage 2 and stage 3 for match to assure correctness

 I believe that the third stage is not needed in the context of macports.
 (But then, making sure that the compiler is really perfect also makes
 sense)

 The first stage should be compiled with the system installed compiler or
 the macport equivalent
 (aka macports apple-gcc42 on Tiger)
 This should give reproducible results.

 The second stage should be compiled with the compiler from stage 1
 This should give reproducible results.

 I believe that the third stage is not needed
 (given that stage one and stage two should already be fully reproducible
 in the context of macports)

 I believe that the three stage compile is only needed in a gcc development
 context,
 but that the third stage (and compare) is not needed to install into a
 well known context.

 ---
 Another Problem around that:


 the compare sh script hangs forever (on Tiger)
 and needs to be kill -KILL for the make to proceed

 Last output before hang was:
 (ut it might got hung somewhere later, unrelated)
 {{{
 Comparing stages 2 and 3
 warning: gcc/cc1obj-checksum.o differs
 warning: gcc/cc1objplus-checksum.o differs
 }}}

 sh and kernel ran 50%/50%, I waited like 24hours,
 I did a ktrace on the sh and there where zero system calls
 I needed to hard KILL the sh, obviously something was hung

 I've had that very same hang from stage 1 to stage 2
 and also when compiling libgcc


 Suggestion:

 Maybe the compare script needs a more recent bash?
 tiger: #!/bin/bash might be too old?

 Maybe we should require a recent bash from macports?
 (and patch that script to #!/opt/local/bin/bash)

--
Ticket URL: <https://trac.macports.org/ticket/55544>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list