2012-03-23 3 views
2

Lion 10.7.3 및 XCode 4.3.1이 설치된 MacBook에 QT를 설치하는 데 문제가 있습니다. BREW로 설치하려고했는데 컴파일러 오류가 발생했습니다. 아래는 오류의 끝과 "양조 의사"출력입니다. 그것은 gcc의 잘못된 버전을 사용하는 것 같습니다 ... 비록 방금 최신 XCode를 설치했습니다. 어떤 아이디어? QT를 설치하려고하는데 capybara-webkit으로 헤드리스 브라우저 테스트를 실행할 수 있습니다. (I는 --install로부터 - 소스 시도와 같은 오류를 얻었다.)XCode 4.3이 설치된 10.7.3에 QT를 어떻게 설치할 수 있습니까?

gstroup$ brew install qt

....

kernel/qcocoaview_mac.mm:1386:61: error: cannot initialize a parameter of type 'NSString *' with an lvalue of type 'const NSString *' return [[[NSAttributedString alloc] initWithString:tmpString] autorelease]; ^~~~~~~~~ /System/Library/Frameworks/Foundation.framework/Headers/NSAttributedString.h:28:34: note: passing argument to parameter 'str' here - (id)initWithString:(NSString )str; ^ 2 errors generated. make[2]: [.obj/release-shared/qcocoaview_mac.o] Error 1 make[1]: [release] Error 2 make: ** [sub-gui-make_default-ordered] Error 2 ==> Exit Status: 2 http://github.com/mxcl/homebrew/blob/master/Library/Formula/qt.rb#L76 ==> Environment /usr/bin/gcc HOMEBREW_VERSION: 0.8 HEAD: 64e489663add868db679cca2186ff8d7796e5d9e HOMEBREW_PREFIX: /usr/local HOMEBREW_CELLAR: /usr/local/Cellar HOMEBREW_REPOSITORY: /usr/local HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew Hardware: 8-core 64-bit dunno OS X: 10.7.3 Kernel Architecture: x86_64 Ruby: 1.8.7-249 /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby Xcode: 4.3.1 GCC-4.0: N/A GCC-4.2: build 401 (5664 or newer recommended) LLVM: build 2336 MacPorts or Fink? false X11 installed? true ==> Build Flags CC: /usr/bin/cc => /usr/bin/clang CXX: /usr/bin/c++ => /usr/bin/clang LD: /usr/bin/cc => /usr/bin/clang CFLAGS: -O3 -w -pipe CXXFLAGS: -O3 -w -pipe -fvisibility=hidden MAKEFLAGS: -j8

Error: Failed executing: make Please report this bug: https://github.com/mxcl/homebrew/wiki/new-issue

Also try: brew doctor to check your setup for common problems. brew missing to check installed packages for missing deps.

gstroup$ brew doctor

/usr/bin/gcc Your gcc 4.2.x version is older than the recommended version. It may be advisable to upgrade to the latest release of Xcode.

We couldn't detect gcc 4.0.x. Some formulae require this compiler.

/usr/bin is in your PATH before Homebrew's bin. This means that system- provided programs will be used before Homebrew-provided ones. This is an issue if you install, for instance, Python.

Consider editing your .bashrc to put: /usr/local/bin ahead of /usr/bin in your $PATH.

Some brews install binaries to sbin instead of bin, but Homebrew's sbin was not found in your path.

Consider editing your .bashrc to add: /usr/local/sbin to $PATH.

/usr/bin/gcc

gstroup$ gcc --version

i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

답변

0

엑스 코드 4.3.x에서 컴파일러로 GCC 멀리 전환. 이제 Apple은 llvm을 사용합니다. 아마도이 문제의 근본 원인 일 수 있습니다. gcc 컴파일러를 다운로드 할 수있는 Github 프로젝트 https://github.com/kennethreitz/osx-gcc-installer/downloads이 있습니다.

gcc 컴파일러를 지정하려면 brew 명령의 접두어를 env CC=/usr/bin/gcc으로해야 할 수도 있습니다.

관련 문제