Opened 15 years ago

Closed 14 years ago

#24664 closed defect (fixed)

gcc45 bootstrap comparison failure

Reported by: eschnett (Erik Schnetter) Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: Cc: jschwab@…, kyle-macports@…, adfernandes (Andrew Fernandes), badsectoracula@…, klaas_giesbertz@…, hujingzhe@…, MartinBuchmann (Martin Buchmann), rob.nikander@…, skymoo (Adam Mercer), alexoedelman@…, fang@…, chris.h.green@…, jsanchez@…, bug@…, ryandesign (Ryan Carsten Schmidt)
Port: gcc45

Description (last modified by jmroot (Joshua Root))

gcc45 does not build on my system; it reports a bootstrap comparison failure. The reported error messages are

Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1obj-checksum.o differs
warning: gcc/cc1objplus-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
Bootstrap comparison failure!
x86_64-apple-darwin10/i386/libgomp/.libs/bar.o differs
x86_64-apple-darwin10/i386/libgomp/.libs/barrier.o differs
x86_64-apple-darwin10/i386/libgomp/.libs/env.o differs
x86_64-apple-darwin10/i386/libgomp/.libs/iter.o differs
x86_64-apple-darwin10/i386/libgomp/.libs/iter_ull.o differs
x86_64-apple-darwin10/i386/libgomp/.libs/lock.o differs
x86_64-apple-darwin10/i386/libgomp/.libs/loop.o differs
x86_64-apple-darwin10/i386/libgomp/.libs/loop_ull.o differs
x86_64-apple-darwin10/i386/libgomp/.libs/ordered.o differs
x86_64-apple-darwin10/i386/libgomp/.libs/parallel.o differs
x86_64-apple-darwin10/i386/libgomp/.libs/proc.o differs
x86_64-apple-darwin10/i386/libgomp/.libs/sections.o differs
x86_64-apple-darwin10/i386/libgomp/.libs/single.o differs
x86_64-apple-darwin10/i386/libgomp/.libs/task.o differs
x86_64-apple-darwin10/i386/libgomp/.libs/team.o differs
x86_64-apple-darwin10/i386/libgomp/.libs/work.o differs
x86_64-apple-darwin10/i386/libgomp/bar.o differs
x86_64-apple-darwin10/i386/libgomp/barrier.o differs
x86_64-apple-darwin10/i386/libgomp/env.o differs
x86_64-apple-darwin10/i386/libgomp/iter.o differs
x86_64-apple-darwin10/i386/libgomp/iter_ull.o differs
x86_64-apple-darwin10/i386/libgomp/lock.o differs
x86_64-apple-darwin10/i386/libgomp/loop.o differs
x86_64-apple-darwin10/i386/libgomp/loop_ull.o differs
x86_64-apple-darwin10/i386/libgomp/ordered.o differs
x86_64-apple-darwin10/i386/libgomp/parallel.o differs
x86_64-apple-darwin10/i386/libgomp/proc.o differs
x86_64-apple-darwin10/i386/libgomp/sections.o differs
x86_64-apple-darwin10/i386/libgomp/single.o differs
x86_64-apple-darwin10/i386/libgomp/task.o differs
x86_64-apple-darwin10/i386/libgomp/team.o differs
x86_64-apple-darwin10/i386/libgomp/work.o differs

I attach the full debug output.

Attachments (4)

gcc45.txt.bz2 (115.7 KB) - added by eschnett (Erik Schnetter) 15 years ago.
Debug output
gcc45-build.log.bz2 (117.0 KB) - added by chris.h.green@… 14 years ago.
XCode 3.2.2
Portfile-tls-configure.diff (474 bytes) - added by howarth@… 14 years ago.
Portfile diff to build with tls_configure_fix.diff.
tls_configure_fix.diff (3.2 KB) - added by howarth@… 14 years ago.

Download all attachments as: .zip

Change History (40)

Changed 15 years ago by eschnett (Erik Schnetter)

Attachment: gcc45.txt.bz2 added

Debug output

comment:1 Changed 15 years ago by jmroot (Joshua Root)

Description: modified (diff)
Owner: changed from macports-tickets@… to mww@…

Please remember to cc the maintainer.

comment:2 Changed 15 years ago by david@…

I had exactly the same problem 2 days ago, seemingly caused by an outdated port tree. After "port selfupdate; port clean gcc45; port install gcc45", the port installed successfully.

comment:3 Changed 15 years ago by jschwab@…

Cc: jschwab@… added

Cc Me!

comment:4 in reply to:  2 ; Changed 15 years ago by jschwab@…

Replying to david@…:

I had exactly the same problem 2 days ago, seemingly caused by an outdated port tree. After "port selfupdate; port clean gcc45; port install gcc45", the port installed successfully.

I'm having the same problem, but selfupdate -> clean -> install did not solve this for me. I'm on OS X 10.6.3.

comment:5 Changed 15 years ago by kyle-macports@…

Cc: kyle-macports@… added

Cc Me!

comment:6 in reply to:  4 Changed 15 years ago by kyle-macports@…

Replying to jschwab@…:

I'm having the same problem, but selfupdate -> clean -> install did not solve this for me. I'm on OS X 10.6.3.

Ditto for me as well: the update/clean/install didn't change anything.

comment:7 in reply to:  2 Changed 15 years ago by adfernandes (Andrew Fernandes)

Same problem - 10.6.3 - update/clean/install did not solve anything...

comment:8 Changed 15 years ago by adfernandes (Andrew Fernandes)

Cc: adfernandes@… added

Cc Me!

comment:9 Changed 15 years ago by badsectoracula@…

Cc: badsectoracula@… added

Cc Me!

comment:10 Changed 15 years ago by badsectoracula@…

This happens to me too. Mac OS X 10.6.3. The update, clean and install didn't helped.

comment:11 Changed 15 years ago by Veence (Vincent)

I built gcc45 yesterday and had no such problem. I've disabled the java compiler, though (takes hours to build, and I hate java). For what arch are you building? 64 or 32 bits?

comment:12 in reply to:  11 Changed 15 years ago by jschwab@…

Replying to vince@…:

I built gcc45 yesterday and had no such problem. I've disabled the java compiler, though (takes hours to build, and I hate java). For what arch are you building? 64 or 32 bits?

I can't speak for anyone else, but for me the target is 64 bit, x86_64-apple-darwin10.

comment:13 Changed 15 years ago by Veence (Vincent)

Strange.

If it can be useful to you, here is the output of the -v option:

gcc-mp-4.5 -v
Using built-in specs.
COLLECT_GCC=gcc-mp-4.5
COLLECT_LTO_WRAPPER=/usr/pkg/libexec/gcc/x86_64-apple-darwin10/4.5.0/lto-wrapper
Target: x86_64-apple-darwin10
Configured with: ../gcc-4.5.0/configure --prefix=/usr/pkg --build=x86_64-apple-darwin10 --enable-languages=c,c++,objc,obj-c++,fortran --enable-multilib --libdir=/usr/pkg/lib/gcc45 --includedir=/usr/pkg/include/gcc45 --infodir=/usr/pkg/share/info --mandir=/usr/pkg/share/man --datarootdir=/usr/pkg/share/gcc-4.5 --with-local-prefix=/usr/pkg --with-system-zlib --disable-nls --program-suffix=-mp-4.5 --with-gxx-include-dir=/usr/pkg/include/gcc45/c++/ --with-gmp=/usr/pkg --with-mpfr=/usr/pkg --with-mpc==/usr/pkg --enable-stage1-checking
Thread model: posix
gcc version 4.5.0 (GCC) 

comment:14 Changed 15 years ago by klaas_giesbertz@…

Cc: klaas_giesbertz@… added

Cc Me!

comment:15 Changed 15 years ago by hujingzhe@…

Cc: hujingzhe@… added

Cc Me!

comment:16 Changed 15 years ago by MartinBuchmann (Martin Buchmann)

Cc: Martin.Buchmann@… added

Cc Me!

comment:17 Changed 15 years ago by rob.nikander@…

Cc: rob.nikander@… added

Cc Me!

comment:18 Changed 15 years ago by skymoo (Adam Mercer)

Cc: ram@… added

Cc Me!

comment:19 Changed 15 years ago by alexoedelman@…

Cc: alexoedelman@… added

Cc Me!

comment:20 Changed 15 years ago by fang@…

Cc: fang@… added

Cc Me!

comment:21 Changed 15 years ago by chris.h.green@…

To experts: could this be anything to do with XCode version? I see the same problem and I'm running 10.6.3 with XCode 3.2.2 (the latest, released April 2010).

Is there any information I could provide that would help someone diagnose this and if the XCode version is a problem, help test a fix? I'm afraid I'm not competent enough a MAC OS X programmer to take on the diagnosis / fixing task myself.

comment:22 Changed 15 years ago by adfernandes (Andrew Fernandes)

Hmm... good point - I'd forgotten about the xcode point release. My failure is on 10.6.3 with the latest xcode 3.2.2, too.

comment:23 Changed 15 years ago by skymoo (Adam Mercer)

I too have Xcode-3.2.2, but gcc45 built after a couple of attempts...

comment:24 in reply to:  23 ; Changed 15 years ago by chris.h.green@…

Replying to ram@…:

I too have Xcode-3.2.2, but gcc45 built after a couple of attempts...

Can you describe what you changed between attempts?

Thanks, Chris.

comment:25 in reply to:  24 Changed 15 years ago by skymoo (Adam Mercer)

Replying to chris.h.green@…:

Can you describe what you changed between attempts?

As far as I know, nothing... I can't understand it...

comment:26 Changed 14 years ago by chris.h.green@…

Cc: chris.h.green@… added

Cc Me!

comment:27 Changed 14 years ago by chris.h.green@…

I removed XCode and Macports entirely, rebooted, re-installed XCode and MacPorts from fresh downloads and then attempted to re-install gcc45 as the first port install.

Again, comparison failures in stage3-bubble, this time in libgomp objects.

I'm at a loss. I will re-do with debug and attach the result in the hope that an expert can understand it, but this is completely beyond my understanding.

Changed 14 years ago by chris.h.green@…

Attachment: gcc45-build.log.bz2 added

XCode 3.2.2

comment:28 Changed 14 years ago by jsanchez@…

Cc: jsanchez@… added

Cc Me!

comment:29 Changed 14 years ago by bug@…

Cc: bug@… added

Cc Me!

comment:30 Changed 14 years ago by howarth@…

This bootstrap issue is due to the fact that libgomp has been added to the stage2 build and tickled a pre-existing issue with the tls test in configure. A race condition exists in the current tls test where the memory used is released before the test program is finished with it. A fix has been proposed for this upstream http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43170#c72.

Changed 14 years ago by howarth@…

Attachment: Portfile-tls-configure.diff added

Portfile diff to build with tls_configure_fix.diff.

Changed 14 years ago by howarth@…

Attachment: tls_configure_fix.diff added

comment:31 Changed 14 years ago by chris.h.green@…

Howard, this is great, thank you!

I have (I think) applied correctly the patches you uploaded and I am rebuilding right now. I will report on how it goes.

Thanks, Chris.

comment:32 Changed 14 years ago by chris.h.green@…

These patches, when applied, cause the build to be successful!

Thanks for finding the appropriate problem report, extracting the patch at issue and putting into into the correct form for macports. I'm assuming that when this fix is committed, I won't need a rebuild because the Portfile patch will show my system as already updated?

Best, Chris.

comment:33 Changed 14 years ago by bug@…

How do I apply theese patches?

Btw, the same Problem exists with gcc46: #25091

comment:34 Changed 14 years ago by chris.h.green@…

Here goes:

sudo bash -ls
wget --no-check-certificate 'https://svn.macports.org/raw-attachment/ticket/24664/Portfile-tls-configure.diff'
wget --no-check-certificate 'https://svn.macports.org/raw-attachment/ticket/24664/tls_configure_fix.diff'
port fetch gcc45
cd $(port dir gcc45)
patch -p0 < ~/Portfile-tls-configure.diff
cp ~/tls_configure_fix.diff files/
port install gcc45

If you already have a failed attempt, you'll probably want to do a:

port clean --all gcc45

first.

If you have trouble with this, let me know.

comment:35 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

You do not need to "sudo port clean --all gcc45"; that will delete the distfiles too for no good reason. A simple "sudo port clean gcc45" is sufficient.

comment:36 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

Thank you for finding this patch, Jack. Fixed for gcc45 in r68780.

The upstream bug report was fixed 2010-06-10 so we can expect to be able to remove this patch from the portfile when updating it to gcc 4.5.1.

Note: See TracTickets for help on using tickets.