Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

3.3.10.2 installs on FreeBSD, but 3.3.10.4 does not #27

Closed
courtland opened this issue Jan 23, 2012 · 8 comments
Closed

3.3.10.2 installs on FreeBSD, but 3.3.10.4 does not #27

courtland opened this issue Jan 23, 2012 · 8 comments

Comments

@courtland
Copy link

Something seems to have broken between the .2 point release and .4 that breaks installing the gem under FreeBSD.

FreeBSD ncr-vm.local 8.2-STABLE FreeBSD 8.2-STABLE #1: Fri May 6 19:11:52 UTC 2011 root@:/usr/obj/usr/src/sys/RGNETS amd64
ncr-vm# ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [amd64-freebsd8]
ncr-vm#

ncr-vm# gem install libv8 -v 3.3.10.2
Building native extensions. This could take a while...
Successfully installed libv8-3.3.10.2
1 gem installed
Installing ri documentation for libv8-3.3.10.2...
Installing RDoc documentation for libv8-3.3.10.2...
ncr-vm#

ncr-vm# gem install libv8 -v 3.3.10.4
Building native extensions. This could take a while...
ERROR: Error installing libv8:
ERROR: Failed to build gem native extension.

    /usr/local/bin/ruby18 extconf.rb

*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby18
extconf.rb:13: uninitialized constant Gem (NameError)
Checking for Python...

Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/libv8-3.3.10.4 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/libv8-3.3.10.4/ext/libv8/gem_make.out
ncr-vm#

@courtland
Copy link
Author

Trying to compile from source also breaks.

My first attempt resulted in this error:
Writing install/lib/scons-2.1.0/scons-2.1.0-py2.7.egg-info
Installed SCons library modules into install/lib/scons-2.1.0
Installed SCons scripts into install/bin
Installed SCons man pages into install/man/man1
cp -r v8 build
patch -td build/v8 -i ../../fpic-on-linux-amd64.patch
Hmm... Looks like a unified diff to me...

The text leading up to this was:

|--- SConstruct

|+++ SConstruct

Patching file SConstruct using Plan A...
Hunk #1 succeeded at 102 (offset -37 lines).
done
cd build/v8 && GCC_VERSION=.(\d).\d/ ? $1 + $2 : "UNKNOWN"') ../scons/install/bin/scons arch=
Syntax error: word unexpected (expecting ")")
*** Error code 2

Stop in /tmp/libv8/lib/libv8.

Notice that GCC_VERSION was not parsed/determined correctly and the arch flag passed to ../scons/install/bin/scons is missing.

If I make the following changes to the Makefile and manually specify GCC_VERSION and ARCH, I get a littler further.

ncr-vm# head Makefile

SCONS=build/scons/install/bin/scons
SCONSSRC=build/scons
V8SRC=build/v8
LIBV8=build/v8/libv8.a
LIBV8_G=build/v8/libv8_g.a
#GCC_VERSION=$(shell ruby -e 'puts %x{gcc --version} =~ /(\d).(\d).\d/ ? $$1 + $$2 : "UNKNOWN"')
GCC_VERSION=42
#ARCH=$(shell ruby detect_cpu.rb)
ARCH=x64

ncr-vm# make
mkdir -p build/scons/install
python build/scons/setup.py install --prefix=install
running install
running build
running build_py
running build_scripts
running install_lib
running install_scripts
copying script/scons -> install/bin/scons-2.1.0
copying script/scons -> install/bin
copying script/sconsign -> install/bin/sconsign-2.1.0
copying script/sconsign -> install/bin
copying script/scons-time -> install/bin/scons-time-2.1.0
copying script/scons-time -> install/bin
running install_data
running install_egg_info
Removing install/lib/scons-2.1.0/scons-2.1.0-py2.7.egg-info
Writing install/lib/scons-2.1.0/scons-2.1.0-py2.7.egg-info
Installed SCons library modules into install/lib/scons-2.1.0
Installed SCons scripts into install/bin
Installed SCons man pages into install/man/man1
cd build/v8 && GCC_VERSION=42 ../scons/install/bin/scons arch=x64
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o obj/release/accessors.o -c -fno-rtti -fno-exceptions -fvisibility=hidden -Wall -Werror -W -Wno-unused-parameter -Wnon-virtual-dtor -m64 -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -ansi -DV8_TARGET_ARCH_X64 -DENABLE_DEBUGGER_SUPPORT -I/usr/local/include -Isrc src/accessors.cc
cc1plus: warnings being treated as errors
In file included from src/contexts.h:31,
from src/objects-inl.h:40,
from src/v8.h:60,
from src/accessors.cc:28:
src/heap.h: In member function 'v8::internal::byte** v8::internal::Heap::store_buffer_top_address()':
src/heap.h:1170: warning: dereferencing type-punned pointer will break strict-aliasing rules
scons: *** [obj/release/accessors.o] Error 1
scons: building terminated because of errors.
*** Error code 2

Stop in /tmp/libv8/lib/libv8.

@fractaloop
Copy link

If you manually build the gem from the master branch, you can get around this issue. We are preparing a new gem release but for now some user intervention is required.

Sorry about the trouble,

-Logan

On Jan 23, 2012, at 1:23 PM, Nick Rogers wrote:

Something seems to have broken between the .2 point release and .4 that breaks installing the gem under FreeBSD.

FreeBSD ncr-vm.local 8.2-STABLE FreeBSD 8.2-STABLE #1: Fri May 6 19:11:52 UTC 2011 root@:/usr/obj/usr/src/sys/RGNETS amd64
ncr-vm# ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [amd64-freebsd8]
ncr-vm#

ncr-vm# gem install libv8 -v 3.3.10.2
Building native extensions. This could take a while...
Successfully installed libv8-3.3.10.2
1 gem installed
Installing ri documentation for libv8-3.3.10.2...
Installing RDoc documentation for libv8-3.3.10.2...
ncr-vm#

ncr-vm# gem install libv8 -v 3.3.10.4
Building native extensions. This could take a while...
ERROR: Error installing libv8:
ERROR: Failed to build gem native extension.

   /usr/local/bin/ruby18 extconf.rb

*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby18
extconf.rb:13: uninitialized constant Gem (NameError)
Checking for Python...

Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/libv8-3.3.10.4 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/libv8-3.3.10.4/ext/libv8/gem_make.out
ncr-vm#


Reply to this email directly or view it on GitHub:
https://github.com/fractaloop/libv8/issues/27

@courtland
Copy link
Author

Thanks for the response. I did try to build the gem from the master branch and it seems to break. See my second post on this issue. Maybe I am missing something?

@fractaloop
Copy link

Hrm I don't know but I built a FreeBSD 8.2 image last night. I'll try to check it out during some spare cycles.

@mat813
Copy link

mat813 commented Feb 21, 2012

the main problem is that extconf.rb calls make where it should call gmake :-) (which is gnu make's name on FreeBSD)

@mat813
Copy link

mat813 commented Feb 21, 2012

hum, also, I noticed a small thing, the error actually is :
extconf.rb:13: uninitialized constant Gem (NameError)

adding require 'rubygems' at the top of the file fixes it.

@mat813
Copy link

mat813 commented Feb 29, 2012

Also, hum, on amd64, you need -fPIC, so adding the same than is done by the fpic-on-linux-amd64.patch to the freebsd section of the SConstruct file would be nice :-)

@cowboyd
Copy link
Collaborator

cowboyd commented Jun 21, 2012

this should be fixed on master and with the switch to the GYP build

@cowboyd cowboyd closed this as completed Jun 21, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants