http://reval-mocchi.rhcloud.com

Macで自作エミュレータで学ぶx86アーキテクチャ本を進める...1章

Macで自作エミュレータで学ぶx86アーキテクチャ本を進めるには,以下のものが必要でした.

1章

  • gcc Xcodeのgccでは,オプションが使えないものがある. 調べて互換のあるオプションを探すのも骨が折れるので,brew install gcc --universal. もしくは,brew upgrade gcc
  • gobjdump objdumpがないので,gobjdumpを入れる.brew install binutilsで入れる.
  • nasm 現状では,なくてもよい.brew install nsamでいれる.

    起きたエラー

    gcc

  • brew upgrade gccで解決
$ brew install gcc --universal
==> Downloading http://ftpmirror.gnu.org/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2
==> Downloading from http://ftp.jaist.ac.jp/pub/GNU/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2
######################################################################## 100.0%
==> Patching
patching file gcc/jit/Make-lang.in
patching file gcc/jit/jit-playback.c
Hunk #1 succeeded at 2459 with fuzz 2 (offset 43 lines).
==> ../configure --build=x86_64-apple-darwin14.3.0 --prefix=/usr/local/Cellar/gcc/5.2.0 --libdir=/usr/local/Cellar/gcc/5.2.0/lib/gcc/5 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=
==> make bootstrap
==> make install
make[4]: *** [install-multi] Error 2
make[3]: *** [install-am] Error 2
make[2]: *** [install] Error 2
make[1]: *** [install-target-libgfortran] Error 2
make: *** [install] Error 2
couldn't understand kern.osversion `14.3.0'

READ THIS: https://git.io/brew-troubleshooting

These open issues may also help:
apple-gcc42 takes priority over modern gcc https://github.com/Homebrew/homebrew/issues/41055
gcc 4.9.2 fails to produce debugging information https://github.com/Homebrew/homebrew/issues/34976
Object files deleted during build of gcc needed by gdb https://github.com/Homebrew/homebrew/issues/35734
MacOS.(gcc|clang|llvm)_version can return nil https://github.com/Homebrew/homebrew/issues/18781

option:enable style:terminal title:gcc