Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to compile on Centos5 #59

Closed
jperry opened this issue Dec 6, 2012 · 4 comments

Comments

Projects
None yet
4 participants
@jperry
Copy link

commented Dec 6, 2012

Hi,

I have gem 'libv8' in my Gemfile using ruby 1.9.3 and I'm getting a failure when I run bundle install

creating Makefile
Using compiler: /usr/bin/g++44
Traceback (most recent call last):
  File "build/gyp/gyp", line 15, in ?
    import gyp
  File "build/gyp/pylib/gyp/__init__.py", line 8, in ?
    import gyp.input
  File "build/gyp/pylib/gyp/input.py", line 14, in ?
    import gyp.common
  File "build/gyp/pylib/gyp/common.py", line 375
    with open(source_path) as source_file:
            ^
SyntaxError: invalid syntax
gmake: *** [out/Makefile.x64] Error 1
GYP_GENERATORS=make \
    build/gyp/gyp --generator-output="out" build/all.gyp \
                  -Ibuild/standalone.gypi --depth=. \
                  -Dv8_target_arch=x64 \
                  -S.x64 -Dhost_arch=x64

Any thoughts on this?

@cheald

This comment has been minimized.

Copy link

commented Dec 8, 2012

This is because v8 needs python 2.6 or better to install. Centos5 ships with 2.4. You'll have to upgrade python, as well as your /usr/bin/python symlink. Additionally, you need GCC4.3 or 4.4.

yum install gcc44-c++ python26 -y
ln -s /usr/bin/python26 /usr/local/bin/python

This got it installing for me.

@lidaobing

This comment has been minimized.

Copy link

commented Dec 10, 2012

@cheald I think it's dangerous to replace the /usr/bin/python

@cheald

This comment has been minimized.

Copy link

commented Dec 10, 2012

@lidaobing /usr/local/bin/python just "hides" /usr/bin/python, it doesn't replace it. Installing python-2.6 adds a /usr/bin/python26 binary parallel to the /usr/bin/python 2.4 binary. We just symlink that to /usr/local/bin and it's found first when the path is searched.

@lidaobing

This comment has been minimized.

Copy link

commented Dec 11, 2012

@cheald you code is correct, but description is wrong: " You'll have to upgrade python, as well as your /usr/bin/python symlink."

@cowboyd cowboyd closed this Dec 18, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.