Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#51245 closed defect (fixed)

libgcc-devel @6-20160421_0 build fails on OS X 10.10.5

Reported by: mopihopi Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: haspatch Cc: dstrubbe (David Strubbe), ryandesign (Ryan Schmidt), SickTeddyBear, jakubsafar@…, mf2k (Frank Schima), W-E-Brown, almage (Roy Miller), Schamschula (Marius Schamschula), dbevans (David B. Evans), benoit.bayol@…, vsoftco@…, petrrr, napierdmark@…, NestorCerpa
Port: libgcc, libgcc-devel

Description (last modified by dstrubbe (David Strubbe))

Upgrading libgcc-devel to @6-20160421_0 on OS X 10.10.5 results in a build failure, using Xcode 7.2.1 Build version 7C1002.

--->  Computing dependencies for libgcc-devel
--->  Fetching archive for libgcc-devel
--->  Attempting to fetch libgcc-devel-6-20160421_0.darwin_14.x86_64.tbz2 from https://packages.macports.org/libgcc-devel
--->  Attempting to fetch libgcc-devel-6-20160421_0.darwin_14.x86_64.tbz2 from http://sea.us.packages.macports.org/macports/packages/libgcc-devel
--->  Attempting to fetch libgcc-devel-6-20160421_0.darwin_14.x86_64.tbz2 from http://lil.fr.packages.macports.org/libgcc-devel
--->  Fetching distfiles for libgcc-devel
--->  Attempting to fetch gcc-6-20160421.tar.bz2 from https://distfiles.macports.org/gcc6
--->  Attempting to fetch gcc-6-20160421.tar.bz2 from ftp://gcc.gnu.org/pub/gcc/snapshots/6-20160421/
--->  Verifying checksums for libgcc-devel                                           
--->  Extracting libgcc-devel
--->  Configuring libgcc-devel
--->  Building libgcc-devel
Error: org.macports.build for port libgcc-devel returned: command execution failed
Please see the log file for port libgcc-devel for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc6/libgcc-devel/main.log
Error: Unable to upgrade port: 1
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets

The same issue occurs on both the buildbot and locally.
https://build.macports.org/builders/buildports-yosemite-x86_64/builds/9209/steps/compile/logs/stdio

...
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!
gcc/auto-profile.o differs
gcc/bb-reorder.o differs
gcc/build/genconfig.o differs
gcc/build/genflags.o differs
gcc/build/genpeep.o differs
gcc/build/genrecog.o differs
gcc/build/vec.o differs
gcc/c/c-parser.o differs
gcc/c/c-typeck.o differs
gcc/cfganal.o differs
gcc/combine.o differs
gcc/cp/constexpr.o differs
gcc/dwarf2out.o differs
gcc/expmed.o differs
gcc/fixed-value.o differs
gcc/fortran/arith.o differs
gcc/fortran/resolve.o differs
gcc/fortran/trans-common.o differs
gcc/fwprop.o differs
gcc/graphite-scop-detection.o differs
gcc/ipa-cp.o differs
gcc/ipa-devirt.o differs
gcc/ipa-icf.o differs
gcc/ipa.o differs
gcc/lto-cgraph.o differs
gcc/postreload.o differs
gcc/recog.o differs
gcc/reload1.o differs
gcc/rtlanal.o differs
gcc/timevar.o differs
gcc/tree-cfg.o differs
gcc/tree-chkp-opt.o differs
gcc/tree-data-ref.o differs
gcc/tree-eh.o differs
gcc/tree-into-ssa.o differs
gcc/tree-parloops.o differs
gcc/tree-sra.o differs
gcc/tree-ssa-loop-ivopts.o differs
gcc/tree-ssa-pre.o differs
gcc/tree-ssa-structalias.o differs
gcc/tree-vect-loop-manip.o differs
gcc/tree.o differs
gcc/varasm.o differs
gcc/vec.o differs
libcpp/expr.o differs
make[2]: *** [compare] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_mports_dports_lang_gcc6/libgcc-devel/work/build'
make[1]: *** [stage3-bubble] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_mports_dports_lang_gcc6/libgcc-devel/work/build'
make: *** [bootstrap] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_mports_dports_lang_gcc6/libgcc-devel/work/build'
Command failed:  cd "/opt/local/var/macports/build/_opt_mports_dports_lang_gcc6/libgcc-devel/work/build" && /usr/bin/make -j5 -w bootstrap 
Exit code: 2
Error: org.macports.build for port libgcc-devel returned: command execution failed

Attachments (2)

main.log (17.7 MB) - added by mf2k (Frank Schima) 4 years ago.
gcc6.diff (718 bytes) - added by ryandesign (Ryan Schmidt) 4 years ago.

Change History (35)

comment:1 Changed 4 years ago by mf2k (Frank Schima)

Cc: mww@… removed
Owner: changed from macports-tickets@… to mww@…

comment:2 Changed 4 years ago by dstrubbe (David Strubbe)

Cc: dstrubbe@… added

Cc Me!

comment:3 Changed 4 years ago by dstrubbe (David Strubbe)

Description: modified (diff)

comment:4 Changed 4 years ago by dstrubbe (David Strubbe)

Cc: ryandesign@… added

comment:5 Changed 4 years ago by dstrubbe (David Strubbe)

cc'ing Ryan who made the last update

comment:6 Changed 4 years ago by dstrubbe (David Strubbe)

Port: libgcc added

Note: what was libgcc-devel is now called libgcc (r148332)

Last edited 4 years ago by dstrubbe (David Strubbe) (previous) (diff)

comment:7 Changed 4 years ago by dbevans (David B. Evans)

Looks like it's failing on 10.10+ per the buildbots.

comment:8 Changed 4 years ago by dstrubbe (David Strubbe)

Yes, and this is a much bigger deal now that it is the default dependency for all the gcc versions. Some possible insight might come from: https://github.com/Homebrew/legacy-homebrew/issues/38501 and ticket #45174.

comment:9 Changed 4 years ago by SickTeddyBear

Cc: amcgee@… added

Cc Me!

comment:10 Changed 4 years ago by ryandesign (Ryan Schmidt)

It built successfully for me on my El Capitan system before committing. I have Xcode 7.3 on my system. I think the El Capitan buildbot is still running Xcode 7.1 and the Yosemite buildbot is still running Xcode 6.4 so maybe this is something Apple fixed in later clang versions.

Thanks for the reference to the Homebrew issue. I will first have to see if I can reproduce the problem locally by downgrading my Xcode, then see if any of the suggested fixes work for us.

#45174 is not related; that was a PowerPC-specific bug in ld64. We have had many tickets over the years about "Bootstrap comparison failure" when building gcc, which are not all caused by the same issue.

comment:11 Changed 4 years ago by jakubsafar@…

Cc: jakubsafar@… added

Cc Me!

comment:12 Changed 4 years ago by jakubsafar@…

Cc: jakubsafar@… removed

Cc Me!

comment:13 Changed 4 years ago by jakubsafar@…

Cc: jakubsafar@… added
Last edited 4 years ago by jakubsafar@… (previous) (diff)

comment:14 Changed 4 years ago by mf2k (Frank Schima)

Build fails for me too on Yosemite. I think this should be considered High priority.

$ uname -a
Darwin 670fsmac 14.5.0 Darwin Kernel Version 14.5.0: Mon Jan 11 18:48:35 PST 2016; root:xnu-2782.50.2~1/RELEASE_X86_64 x86_64

$ xcodebuild -version
Xcode 7.2.1
Build version 7C1002

Changed 4 years ago by mf2k (Frank Schima)

Attachment: main.log added

comment:15 Changed 4 years ago by mf2k (Frank Schima)

Cc: mf2k@… added

Cc Me!

comment:16 Changed 4 years ago by dbevans (David B. Evans)

Same here. See also #51311.

comment:17 Changed 4 years ago by W-E-Brown

Cc: webrown.cpp@… added

Cc Me!

comment:18 Changed 4 years ago by almage (Roy Miller)

on Yosemite (10.10.5), with Xcode 7.2.1, trying to install gcc5, using current Portfile @148332, fails when installing libgcc, now using libgcc @6.1.0. Creating a local port repository, and the previous gcc5 Portfile @148017, gcc installs immediately with no errors. Fetches libgcc-5.3.0_1.darwin_14.x86_64.tbz2.rmd160, installs and downloads gcc5.

Thu May 05 09:32:39 archer macports> sudo port install gcc5
--->  Computing dependencies for gcc5
--->  Dependencies to be installed: libgcc
--->  Fetching archive for libgcc
--->  Attempting to fetch libgcc-5.3.0_1.darwin_14.x86_64.tbz2 from http://sea.us.packages.macports.org/macports/packages/libgcc
--->  Attempting to fetch libgcc-5.3.0_1.darwin_14.x86_64.tbz2.rmd160 from http://sea.us.packages.macports.org/macports/packages/libgcc
--->  Installing libgcc @5.3.0_1
--->  Activating libgcc @5.3.0_1
--->  Cleaning libgcc
--->  Fetching archive for gcc5
--->  Attempting to fetch gcc5-5.3.0_1.darwin_14.x86_64.tbz2 from http://sea.us.packages.macports.org/macports/packages/gcc5
--->  Attempting to fetch gcc5-5.3.0_1.darwin_14.x86_64.tbz2.rmd160 from http://sea.us.packages.macports.org/macports/packages/gcc5
--->  Installing gcc5 @5.3.0_1
--->  Activating gcc5 @5.3.0_1
--->  Cleaning gcc5
--->  Updating database of binaries
--->  Scanning binaries for linking errors               
--->  No broken files found.

Last edited 4 years ago by ryandesign (Ryan Schmidt) (previous) (diff)

comment:19 Changed 4 years ago by almage (Roy Miller)

Cc: gryphon.csd8@… added

Cc Me!

comment:20 Changed 4 years ago by Schamschula (Marius Schamschula)

Cc: mps@… added

Cc Me!

comment:21 Changed 4 years ago by dbevans (David B. Evans)

Cc: devans@… added

Cc Me!

Changed 4 years ago by ryandesign (Ryan Schmidt)

Attachment: gcc6.diff added

comment:22 Changed 4 years ago by ryandesign (Ryan Schmidt)

Keywords: haspatch added

I was able to reproduce the build failure of libgcc @6.1.0 on Yosemite with Xcode 7.1.1. Based on the homebrew bug report, I tried adding --with-build-config=bootstrap-debug; the build of libgcc succeeded. I'm still building gcc6 to make sure that works. gcc7 will surely need the same fix. I still need to test earlier versions to see if they're affected. --with-build-config was added in gcc 4.5 so we could add the flag all the way back to the gcc45 port. (If I understand correctly, bootstrap-debug was the default build config before that flag was added, so versions earlier than 4.5 should not be affected.)

My patch also changes build.target from bootstrap to bootstrap-lean, which should have no effect other than the build using less disk space.

comment:23 Changed 4 years ago by benoit.bayol@…

Cc: benoit.bayol@… added

Cc Me!

comment:24 Changed 4 years ago by vsoftco@…

This is indeed high priority. I cannot install any gcc now on my Yosemite XCode 7.2.1, same error as listed above.

Last edited 4 years ago by vsoftco@… (previous) (diff)

comment:25 Changed 4 years ago by vsoftco@…

Cc: vsoftco@… added

Cc Me!

comment:26 in reply to:  24 Changed 4 years ago by almage (Roy Miller)

Replying to vsoftco@…:

This is indeed high priority. I cannot install any gcc now on my Yosemite XCode 7.2.1, same error as listed above.

for a way to install gcc-5.3.0_1 now, see comment:18.

Last edited 4 years ago by ryandesign (Ryan Schmidt) (previous) (diff)

comment:27 Changed 4 years ago by petrrr

Cc: petr@… added

Cc Me!

comment:28 Changed 4 years ago by ryandesign (Ryan Schmidt)

Cc: napierdmark@… ncerpagi@… added

Has duplicates #51322, #51323.

comment:29 in reply to:  28 ; Changed 4 years ago by napierdmark@…

Replying to ryandesign@…:

Has duplicates #51322, #51323.

OK, google is not helping. How do I modify my portfile to get gcc5 shown in comment:18? Trying to install gnuradio. Macports manipulation not in my wheelhouse.

Tried a clean build with the setting in comment:22. Didn't seem to make any difference.

Last edited 4 years ago by ryandesign (Ryan Schmidt) (previous) (diff)

comment:30 in reply to:  29 ; Changed 4 years ago by ryandesign (Ryan Schmidt)

Resolution: fixed
Status: newclosed

Replying to napierdmark@…:

How do I modify my portfile to get gcc5 shown in comment:18?

Don't do that; just run sudo port selfupdate to receive the fix I committed in r148391.

If you don't want to have to compile it yourself, wait a few hours and the buildbot should have built a binary package.

comment:31 Changed 4 years ago by ryandesign (Ryan Schmidt)

Wait, you said using the setting in comment:22 did not help, with (referring to your ticket) Xcode 7.2.1 on Yosemite? It fixed the problem on my Yosemite system with Xcode 7.1.1. Let's wait and see what the buildbot does.

comment:32 in reply to:  30 Changed 4 years ago by napierdmark@…

Replying to ryandesign@…:

Replying to napierdmark@…:

How do I modify my portfile to get gcc5 shown in comment:18?

Don't do that; just run sudo port selfupdate to receive the fix I committed in r148391.

If you don't want to have to compile it yourself, wait a few hours and the buildbot should have built a binary package.

Success. Thanks!

--->  Staging libgcc into destroot
--->  Installing libgcc @6.1.0_0
--->  Activating libgcc @6.1.0_0
--->  Cleaning libgcc
--->  Updating database of binaries
--->  Scanning binaries for linking errors               
--->  No broken files found.
Macusers-MacBook-Pro:~ napierm$ 
Last edited 4 years ago by ryandesign (Ryan Schmidt) (previous) (diff)

comment:33 Changed 4 years ago by vsoftco@…

Confirmed that it works now on Xcode 7.2.1 (OS X Yosemite). Thanks!

Note: See TracTickets for help on using tickets.