Building Google V8 on RHEL6

From Codefool

Jump to: navigation, search

Working on a fresh RHEL6(Linux 2.6.32-431.20.3.el6.i686 i686). The offical RHEL version of git is 1.7.1 that does not have support for the -c option, which V8 build tools requires. So I will need to build a later version of git on RHEL6 first.

Contents

Building git on RHEL6

Following instructions:

  1. Obtain git source from git clone https://github.com/git/git
    1. make prefix=/usr/local all
      1. Missing perl module ExtUtils-MakeMaker
      2. Missing perl module Test-Harness
      3. make completed.
    2. sudo make prefix=/usr/local install
    3. git --version
      git version 2.0.2.607.gf2c9f21
  2. Profit!

Preparing the Build environment

  1. Install g++ via yum install gcc-c++
  2. Install required packages via sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
  3. yum -y install glibc-devel.i686 glibc-devel
  4. yum -y install libstdc++-devel.i686
  5. Make sure port 9418 is open in firewall.

Downloading V8

Following instructions

  1. Install svn-git via sudo yum install git-svn
  2. install depot_tools
    1. Fetch depot-tools via git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
    2. Add depot-tools to PATH export PATH=`pwd`/depot_tools:"$PATH"
  3. Fetch V8 via fetch v8
  4. Profit!

Building V8

Following instructions

  1. Build GYP (and possibly others) via make builddeps
  2. Build V8 via make ia32.release
    1. cc1plus: warnings being treated as errors
    2. Uninitialized variable in .././src/splay-tree-inl.h:213: 'dummy_node'
      1. Offending code is 'Node dummy_node(Congif::kNoKey, Config::NoValue()); - which is perfectly fine!
    3. Retry with make ia32.release werror=no
  3. Binary is in ./out/ia32.release/d8
  4. Build V8 debug via make ia32.debug werror=n
  5. Binary is in ./out/ia32.debug/d8

Testing V8

Following instructions

  1. tools/run-tests.py --arch-and-mode=ia32.release
  2. tools/run-tests.py --arch-and-mode=ia32.debug
Personal tools