boxen / our-boxen

Copy me for your team.
https://github.com/boxen/our-boxen/
MIT License
2.58k stars 882 forks source link

Boxen fails to compile gcc (and more) on Yosemite #741

Closed holyjak closed 9 years ago

holyjak commented 9 years ago

I have tried twice to run Boxen on a fresh Yosemite and it failed in both cases (1. with my custom modules; 2. with our-boxen as-is, after erasing HDD & reinstalling) when trying to compile gcc. However that was not the only failure, it also failed to make the fish shell (when I tried with my boxen modification) - so I suspect that it is not gcc-specific but a more general problem. Perhaps Boxen does not work well with the Yosemite Command Line Tools for XCode?

Environment:

PS: I also get the "Error: git 2.3.5 already installed" described in #740

The errors

Notice: Package[boxen/brews/git](provider=homebrew): Updating homebrew formulas
Error: Could not update: Execution of 'brew boxen-upgrade boxen/brews/git' returned 1: Error: git 2.3.5 already installed
Wrapped exception:
Execution of 'brew boxen-upgrade boxen/brews/git' returned 1: Error: git 2.3.5 already installed
Error: /Stage[main]/Git/Package[boxen/brews/git]/ensure: change from 2.3.5 to 2.3.0 failed: Could not update: Execution of 'brew boxen-upgrade boxen/brews/git' returned 1: Error: git 2.3.5 already installed
Notice: /Stage[main]/Boxen::Repo/Exec[clone /opt/boxen/repo]: Dependency Package[boxen/brews/git] has failures: true
Warning: /Stage[main]/Boxen::Repo/Exec[clone /opt/boxen/repo]: Skipping because of failed dependencies
Notice: /Stage[main]/Boxen::Bin/File[/opt/boxen/bin/boxen]: Dependency Package[boxen/brews/git] has failures: true
Warning: /Stage[main]/Boxen::Bin/File[/opt/boxen/bin/boxen]: Skipping because of failed dependencies

Error: Could not update: Execution of 'brew boxen-install boxen/brews/gcc48' returned 1: ==> Installing gcc48 from boxen/homebrew-brews
==> Installing dependencies for gcc48: gmp4, mpfr2, libmpc08, isl011, cloog018
[...]
==> ../configure --build=x86_64-apple-darwin14.3.0 --prefix=/opt/boxen/homebrew/Cellar/gcc48/4.8.3-boxen2 --enable-languages=c,c++,objc,obj-c++ --program-suffix=-4.8 --with-gmp=/opt/boxen/homebrew/opt/gmp4 --with-mpfr=/opt/boxen/homebrew/opt/mpfr2 --with-mpc=/opt/boxen/homebrew/opt/libmpc08 --with-cloog=/opt/boxen/homebrew/opt/cloog018 --with-isl=/opt/boxen/homebrew/opt/isl011 --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --with-pkgversion=Homebrew gcc48 4.8.3-boxen2 --with-bugurl=https://github.com/Homebrew/homebrew-versions/issues --enable-plugin --disable-nls --enable-multilib
==> make bootstrap
make[3]: *** [graphite-blocking.o] Error 1
rm gcc.pod
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [bootstrap] Error 2
mpherg commented 9 years ago

I have the same problem. Clean install of Yosemite 10.10.3, Xcode 6.3 (6D570), pristine our-boxen clone c3a0789fb4e723cf49b02983714a5323f76acff5. See gist of my debug run for details.

The homebrew git error is the same as #740. I also have the problem compiling gcc48 that is probably due to the Command Line Tools 6.3 bug described on stackoverflow.

holyjak commented 9 years ago

Hi mpherg, thanks a lot for the useful links! Have you managed to get boxen working by downgrading command line tools or some other means?

mpherg commented 9 years ago

I installed Command Line Tools 6.2 for OS 10.10 from the Apple Developer Site, but it still doesn't work:

