flatpak / flatpak.github.io

Flatpak website
54 stars 100 forks source link

mini_racer build fails #501

Open AsciiWolf opened 2 years ago

AsciiWolf commented 2 years ago

It looks like that mini_racer no longer builds, causing the whole deploy to fail:

Installing mini_racer 0.5.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/usr/share/gems/gems/mini_racer-0.5.0/ext/mini_racer_extension
/usr/bin/ruby -I /usr/share/rubygems -r ./siteconf20211121-7-f0tz1k.rb
extconf.rb
checking for -lpthread... yes
creating Makefile

current directory:
/usr/share/gems/gems/mini_racer-0.5.0/ext/mini_racer_extension
make "DESTDIR=" clean
rm -f 
rm -f mini_racer_extension.so  *.o  *.bak mkmf.log .*.time

current directory:
/usr/share/gems/gems/mini_racer-0.5.0/ext/mini_racer_extension
make "DESTDIR="
g++ -I.
-I/usr/share/gems/gems/libv8-node-16.10.0.0-x86_64-linux/vendor/v8/include
-I/usr/include -I/usr/include/ruby/backward -I/usr/include -I.   -Wall -g
-rdynamic -std=c++14 -fpermissive -fvisibility=hidden  -fPIC -O2 -g -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-fexceptions -fstack-protector-strong -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -m64 -o
mini_racer_extension.o -c mini_racer_extension.cc
mini_racer_extension.cc: In function 'VALUE convert_v8_to_ruby(v8::Isolate*,
v8::Local<v8::Context>, v8::Local<v8::Value>)':
mini_racer_extension.cc:532:18: warning: 'stackCounter.StackCounter::isolate'
may be used uninitialized in this function [-Wmaybe-uninitialized]
  532 |     StackCounter stackCounter(isolate);
      |                  ^~~~~~~~~~~~
rm -f mini_racer_extension.so
g++ -shared -o mini_racer_extension.so mini_racer_extension.o -L. -L/usr/lib64
/usr/share/gems/gems/libv8-node-16.10.0.0-x86_64-linux/vendor/v8/x86_64-linux/libv8/obj/libv8_monolith.a
-L. -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -rdynamic
-Wl,-export-dynamic -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld  -m64  -lruby -lpthread  -lm   -lc
g++: error:
/usr/share/gems/gems/libv8-node-16.10.0.0-x86_64-linux/vendor/v8/x86_64-linux/libv8/obj/libv8_monolith.a:
No such file or directory
make: *** [Makefile:262: mini_racer_extension.so] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/share/gems/gems/mini_racer-0.5.0 for
inspection.
Results logged to /usr/lib64/gems/ruby/mini_racer-0.5.0/gem_make.out

An error occurred while installing mini_racer (0.5.0), and Bundler cannot
continue.
Make sure that `gem install mini_racer -v '0.5.0' --source
'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  mini_racer
AsciiWolf commented 2 years ago

Fixed by 5e2d3ee5d572dc5baee21c0fd1e434fb4cb0f127.

jimmac commented 2 years ago

I've now ran into the same thing, with the current 0.6.2 (gem "mini_racer", "~> 0.6.2" in the current Gemfile).

The gem itself builds (gem install mini_racer -v '0.6.2' --source 'https://rubygems.org/) but bundle install fails finding the library as shown above. I found some hints online, but failed to solve the issue following the instructions