LoginSignup
1
0

More than 5 years have passed since last update.

OS XにLLVMをsvnインストールする

Last updated at Posted at 2013-09-16

コンパイラの勉強にLLVMがいいと聞いたので少し触ってみた。
およそ http://onsg.techtalk.jp/09/how-to-install-llvm のujihisaさんの手順の通りにやった。

  1. gmakeが入っていない場合は入れる

    % sudo port install gmake
    Error: org.macports.activate for port ncurses returned: Image error: /opt/local/bin/captoinfo is being used by the active ncursesw port.  Please deactivate this port first, or use 'port -f activate ncurses' to force the activation.
    --->  Computing dependencies for gettext
    --->  Dependencies to be installed: ncurses
    --->  Activating ncurses @5.9_2
    
    % sudo port -f activate ncurses
    --->  The following versions of ncurses are currently installed:
    --->      ncurses @5.7_1
    --->      ncurses @5.9_2
    Error: port activate failed: Registry error: Please specify the full version as recorded in the port registry.
    
    % sudo port -f activate ncurses @5.9_2   
    
    % sudo port install gmake
    
  2. LLVMをインストール

    % cd ~/src
    % svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
    % cd llvm
    % ./configure --prefix=/Users/satzz/src/llvm/usr --enable-optimized # 場所は適当
    % gmake -k |& tee gnumake.out
    % gmake install
    
  3. ~/src/llvm/usr をPATHに追加。

  4. あとは http://d.hatena.ne.jp/propella/20110224/p1 などを参考に挙動確認する。

※OS Xならllvm-gccなどはデフォルトで入っているらしい。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0