Error: Could not update: Execution of 'brew boxen-install boxen/brews/gcc48' returned 1: ==> Installing gcc48 from boxen/homebrew-brews
==> Downloading http://ftpmirror.gnu.org/gcc/gcc-4.8.3/gcc-4.8.3.tar.bz2
Already downloaded: /opt/boxen/cache/homebrew/gcc48-4.8.3-boxen2.tar.bz2
==> Patching
patching file gcc/config/darwin-c.c
patching file gcc/config/darwin-driver.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-1.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-2.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-3.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-4.c
==> ../configure --build=x86_64-apple-darwin14.3.0 --prefix=/opt/boxen/homebrew/Cellar/gcc48/4.8.3-boxen2 --enable-languages=c,c++,objc,obj-c++ --program-suffix=-4.8 --with-gmp=/opt/boxen/homebrew/opt/gmp4 --with-mpfr=/opt/boxen/homebrew/opt/mpfr2 --with-mpc=/opt/boxen/homebrew/opt/libmpc08 --with-cloog=/opt/boxen/homebrew/opt/cloog018 --with-isl=/opt/boxen/homebrew/opt/isl011 --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --with-pkgversion=Homebrew gcc48 4.8.3-boxen2 --with-bugurl=https://github.com/Homebrew/homebrew-versions/issues --enable-plugin --disable-nls --enable-multilib
==> make bootstrap
gcc/tree-ssa-threadupdate.o differs
gcc/valtrack.o differs
make[2]: *** [compare] Error 1
make[1]: *** [stage3-bubble] Error 2
make: *** [bootstrap] Error 2

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
  https://github.com/boxen/homebrew-brews/issues
Wrapped exception:
Execution of 'brew boxen-install boxen/brews/gcc48' returned 1: ==> Installing gcc48 from boxen/homebrew-brews
==> Downloading http://ftpmirror.gnu.org/gcc/gcc-4.8.3/gcc-4.8.3.tar.bz2
Already downloaded: /opt/boxen/cache/homebrew/gcc48-4.8.3-boxen2.tar.bz2
==> Patching
patching file gcc/config/darwin-c.c
patching file gcc/config/darwin-driver.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-1.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-2.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-3.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-4.c
==> ../configure --build=x86_64-apple-darwin14.3.0 --prefix=/opt/boxen/homebrew/Cellar/gcc48/4.8.3-boxen2 --enable-languages=c,c++,objc,obj-c++ --program-suffix=-4.8 --with-gmp=/opt/boxen/homebrew/opt/gmp4 --with-mpfr=/opt/boxen/homebrew/opt/mpfr2 --with-mpc=/opt/boxen/homebrew/opt/libmpc08 --with-cloog=/opt/boxen/homebrew/opt/cloog018 --with-isl=/opt/boxen/homebrew/opt/isl011 --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --with-pkgversion=Homebrew gcc48 4.8.3-boxen2 --with-bugurl=https://github.com/Homebrew/homebrew-versions/issues --enable-plugin --disable-nls --enable-multilib
==> make bootstrap
gcc/tree-ssa-threadupdate.o differs
gcc/valtrack.o differs
make[2]: *** [compare] Error 1
make[1]: *** [stage3-bubble] Error 2
make: *** [bootstrap] Error 2

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
  https://github.com/boxen/homebrew-brews/issues
Error: /Stage[main]/Gcc/Package[boxen/brews/gcc48]/ensure: change from absent to 4.8.3-boxen2 failed: Could not update: Execution of 'brew boxen-install boxen/brews/gcc48' returned 1: ==> Installing gcc48 from boxen/homebrew-brews
==> Downloading http://ftpmirror.gnu.org/gcc/gcc-4.8.3/gcc-4.8.3.tar.bz2
Already downloaded: /opt/boxen/cache/homebrew/gcc48-4.8.3-boxen2.tar.bz2
==> Patching
patching file gcc/config/darwin-c.c
patching file gcc/config/darwin-driver.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-1.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-2.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-3.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-4.c
==> ../configure --build=x86_64-apple-darwin14.3.0 --prefix=/opt/boxen/homebrew/Cellar/gcc48/4.8.3-boxen2 --enable-languages=c,c++,objc,obj-c++ --program-suffix=-4.8 --with-gmp=/opt/boxen/homebrew/opt/gmp4 --with-mpfr=/opt/boxen/homebrew/opt/mpfr2 --with-mpc=/opt/boxen/homebrew/opt/libmpc08 --with-cloog=/opt/boxen/homebrew/opt/cloog018 --with-isl=/opt/boxen/homebrew/opt/isl011 --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --with-pkgversion=Homebrew gcc48 4.8.3-boxen2 --with-bugurl=https://github.com/Homebrew/homebrew-versions/issues --enable-plugin --disable-nls --enable-multilib
==> make bootstrap
gcc/tree-ssa-threadupdate.o differs
gcc/valtrack.o differs
make[2]: *** [compare] Error 1
make[1]: *** [stage3-bubble] Error 2
make: *** [bootstrap] Error 2

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
  https://github.com/boxen/homebrew-brews/issues

I will start digging further into the C++ issue now.

111t8e commented 9 years ago

I'm experiencing the same - Gist

mpherg commented 9 years ago

OK, here's the magic incantation that worked for me:

  1. Reinstall clean OS 10.10.3.
  2. Install Xcode 6.2 from developer.apple.com. RESIST THE URGE TO INSTALL XCODE FROM THE APP STORE!! IT BROKE THE C++ STANDARD LIBRARY.
  3. Clone and run boxen as normal. When you see the error about Git 2.3.5 as described in #740, stop boxen, run brew remove git, and re-run boxen.
  4. Enjoy your new box.
jhenahan commented 9 years ago

I think the git issue in #740 is due to boxen/puppet-git now specifying 2.3.5 in the Hiera defaults. Setting an appropriate default in our-boxen should resolve that part, at least.

mpherg commented 9 years ago

That makes sense. I put git::version: '2.3.5' in my hiera and verified that this appears to solve #740.

BillWeiss commented 9 years ago

I'm just trying boxen for the first time, on a fresh 10.10 install. Is there any way to fix this (or things people would try) other than burn it down and start over? I figured out the git problem (I use Puppet daily, just not on my Mac) but am stymied by gcc.

mpherg commented 9 years ago

You should be able to just download Xcode 6.2 from developer.apple.com and install it over top of 6.3 (or 6.3.1, which I sincerely had hoped would fix this problem since the release notes seemed to indicate that the __debug header had been fixed, but alas, it is still broken). Make sure you run Xcode at least once to ensure that the command line utilities are installed and configured, then rerun boxen. No need to burn down and reinstall from scratch.

-Michael

Sent from my iPhone

On Apr 24, 2015, at 7:13 AM, Bill Weiss notifications@github.com wrote:

I'm just trying boxen for the first time, on a fresh 10.10 install. Is there any way to fix this (or things people would try) other than burn it down and start over? I figured out the git problem (I use Puppet daily, just not on my Mac) but am stymied by gcc.

— Reply to this email directly or view it on GitHub.

BillWeiss commented 9 years ago

Ok. I'll give it a shot... Thanks for the quick response!

BillWeiss commented 9 years ago

That worked. Thanks!

seanknox commented 9 years ago

@BillWeiss @mpherg @jakubholynet I've updated puppet-git and puppet-gcc with fixes for each, respectively. Try using the latest release of both.

BillWeiss commented 9 years ago

Would the way to test that be to bump the versions in my Puppetfile, remove my version lock for git, upgrade XCode to latest, and see if brew still runs?

seanknox commented 9 years ago
  1. Edit your Puppetfile so gcc and git modules are the latest releases (see the puppet-gcc and puppet-git repos to the get the release version)
  2. Remove any git version pinning in hiera
  3. Ensure your Xcode or Command Line Tools are the latest versions
  4. Run boxen On Fri, Apr 24, 2015 at 8:09 PM Bill Weiss notifications@github.com wrote:

