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

Segfault during compilation on Ubuntu 20 #311

Closed
coding-red-panda opened this issue Jan 19, 2021 · 3 comments
Closed

Segfault during compilation on Ubuntu 20 #311

coding-red-panda opened this issue Jan 19, 2021 · 3 comments

Comments

@coding-red-panda
Copy link

For one of our older projects, we use libv8 3.16.14.19 and this doesn't seem to compile on Ubuntu 20.
All requirements are installed from what I can tell:

current directory: /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/ext/libv8
/home/coding-bunny/.rvm/rubies/ruby-2.2.4/bin/ruby -I /home/coding-bunny/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0 -r ./siteconf20210119-141909-11w1ftk.rb extconf.rb
creating Makefile
Applying /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/patches/disable-building-tests.patch
Applying /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/patches/disable-werror-on-osx.patch
Applying /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/patches/disable-xcode-debugging.patch
Applying /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/patches/do-not-imply-vfp3-and-armv7.patch
Applying /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/patches/do-not-use-MAP_NORESERVE-on-freebsd.patch
Applying /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/patches/do-not-use-vfp2.patch
Applying /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/patches/fPIC-for-static.patch
Compiling v8 for x64
Using python 2.7.18
Using compiler: c++ (GCC version 9.3.0)
Beginning compilation. This will take some time.
Building v8 with env CXX=c++ LINK=c++  /usr/bin/make x64.release ARFLAGS.target=crs werror=no
GYP_GENERATORS=make \
build/gyp/gyp --generator-output="out" build/all.gyp \
              -Ibuild/standalone.gypi --depth=. \
              -Dv8_target_arch=x64 \
              -S.x64  -Dv8_enable_backtrace=1 -Dv8_can_use_vfp2_instructions=true -Darm_fpu=vfpv2 -Dv8_can_use_vfp3_instructions=true -Darm_fpu=vfpv3 -Dwerror=''
make[1]: Entering directory '/home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/vendor/v8/out'
 CXX(target) /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/vendor/v8/out/x64.release/obj.target/preparser_lib/src/allocation.o
  CXX(target) /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o
  CXX(target) /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum.o
  CXX(target) /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum-dtoa.o
  CXX(target) /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/vendor/v8/out/x64.release/obj.target/preparser_lib/src/cached-powers.o
  CXX(target) /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/vendor/v8/out/x64.release/obj.target/preparser_lib/src/conversions.o  CXX(target) /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/vendor/v8/out/x64.release/obj.target/preparser_lib/src/diy-fp.o
  CXX(target) /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/vendor/v8/out/x64.release/obj.target/preparser_lib/src/dtoa.o
  CXX(target) /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/vendor/v8/out/x64.release/obj.target/preparser_lib/src/fast-dtoa.o
  CXX(target) /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/vendor/v8/out/x64.release/obj.target/preparser_lib/src/fixed-dtoa.o
  CXX(target) /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/vendor/v8/out/x64.release/obj.target/preparser_lib/src/once.o
  CXX(target) /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/vendor/v8/out/x64.release/obj.target/preparser_lib/src/preparse-data.o
CXX(target) /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/vendor/v8/out/x64.release/obj.target/preparser_lib/src/preparser-api.o
CXX(target) /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/vendor/v8/out/x64.release/obj.target/preparser_lib/src/scanner.o

  LINK(target) /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/vendor/v8/out/x64.release/mksnapshot
  ACTION tools_gyp_v8_gyp_v8_snapshot_target_run_mksnapshot /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/vendor/v8/out/x64.release/obj.target/v8_snapshot/geni/snapshot.cc
Segmentation fault (core dumped)
make[1]: *** [tools/gyp/v8_snapshot.target.x64.mk:13: /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/vendor/v8/out/x64.release/obj.target/v8_snapshot/geni/snapshot.cc] Error 139
make[1]: Leaving directory '/home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/vendor/v8/out'
make: *** [Makefile:195: x64.release] Error 2
/home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/vendor/v8/out/x64.release/obj.target/tools/gyp/libv8_snapshot.a'to exist, but it was not found (Libv8::Location::Vendor::ArchiveNotFound)
	from /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/ext/libv8/location.rb:35:in `each'
	from /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/ext/libv8/location.rb:35:in `verify_installation!'
	from /home/coding-bunny/.rvm/gems/ruby-2.2.4/gems/libv8-3.16.14.19/ext/libv8/location.rb:26:in `install!'
	from extconf.rb:7:in `<main>'

extconf failed, exit code 1

@yohann
Copy link

yohann commented Jun 25, 2021

Got the same problem here.
Has anyone found a solution for this?

@coding-red-panda
Copy link
Author

Got the same problem here.
Has anyone find a solution for this?

So far we've just decided to stop using this gem and therubyracer and have NodeJS installed on the machines.
Get's the job done as well in our case and bypasses the problem, since there's also issues installing these gems on new Macbooks.

@lloeki
Copy link
Contributor

lloeki commented Dec 4, 2023

  • Read this.
  • Urgently move to mini_racer+libv8-node which support glib, musl, aarch64-linux, and arm64-darwin.
  • Still, I pushed 3.16.14.19.1 binaries out of good will, might or might not unlock by sidestepping the build.

Closing.

@lloeki lloeki closed this as completed Dec 4, 2023
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

3 participants