MacOSX Lionã§ã®Rubyã®æ±ãæ¹ãã¾ãã¯llvm-gccã«ã¤ãã¦ã
ã¯ãã¾ãã¯gem install sqlite3-rubyãä¸æããããªãã£ããã¨ã
gemãæªãã®ãsqlite3ãæªãã®ãã¨èª¿ã¹ã¦ãã£ãããæçµçãªåå ã¯Lionï¼Xcodeï¼ã®gccã ã£ãã
â»ä»¥éãLionã®Xcodeãå
¥ãããã¨ã§ã¤ã³ã¹ãã¼ã«ãããgccãllvm-gccã¨è¨è¼ããã
ç°å¢
ä»åã®ä½æ¥éå§æã®ç°å¢ã¯ä»¥ä¸ã®éãã
è¿·èµ°ã®è¨é²
åå¿ã¨ãã¦ãç°¡åãªã¾ã¨ãã
- gem install sqlite3-rubyã§ã¨ã©ã¼ã
- sqlite3ãyumãMacportsã§ãããã¨è¨ãããããport install sqlite3 +universalã§ã¨ã©ã¼ã
- portã®ããã«Xcodeãæ´æ°ãããï¼æ°æéãããï¼
- port install sqlite3 +universalã¯æåã
- ããã§ãgem install sqlite3-rubyã§ã¨ã©ã¼ã
- ä½ãæªãã®ããããããå®é¨ã¨ãã¦rvmã®1.9.2ã§è©¦ãã¨ãããªãå ¥ããããã¯ããã§å°ãã
- rvmã§1.8.7ãå ¥ãããsqlite3-rubyãå ¥ãããããªããã¨éããï¼systemã®Rubyã¯ãã諦ããããï¼
- rvm install 1.8.7ã¯æåããããgemã³ãã³ãã§å³ã®ãããªã¨ã©ã¼ãï¼ç¥ï¼/ruby/1.8/timeout.rb:60: [BUG] Segmentation fault
- æ¤ç´¢ããã¨llvm-gccã ã¨ä¸è¨ã®ã¨ã©ã¼ã¨ãªããããã®ã§gccãå ¥ããã
- rvm install 1.8.7ãããç´ããsqlite3-rubyãå ¥ããã¨æåã
- ãããï¼ã¨æãsystemã®Rubyï¼1.8.7ï¼ã§sqlite3-rubyãå ¥ããã¨æåã
è¦ããã«ãå
¨é¨llvm-gccãæªãï¼
ï¼éã«èããã¨Ruby1.8ç³»ãæªãï¼å¤ãï¼ãã¨ãããã¨ã«ããªãããï¼
ãªããrvmã«ã¤ãã¦ã¯ãã¡ãã
Rubyの複数バージョンを共存させるgem。rvmとpikについて - holyppの日記
sqlite3-rubyã§ä½åº¦ãåºãã¨ã©ã¼ã¯ãã¡ãã
iMac% sudo gem install sqlite3-ruby Password: Building native extensions. This could take a while... ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension. /opt/local/bin/ruby extconf.rb checking for sqlite3.h... no sqlite3.h is missing. Try 'port install sqlite3 +universal' or 'yum install sqlite-devel' and check your shared library search path (the location where your sqlite3 shared library is located). *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/opt/local/bin/ruby --with-sqlite3-dir --without-sqlite3-dir --with-sqlite3-include --without-sqlite3-include=${sqlite3-dir}/include --with-sqlite3-lib --without-sqlite3-lib=${sqlite3-dir}/lib --enable-local --disable-local Gem files will remain installed in /opt/local/lib/ruby/gems/1.8/gems/sqlite3-1.3.5 for inspection. Results logged to /opt/local/lib/ruby/gems/1.8/gems/sqlite3-1.3.5/ext/sqlite3/gem_make.out
Xcodeã®æ´æ°
ï¼2012/7/23追è¨ï¼ãã®é ã¯è¡ããã次é ã®ãgccã®ã¤ã³ã¹ãã¼ã«ãã®ã¿è¡ã£ã¦ãåä½ããã¨æãã¾ããæ¥ãã§xcodeãä¸è¦ã®æ¹ã¯é£ã°ãã¦ä¸ããã
ä¸è¨ã®ã¨ãããgemã ããããªãMacportsãã¨ã©ã¼ãåºãããã©ãããããå°ã£ã¦ããã
調ã¹ã¦ããã¨ãLionã«ãããXcodeã¯å
¥ããªãããã¨åæã«æ¸ãã¦ããã®ã§å
¥ãç´ãã
AppStoreããç¡æã§ã¤ã³ã¹ãã¼ã«ã§ãããæéããããã3Gã»ã©ããã1æéã©ãããããªãã®ã§ãã°ããæ¾ç½®ããã
Mac App Store - Xcode
â»âãªã³ã¯ããã¾ããããªããã°ãxcode app storeããªã©ã§æ¤ç´¢ãã¦ä¸ããã
Xcodeãå
¥ãç´ãçç±ã¯ãLionã«ããã¨gccãmakeãæ¶ããããã¨ãããã¨ãããã¯ã²ã©ãã
Macportsãã¨ã©ã¼ãåºãã¦ãã®ãXcodeãå
¥ãç´ããã¨ã§è§£æ¶ãããsqlite3ãã¤ã³ã¹ãã¼ã«ã§ããã
ï¼sudo port clean libeditããã¨ã¯è¨ããããã©ãï¼
ããã¦ãRuby1.8ç³»ãªã©ãé¤ãã°ããã§åååããã ãããã©ãå®ã¯ããã§å ¥ã£ãllvm-gccã諸æªã®æ ¹æºã ã£ãã
iMac% gcc --version i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.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.
gccã®ã¤ã³ã¹ãã¼ã«
port install sqlite3 +universalããæåããããgem install sqlite3-rubyãã®ã¨ã©ã¼ã¡ãã»ã¼ã¸ã¯å¤ãããã
systemã®Rubyãæ¶ãã®ãã¯ã°ããããããrvmã§1.8.7ãå
¥ãã¦ã¡ã¤ã³ã«ãããã¨èããã
çµå±ããã¯llvm-gccã®ããã§å¤±æããã®ã ãã
ãã°ãåã£ã¦ãªãã£ãã®ã§llvm-gccã使ã£ã¦åç¾ãããã¨ããããä»ã§ã¯ãã£ããæãã¦ããã¦åç¾ããã§ããªãã£ãã
iMac% rvm install 1.8.7-head The provided CC(/usr/bin/gcc) is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.
å½åã¯ãrvm install 1.8.7-headãã¯æåããããã«è¦ããgem install sqlite3-rubyãã§ã[BUG] Segmentation faultãã¨ããã¨ã©ã¼ãåºã¦ããã
ããããæ¤ç´¢ããã¨llvm-gccãæªãã¨ããæ
å ±ãåºã¦ããã®ã§ãgccããã¡ãããã¤ã³ã¹ãã¼ã«ã
kennethreitz/osx-gcc-installer · GitHub
readmeã® OS X 10.7 Lion: GCC-10.7.pkg ãããã¦ã³ãã¼ããã¦å®è¡ããã ãã
ããã¦ç°å¢å¤æ°CCã.bash_profileã«æ¸ããã¿ã¼ããã«ãåèµ·åããã
iMac% echo "export CC=/usr/bin/gcc-4.2" >> ~/.bash_profile
ãã®å ´éããªããexport CC=/usr/bin/gcc-4.2ãã¨ã³ãã³ããæã¤ã ãã§è¯ãã
解決
sqlite3ãå
¥ããã®ã«ããã¾ã§è¦å´ããã¨ã¯æããªãã£ãã
ããããã¨ãã£ã¦ããããçµå±ãåé¡ã¯llvm-gccã ãã ã£ãã®ã ã
iMac% echo $CC /usr/bin/gcc-4.2 iMac% ruby -v ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10] iMac% gem -v 1.3.7 iMac% gem list *** LOCAL GEMS *** actionmailer (2.3.5) actionpack (2.3.5) activerecord (2.3.5) activeresource (2.3.5) activesupport (2.3.5) i18n (0.4.2) mime-types (1.16) mysql (2.8.1) rack (1.1.0, 1.0.1) rails (2.3.5) rake (0.9.0) rest-client (1.6.1) rubygems-update (1.3.7) iMac% sudo gem install sqlite3-ruby Building native extensions. This could take a while... ####################################################### Hello! The sqlite3-ruby gem has changed it's name to just sqlite3. Rather than installing `sqlite3-ruby`, you should install `sqlite3`. Please update your dependencies accordingly. Thanks from the Ruby sqlite3 team! <3 <3 <3 <3 ####################################################### Successfully installed sqlite3-1.3.5 Successfully installed sqlite3-ruby-1.3.3 2 gems installed Installing ri documentation for sqlite3-1.3.5... No definition for libversion Enclosing class/module 'mSqlite3' for class Statement not known Installing ri documentation for sqlite3-ruby-1.3.3... Installing RDoc documentation for sqlite3-1.3.5... No definition for libversion Enclosing class/module 'mSqlite3' for class Statement not known Installing RDoc documentation for sqlite3-ruby-1.3.3... iMac%
ãç²ãæ§ã
åèãµã¤ã
ãã¡ããåèã«ããã¦ããã ãã¾ããããããã¨ããããã¾ãã
Xcode4.2にするとRubyがインストール出来ない、っていうやつにはまってみた - KUROIGAMEN(黒い画面)
Mac OS X Lionにしたらgccがなくてnode.jsがコンパイルできなくなった件 - 大人になったら肺呼吸