Would the way to test that be to bump the versions in my Puppetfile, remove my version lock for git, upgrade XCode to latest, and see if brew still runs?

— Reply to this email directly or view it on GitHub https://github.com/boxen/our-boxen/issues/741#issuecomment-96115342.

BillWeiss commented 9 years ago

It worked! Updated to the latest of both modules and installed xcode 6.3.1, success. Thanks for the speedy fix!

jbcpollak commented 9 years ago

Hi,

I'm having this same problem. I have Xcode 6.3.1 installed on a brand new Mac, and I upgraded my Puppetfile like this:

github "gcc",         "2.2.1"
github "git",         "2.7.8"

And I still get this error message:

Error: Could not update: Execution of 'brew boxen-install boxen/brews/gcc48' returned 1: ==> Installing gcc48 from boxen/homebrew-brews
==> Downloading http://ftpmirror.gnu.org/gcc/gcc-4.8.3/gcc-4.8.3.tar.bz2
Already downloaded: /opt/boxen/cache/homebrew/gcc48-4.8.3-boxen2.tar.bz2
==> Patching
patching file gcc/config/darwin-c.c
patching file gcc/config/darwin-driver.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-1.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-2.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-3.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-4.c
==> ../configure --build=x86_64-apple-darwin14.3.0 --prefix=/opt/boxen/homebrew/Cellar/gcc48/4.8.3-boxen2 --enable-languages=c,c++,objc,obj-c++ --program-suffix=-4.8 --with-gmp=/opt/boxen/homebrew/opt/gmp4 --with-mpfr=/opt/boxen/homebrew/opt/mpfr2 --with-mpc=/opt/boxen/homebrew/opt/libmpc08 --with-cloog=/opt/boxen/homebrew/opt/cloog018 --with-isl=/opt/boxen/homebrew/opt/isl011 --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --with-pkgversion=Homebrew gcc48 4.8.3-boxen2 --with-bugurl=https://github.com/Homebrew/homebrew-versions/issues --enable-plugin --disable-nls --enable-multilib
==> make bootstrap
gcc/tree-ssa-threadupdate.o differs
gcc/valtrack.o differs
make[2]: *** [compare] Error 1
make[1]: *** [stage3-bubble] Error 2
make: *** [bootstrap] Error 2

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
  https://github.com/boxen/homebrew-brews/issues
Wrapped exception:
Execution of 'brew boxen-install boxen/brews/gcc48' returned 1: ==> Installing gcc48 from boxen/homebrew-brews
==> Downloading http://ftpmirror.gnu.org/gcc/gcc-4.8.3/gcc-4.8.3.tar.bz2
Already downloaded: /opt/boxen/cache/homebrew/gcc48-4.8.3-boxen2.tar.bz2
==> Patching
patching file gcc/config/darwin-c.c
patching file gcc/config/darwin-driver.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-1.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-2.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-3.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-4.c
==> ../configure --build=x86_64-apple-darwin14.3.0 --prefix=/opt/boxen/homebrew/Cellar/gcc48/4.8.3-boxen2 --enable-languages=c,c++,objc,obj-c++ --program-suffix=-4.8 --with-gmp=/opt/boxen/homebrew/opt/gmp4 --with-mpfr=/opt/boxen/homebrew/opt/mpfr2 --with-mpc=/opt/boxen/homebrew/opt/libmpc08 --with-cloog=/opt/boxen/homebrew/opt/cloog018 --with-isl=/opt/boxen/homebrew/opt/isl011 --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --with-pkgversion=Homebrew gcc48 4.8.3-boxen2 --with-bugurl=https://github.com/Homebrew/homebrew-versions/issues --enable-plugin --disable-nls --enable-multilib
==> make bootstrap
gcc/tree-ssa-threadupdate.o differs
gcc/valtrack.o differs
make[2]: *** [compare] Error 1
make[1]: *** [stage3-bubble] Error 2
make: *** [bootstrap] Error 2

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
  https://github.com/boxen/homebrew-brews/issues
Error: /Stage[main]/Gcc/Package[boxen/brews/gcc48]/ensure: change from absent to 4.8.3-boxen2 failed: Could not update: Execution of 'brew boxen-install boxen/brews/gcc48' returned 1: ==> Installing gcc48 from boxen/homebrew-brews
==> Downloading http://ftpmirror.gnu.org/gcc/gcc-4.8.3/gcc-4.8.3.tar.bz2
Already downloaded: /opt/boxen/cache/homebrew/gcc48-4.8.3-boxen2.tar.bz2
==> Patching
patching file gcc/config/darwin-c.c
patching file gcc/config/darwin-driver.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-1.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-2.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-3.c
patching file gcc/testsuite/gcc.dg/darwin-minversion-4.c
==> ../configure --build=x86_64-apple-darwin14.3.0 --prefix=/opt/boxen/homebrew/Cellar/gcc48/4.8.3-boxen2 --enable-languages=c,c++,objc,obj-c++ --program-suffix=-4.8 --with-gmp=/opt/boxen/homebrew/opt/gmp4 --with-mpfr=/opt/boxen/homebrew/opt/mpfr2 --with-mpc=/opt/boxen/homebrew/opt/libmpc08 --with-cloog=/opt/boxen/homebrew/opt/cloog018 --with-isl=/opt/boxen/homebrew/opt/isl011 --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --with-pkgversion=Homebrew gcc48 4.8.3-boxen2 --with-bugurl=https://github.com/Homebrew/homebrew-versions/issues --enable-plugin --disable-nls --enable-multilib
==> make bootstrap
gcc/tree-ssa-threadupdate.o differs
gcc/valtrack.o differs
make[2]: *** [compare] Error 1
make[1]: *** [stage3-bubble] Error 2
make: *** [bootstrap] Error 2

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
  https://github.com/boxen/homebrew-brews/issues
seanknox commented 9 years ago

@jbcpollak

  1. Edit your Puppetfile so gcc and git modules are the latest releases (see the puppet-gcc and puppet-git repos to the get the latest release version)
  2. Remove any git/gcc version pinning in hiera
  3. Ensure your Xcode or Command Line Tools are the latest versions
  4. cd /opt/boxen/repo && rm -rf .tmp .librarian
  5. Run boxen
jbcpollak commented 9 years ago

Hum, it was probably step 4 that was missing, I had tried everything else. Should that step be part of a standard upgrade process, or whenever we modify Puppetfile?

seanknox commented 9 years ago

You generally don't need to, unless you're modifying modules, jumping between module versions, or something else uncommon.

jbcpollak commented 9 years ago

So if you changed the version of a module referenced from Puppetfile would you need to? On May 3, 2015 6:39 PM, "Sean Knox" notifications@github.com wrote:

You generally don't need to, unless you're modifying modules, jumping between module versions, or something else uncommon.

— Reply to this email directly or view it on GitHub https://github.com/boxen/our-boxen/issues/741#issuecomment-98552531.

andreorvalho commented 9 years ago

Hi,

I am getting the same issue on a new clean installation. I have followed all the steps above. My Xcode is version Version 6.3.2 (6D2105), which seems to be new. My command line tools version is: 6.3.2.0.1.1431401888, running the command given above. I have upgraded boxen as per instructions here: https://github.com/boxen/our-boxen/blob/master/docs/faq.md#q-how-do-you-upgrade-your-boxen-from-the-public-our-boxen

My puppet-gcc are the latest versions. But I get all the same errors from above. you can see it on this gist: https://gist.github.com/andreorvalho/8101bc589e5cca27a929

there are more errors but this is mainly it. Do you think this is the same issue or related?

all the best,

Andre

seanknox commented 9 years ago

@andreorvalho Hard to say from that limited output. Please open a new issue with the full output.