Skip to content
This repository has been archived by the owner. It is now read-only.

Homebrew GCC won't install on OS X 10.10 Yosemite with Xcode 6 #29845

Closed
kassafari opened this issue Jun 4, 2014 · 31 comments
Closed

Homebrew GCC won't install on OS X 10.10 Yosemite with Xcode 6 #29845

kassafari opened this issue Jun 4, 2014 · 31 comments

Comments

@kassafari
Copy link

@kassafari kassafari commented Jun 4, 2014

==> ../configure --build=x86_64-apple-darwin14.0.0 --prefix=/usr/local/Cellar/gc
==> make bootstrap
make[4]: *** [multi-do] Error 1
make[3]: *** [all-multi] Error 2
make[2]: *** [all-stage1-target-libgcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [bootstrap] Error 2
Error: Homebrew doesn't know what compiler versions ship with your version
of Xcode (6.0). Please brew update and if that doesn't help, file
an issue with the output of brew --config:
https://github.com/Homebrew/homebrew/issues

Note that we only track stable, released versions of Xcode.

Thanks!

READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting

These open issues may also help:
gcc: make keg-only. (#29812)
gcc 4.8.3 bottle has invalid omp.h header (#29670)
Add brew-doctor check for osx-gcc-installer (#29593)
MacOS.(gcc|clang|llvm)_version can return nil (#18781)


HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: 1b35e9c
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit ivybridge
OS X: 10.10-x86_64
Xcode: 6.0 => /Applications/Xcode6-Beta.app/Contents/Developer
Clang: 6.0 build 600
X11: 2.7.6 => /opt/X11
System Ruby: 2.0.0-451
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby

@adamv
Copy link
Contributor

@adamv adamv commented Jun 4, 2014

We don't currently support either 10.10 or Xcode 6, but also note:

READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting

We would need the verbose build failure output in a gist to even diagnose this.

@kassafari
Copy link
Author

@kassafari kassafari commented Jun 4, 2014

Alright, I'm new to all this, I want to try to contribute however I can, Thanks for the info [:

@kassafari
Copy link
Author

@kassafari kassafari commented Jun 4, 2014

@jacknagel
Copy link
Contributor

@jacknagel jacknagel commented Jun 4, 2014

I see several errors and they all appear to be just plain incompatibilities with 10.10 / Xcode 6. As is usually the case, many things are broken.

I know this isn't helpful, but we don't have the resources to debug and fix problems that happen on pre-release software that most of us don't have access to. You'll have better luck reporting compilation problems to the upstream project so they can work on compatibility. Sorry :/

@jacknagel jacknagel closed this Jun 4, 2014
@kassafari
Copy link
Author

@kassafari kassafari commented Jun 4, 2014

Just fyi, I've had a lot of success with this setup so far, over 100 packages without a hitch, GCC is the only package that gave me any trouble, so should be smooth sailing when you guys start to support Yosemite + Xcode 6 [:

@kassafari
Copy link
Author

@kassafari kassafari commented Jun 4, 2014

k, thx Jack... submitted to them and they responded quickly
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61407
also submitted to apple as they requested, seems to be an issue with the new XCode's c99/c++98 preprocessor implementation

@kassafari
Copy link
Author

@kassafari kassafari commented Jun 5, 2014

@rockymadden Yeah I noticed with other packages as well like gdb, the gnu guys are workin on a workaround but apple hasn't responded yet and unfortunately their bug reporting system isn't publicly available 👎

@rockymadden
Copy link

@rockymadden rockymadden commented Jun 5, 2014

@kassafari Thanks for the information. Having never submitted a bug to Apple, I looked it up and saw that there is no transparency. I then deleted my comment realizing it was a silly question ;)

Thanks for submitting those issues upstream!

@kassafari
Copy link
Author

@kassafari kassafari commented Jun 5, 2014

No problem, I'll post any further details here if I get any response.

@seantomburke
Copy link

@seantomburke seantomburke commented Jun 7, 2014

I just want to thank you for this thread, I just spent hours trying to figure this out, but I guess the only resolution is to wait.

@ohoachuck
Copy link

@ohoachuck ohoachuck commented Jun 13, 2014

Hello guys ... No news or workaround ?

O.

@mistydemeo
Copy link
Member

@mistydemeo mistydemeo commented Jun 13, 2014

No, not yet. For news on that, please consult the GCC issue above; there's not anything we can do.

@DomT4
Copy link
Member

@DomT4 DomT4 commented Jun 13, 2014

The gcc error is what caused all of the packages in my list here to fail the other day as well, although python3, gdk-pixbuf & gtk+ now work. (Puzzlingly).

If folks need any bug reports submitted to Apple feel free to drop me a line and I'll do so & kick up a notice in the dev forums. (Not that Apple's dev forums are terribly active).

@kaivanes
Copy link

@kaivanes kaivanes commented Jun 17, 2014

@ohoachuck @mistydemeo There seems to be a patch now on the GCC bug tracker. I have not tried it yet, but it may be of use to people on 10.10 who need GCC now.

@nikolay
Copy link
Contributor

@nikolay nikolay commented Jun 21, 2014

I did have GCC installed previously, so, because everything wants to update it, I've pinned it, so, when I'm trying to upgrade other packages, they says gcc is pinned and won't be upgraded, but those other packages are trying to upgrade it (like cabal-install). Why those don't honor the pinning I have in place?!

@AlJohri
Copy link

@AlJohri AlJohri commented Jun 23, 2014

I tried copying and pasting the patch to the end of brew edit gcc and it didn't seem to work. Not sure if I'm doing that quite right.

@rockymadden
Copy link

@rockymadden rockymadden commented Jun 29, 2014

@AlJohri The patch seems to have been made against the trunk at the time of patch submission and not the 4.8.3 release that homebrew uses. Attempting to do so will net all sorts of fun failures:

bash-3.2$ patch -p1 --dry-run < test.patch
patching file fixincludes/fixincl.x
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 15.
Hunk #3 succeeded at 9260 with fuzz 1 (offset 78 lines).
Hunk #4 FAILED at 9305.
Hunk #5 FAILED at 9534.
Hunk #6 FAILED at 10657.
5 out of 6 hunks FAILED -- saving rejects to file fixincludes/fixincl.x.rej
patching file fixincludes/inclhack.def
Hunk #1 FAILED at 4751.
1 out of 1 hunk FAILED -- saving rejects to file fixincludes/inclhack.def.rej
patching file gcc/config/darwin-c.c
patching file gcc/config/darwin-driver.c
patching file libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
Hunk #1 FAILED at 940.
1 out of 1 hunk FAILED -- saving rejects to file libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc.rej
patching file libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
Hunk #1 FAILED at 392.
1 out of 1 hunk FAILED -- saving rejects to file libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h.rej
bash-3.2$ patch -p1 --dry-run < test.patch
patching file fixincludes/fixincl.x
Hunk #1 FAILED at 1.
1 out of 6 hunks FAILED -- saving rejects to file fixincludes/fixincl.x.rej
patching file fixincludes/inclhack.def
Hunk #1 FAILED at 4751.
1 out of 1 hunk FAILED -- saving rejects to file fixincludes/inclhack.def.rej
patching file gcc/config/darwin-c.c
patching file gcc/config/darwin-driver.c
patching file libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
Hunk #1 FAILED at 940.
1 out of 1 hunk FAILED -- saving rejects to file libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc.rej
patching file libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
Hunk #1 FAILED at 392.
1 out of 1 hunk FAILED -- saving rejects to file libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h.rej

Checking out the trunk at the time of the patch, and assuming circumventing homebrew entirely is peachy for you, the patch does work:

bash-3.2$ patch -p1 --dry-run < test.patch
patching file fixincludes/fixincl.x
patching file fixincludes/inclhack.def
patching file gcc/config/darwin-c.c
patching file gcc/config/darwin-driver.c
patching file libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
patching file libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
@tobinjones
Copy link

@tobinjones tobinjones commented Jul 25, 2014

Just sharing that GCC built successfully on 10.10 DP4 for me, using the patch by James Clarke titled "Patch For GCC 4.9.1 On Yosemite". It was submitted to the upstream bug on 2014-07-2.

I applied it using brew edit gcc, adding:

  patch do
    url "https://gcc.gnu.org/bugzilla/attachment.cgi?id=33180"
    sha1 "def0cb036a255175db86f106e2bb9dd66d19b702"
  end

and then a brew install gcc worked for me.

@DomT4
Copy link
Member

@DomT4 DomT4 commented Jul 25, 2014

Yup. I'm privately keeping track of patched formulas that work on 10.10 over here. For various reasons, all of which are perfectly reasonable, Homebrew doesn't want to merge in patches that really belong upstream whilst Yosemite is in beta. If the problem sustains after Yosemite goes public I suspect patches will be accepted then, but until then patching one's own installation is the way to go.

@MikeMcQuaid
Copy link
Member

@MikeMcQuaid MikeMcQuaid commented Jul 25, 2014

@DomT4 Yup. Even then the quickest method to get patches painlessly in Homebrew is to get them accepted upstream first 👍

@rockymadden
Copy link

@rockymadden rockymadden commented Jul 25, 2014

@tobinjones Really appreciate the share!

@tommyp
Copy link

@tommyp tommyp commented Jul 30, 2014

I tried @tobinjones' suggestion and it just seems to hang for me for at least 2 hours. Not sure where to go from here with it.

@DomT4
Copy link
Member

@DomT4 DomT4 commented Jul 30, 2014

Have you tried this one? If you're having trouble with it hanging, invoke -v --debug -d during install & that should let you know where it specifically hangs.

@tommyp
Copy link

@tommyp tommyp commented Jul 31, 2014

@DomT4 Worked perfectly. Thanks for that! Finally built after nearly 3 hours. Now onto the next thing that won't install...

@bglnelissen
Copy link

@bglnelissen bglnelissen commented Aug 5, 2014

As @tobinjones suggested, edit the file in vim:

brew gcc edit

then add the patch in the formula like this:

    require "formula"

    class Gcc < Formula
        def arch
            if Hardware::CPU.type == :intel
                if MacOS.prefer_64_bit?
                    "x86_64"
                else
                    "i686"
                end
            elsif Hardware::CPU.type == :ppc
                if MacOS.prefer_64_bit?
                    "powerpc64"
                else
                    "powerpc"
                end
            end
        end

        def osmajor
            `uname -r`.chomp
        end

        # edit by b.nelissen 20140805
        # tobinjones patch gcc https://github.com/Homebrew/homebrew/issues/29845
       patch do
            url "https://gcc.gnu.org/bugzilla/attachment.cgi?id=33180"
            sha1 "def0cb036a255175db86f106e2bb9dd66d19b702"
       end

... continue with the rest of the file

I never edit a install file before, and learned that you need to patch within the 'Formula'.

@joshuaswilcox
Copy link

@joshuaswilcox joshuaswilcox commented Aug 31, 2014

I get the following after trying the patch

curl: (51) SSL: certificate verification failed (result: 5)
Error: Failed to download resource "gcc--patch"
Download failed: https://gcc.gnu.org/bugzilla/attachment.cgi?id=33180
@fernandoaleman
Copy link

@fernandoaleman fernandoaleman commented Sep 8, 2014

I get the following error after trying the patch above:

==> Patching
patching file gcc/config/darwin-c.c
patching file gcc/config/darwin-driver.c
patching file libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
patching file libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
patching file gcc/config/darwin-c.c
Hunk #1 FAILED at 572.
1 out of 1 hunk FAILED -- saving rejects to file gcc/config/darwin-c.c.rej
patching file gcc/config/darwin-driver.c
Hunk #1 FAILED at 57.
1 out of 1 hunk FAILED -- saving rejects to file gcc/config/darwin-driver.c.rej
patching file libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
Hunk #1 FAILED at 835.
1 out of 1 hunk FAILED -- saving rejects to file libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc.rej
patching file libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
Hunk #1 FAILED at 275.
1 out of 1 hunk FAILED -- saving rejects to file libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h.rej
Error: Failure while executing: /usr/bin/patch -g 0 -f -d /private/tmp/gcc-usnTKy/gcc-4.9.1 -p1 -i /private/tmp/gcc--patch-HX5hRe/attachment.cgi
@mhumeSF
Copy link

@mhumeSF mhumeSF commented Sep 9, 2014

@fernandoaleman Had they same issue. I uninstalled homebrew and reinstalled.

rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew install gcc 

Grab a coffee, 'cause it takes like 45mins to compile

@baldrailers
Copy link
Contributor

@baldrailers baldrailers commented Sep 10, 2014

@mhumeSF does this work with the latest Yosemite 10.10 with Xcode Beta 6.1?

@larryv
Copy link

@larryv larryv commented Sep 11, 2014

@baldrailers Yes, I just did a successful build.

@fernandoaleman
Copy link

@fernandoaleman fernandoaleman commented Sep 11, 2014

@mhumeSF Thanks. I was able to install gcc without any issues now.

@Homebrew Homebrew locked and limited conversation to collaborators Sep 11, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet