2015-01-27 2 views
0

저는 therubyracer 보석을 Mavericks 10.9에 설치하려고 시도하고 있습니다. 어떤 도움도 이 대단히이 될 것입니다.Mavericks에 libv8과 therabyracer를 설치하십시오

나는 어떤 문제

  1. 를 해결 가지고이 주제에 대한 다른 질문의 호스트,하지만 (이 시점에서 포함하여 다양한 조합과 희망을 재 시행 소비 한 2 + 일) 다음의 말 그대로 아무도가 있음을 이해 libv8 제거 및 0123의 다양한 버전을
  2. 대신 brew install libv8를 사용하여 설치 apple-gcc 또는 유사한
  3. 설치 therubyracer
  4. 설치

    > gem install therubyracer 
    Building native extensions. This could take a while... 
    ERROR: Error installing therubyracer: 
        ERROR: Failed to build gem native extension. 
    
        /Users/aqua/.rvm/rubies/ruby-1.9.3-p545/bin/ruby -r ./siteconf20150127-54061-10i2fna.rb extconf.rb 
    checking for main() in -lpthread... yes 
    checking for main() in -lobjc... yes 
    creating Makefile 
    
    make clean 
    
    make 
    compiling accessor.cc 
    g++-4.6: error: unrecognized option '-rdynamic' 
    make: *** [accessor.o] Error 1 
    
    make failed, exit code 2 
    
    Gem files will remain installed in /Users/aqua/.rvm/gems/ruby-1.9.3-p545/gems/therubyracer-0.12.1 for inspection. 
    Results logged to /Users/aqua/.rvm/gems/ruby-1.9.3-p545/extensions/x86_64-darwin-13/1.9.1/therubyracer-0.12.1/gem_make.out 
    

    것이 많이있을 것 같지 않습니다 rvm 및 재설치및 Developer Tools

  5. ruby 1.9.3

를 재 - 구축 I 달성 할 수있었습니다 최신이 오류 메시지를 얻는 것입니다 g++-4.6: error: unrecognized option '-rdynamic' 주위의 정보. 내 첫 번째 추측은 아마도 gcc46이이 플래그를 지원하지 않는다는 것입니다.

brew tap homebrew/dupes 
brew install apple-gcc42 

을 그리고 새로운 apple-gcc42 설치를 가리 키도록 적절한 enviornment 컨텍스트 변수를 다시 실행 : 다른 포스트 제안을 바탕으로

나는 apple-gcc42 설치를 시도

> $ CC=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 CPP=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/cpp-4.2 CXX=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/g++-4.2 gem install therubyracer 

아직 행운 이상하게도 여전히 gcc46에 대한 동일한 오류가 발생하여 픽업되지 않는 것이 발생합니다. apple-gcc42

는 난 아직도 당신이 사용하는 gem install을 강제로 어떻게 g++-4.6: error: unrecognized option '-rdynamic'

그래서 .. 를 던지고, 물론 운이 올바른 (물론 원본을 백업) 버전

cd /usr/bin 

mv gcc gcc_backup 
mv g++ g++_backup 
mv cpp cpp_backup 

sudo ln -s /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 /usr/bin/gcc 
sudo ln -s /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/g++-4.2 /usr/bin/g++ 
sudo ln -s /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/cpp-4.2 /usr/bin/cpp 

을 심볼릭 링크없는 시도 특정 컴파일러 버전? 그것은 올바른 접근법일까요?

도움 주셔서 감사합니다.

답변

0

나는 또한 동일한 문제에 직면했다. 위에서 설명한 것과 동일한 단계를 수행했습니다. 다음은 theraracer를 설치하기 위해 추가로 수출 한 것입니다.

export CC=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 
export CXX=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/g++-4.2 
export CPP=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/cpp-4.2 

내가 libv8 보석

마지막으로

gem install therubyracer -v='0.12.2' 

내가 루비 2.2.2를 사용하고 therubyracer 설치

gem uninstall libv8 

을 제거, 양조가

다음 libv8 설치하지 않았다, 이것이 도움이되기를 바랍니다.

관련 문제