Created
May 20, 2012 14:22
-
-
Save kubicek/2758294 to your computer and use it in GitHub Desktop.
Workaround for therubyracer Issue 158 (https://github.com/cowboyd/therubyracer/issues/158)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure v8 port is uninstalled first! | |
cd /usr/ports/lang/v8/ | |
sudo make deinstall | |
# Install gem and get path | |
fetch http://rubygems.org/downloads/libv8-3.3.10.4.gem | |
sudo gem install libv8-3.3.10.4.gem | |
LIBV8_PATH=/usr/local/lib/ruby/gems/1.9/gems/libv8-3.3.10.4/lib/libv8 | |
# Install devel/libexecinfo ( see 'ports/156993: lang/v8 missing dependency to devel/libexecinfo' at http://www.freebsd.org/cgi/query-pr.cgi?pr=156993 ) ... | |
cd /usr/ports/ | |
cd devel/libexecinfo | |
sudo make install clean | |
cd ${LIBV8_PATH}/build/v8 | |
# Back up SConstruct ... | |
sudo cp SConstruct SConstruct_`date "+%Y-%m-%d"` | |
# Add -fPIC flag | |
# WARNING: The sed command will affect the configuration for other operating systems as well! | |
sudo sed -i "" "s/ 'CCFLAGS': \['-ansi'\],/ 'CCFLAGS' : \['-ansi', '-fPIC'\],/g" SConstruct | |
sudo ${LIBV8_PATH}/build/scons/install/bin/scons arch=x64 | |
sudo gem install therubyracer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment