2014년 6월 22일 일요일

OpenSource Toolchain for OSX 10.9.x


Toolchain

OSX opensource toolchain

prerequirement

  1. xcode install
    • xcode compiler (cli base)
    • xcode-select --install
  2. download source code
    • gcc requires three other libraries: GMP, MPFR, MPC
    • gcc-4.9.1.tar.bz2 86MB gcc
    • gmp-6.0.0a.tar.bz2 2.2MB gmp
    • mpc-1.0.2.tar.gz 0.6MB mpc
    • mpfr-3.1.2.tar.bz2 1.2MB mpfp

set up the source tree

  1. decompress gcc-4.9.1
    • tar -xjvf gcc-4.9.1.tar.bz2
    • cd gcc-4.9.1
  2. decompress gmp
    • tar -xjvf ../gmp-6.0.0a.tar.bz2
    • ln -s gmp-6.0.0 gmp
  3. decompress mpc
    • tar -xzf ../mpc-1.0.2.tar
    • ln -s mpc-1.0.2/ mpc
  4. decompress mpfr
    • tar -xjf ../mpfr-3.1.2.tar.bz2
    • ln -s mpfr-3.1.2 mpfr

compile enviroment setting

  • mkdir obj
  • cd obj
  • pwd
    • 00_toolchain/gcc_4.9.1/obj
  • ../configure --prefix=/usr/local/gcc-4.9.1 --enable-languages=c,c++

build up

  • make -j4
  • sudo make install

enviroment setting

  • check version
    • /usr/local/bin/gcc --version
    • export PATH=/usr/local/bin:$PATH

cmake

  • download source code
    • cmake 3.0.0
    • mv ~/Downloads/cmake-3.0.0.tar .
    • tar xvf cmake-3.0.0.tar
    • cd cmake-3.0.0
    • mkdir obj
    • cd obj
    • ../bootstrap
    • make -j4
    • sudo make install

wget

  • download source code
    • wget 1.15
    • mv ~/Downloads/wget-1.15.tar .
    • tar xvf wget-1.15.tar
    • cd wget-1.15
    • mkdir obj
    • cd obj
    • ../configure --with-ssl=openssl
    • make -j4
    • sudo make install

autoconf

emacs

git

cscope

  • source code cscope-15.8a
  • mv ~/Download/cscope-15.8a.tar .
  • tar xvf cscope-15.8a.tar
  • cd cscope-15.8a
  • emacs src/constants.h
#if (BSD || V9 ) && !__NetBSD__ && !__FreeBSD__
#if (BSD || V9 ) && !__NetBSD__ && !__FreeBSD__ && !__APPLE__
  • ./configure
  • make -j4
  • sudo make install

doxygen

graphviz

magit

  • wget https://github.com/downloads/magit/magit/magit-1.2.0.tar.gz
  • tar -xf magit-1.2.0.tar.gz
  • cd magit-1.2.0
  • make
  • sudo make install
  • (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/magit")
  • (require 'magit)
  • 실행방법
    • M-x magit-status
    • 수정할 부분에서 s를 누르면 add가 된다.
    • modified 가 되면 c를 누르고 commit -m 을 입력한다.
    • C-c C-c를 입력하면 push가 된다.
  • 기능 조작 방법 |조작커맨드|기능| |i|.gitignore에 파일 추가| |k|물리 파일 지우기| |S| 모든 파일 add (git add -A)| |u|add 대상에서 빠지기| |I|로그를 보기| |L|자세한 로그를 보기| |v|커밋 취소| |F|git pull| |P|git push| |m|git merge| |t|tag만들기|

node.js

  • source node.js
  • tar -zxvf node-v0.10.31.tar.gz
  • cd node-v0.10.31
  • ./configure
  • make
  • sudo make install

MacPorts

  • source MaxPorts-2.3.1
  • tar -zxvf MaxPorts-2.3.1.tar.bz2
  • cd MacPorts-2.3.1
  • ./configure
  • make
  • sudo make install
  • sudo port -v selfupdate 
  • emacs ~/.bash_profile
export PORT=/opt/local/bin
export PATH=$PORT:$PATH
  • source ~/.bash_profile

git-review

failed

  • sudo easy_install pip
  • sudo pip install git-review

success from source

vagrant

gradle

#add Java Home to path
export JAVA_HOME=$(/usr/libexec/java_home)
export GRADLE_HOME="/Users/{yourAccountName}/toolchain/gradle-2.1"
export PATH=${PATH}:${GRADLE_HOME}/bin

ruby

Homebrew

if [ -f $(brew --prefix)/etc/bash_completion ]; then
  . $(brew --prefix)/etc/bash_completion
fi
  • Package 찿기 (wget)
    • brew search wget
  • Package 설치 (wget)
    • brew install wget
  • Package 제거 (wget)
    • brew remove wget
  • Brew uninstall
$ cd `brew --prefix`
$ rm -rf Cellar
$ brew prune
$ rm `git ls-files`
$ rmdir Library/Homebrew Library/Aliases Library/Formula Library/Contributions
$ rm -rf .git
$ rm -rf ~/Library/Caches/Homebrew

tree

  • brew install tree

gradle

  • brew install gradle

readline6.4

  • readline-6.3
  • tar xvf readline-6.3.tar.gz
  • cd readline-6.3
  • ./configure
  • make
  • sudo make install

mdwiki

  • mdwiki
  • git clone https://github.com/Dynalon/mdwiki
  • cd mdwiki
  • Install node.js >= 0.10 and npm (if not included)
  • Install deps and build MDwiki (you need automake installed - if you are on Windows check the contents of the Makefile for the list of commands to run them manually):
make
  • Find the mdwiki.html in the dist/ folder
  • Development
  • For development, use
grunt devel
  • To get unminified source code compiled to dist/mdwiki-debug.html, as well as auto file watching and livereload support. Symlink the development mdwiki file into your webroot for testing.

openssl-1.0.1i

  • source
  • tar xvf openssl-1.0.1i.tar.gz
  • cd openssl-1.0.1i
  • ./config
  • make
  • sudo make install

zlib-1.2.8

  • source
  • tar xvf zlib-1.2.8.tar.gz
  • cd zlib-1.2.8
  • ./configure
  • make
  • sudo make install

openssh-6.6.p1

  • source
  • tar xvf openssh-6.6.p1.tar.gz
  • cd openssh-6.6.p1
  • ./configure
  • make
  • sudo make install

댓글 없음:

댓글 쓰기