Closed cschroed closed 3 months ago
What's the difference you might ask, it took me a while to see it, but the directory path is wrong. The mini_racer install is looking for vendor/v8/x86_64-linux-gnu/libv8 but installed on from the libv8 dependency is vendor/v8/x86_65-linux/libv8. So the -gnu is added to the path maybe because I'm using gcc as a compiler?
x86_65
, interesting 😉
A couple of questions:
PLATFORMS
defined in your Gemfile.lock
. Have you tried to slim it down? I'm pretty sure you can also slim down your Gemfile
as there should not be any side-effects between gems at installation timeThere has been an issue in the past (I think in connection with bundler) that sounds familiar… 🤔 I think @lloeki might know more about this.
x86_65, doh!!! That's funny...
Answering your questions:
While using that docker image locally, if I go into the Makefile /project/vendor/ruby/3.2.0/gems/mini_racer-0.12.0/ext/mini_racer_extension/Makefile
and change the line
ldflags = /root/project/vendor/ruby/3.2.0/gems/libv8-node-21.7.2.0-x86_64-linux/vendor/v8/x86_64-linux-gnu/libv8/obj/libv8_monolith.a -lstdc++ -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed
to
ldflags = /root/project/vendor/ruby/3.2.0/gems/libv8-node-21.7.2.0-x86_64-linux/vendor/v8/x86_64-linux/libv8/obj/libv8_monolith.a -lstdc++ -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed
Then run make locally in that directory, it works.
So again, what the mini_racer is expecting for the location of the libv8-node library is a mis-match. Is this a libv8 thing or mini_racer?
I did try older versions of libv8 and got the same result, BTW
Also, just saw that bundler released 2.5.14, I tried that and it did not work. Same result and error message.
Just found this PR in the libv8 while tracking down the root cause.
Closing the issue here, and will try to get libv8 fixed to correct the change in Ruby Gem::Platform.local
which is now returning x86_64-linux-gnu
instead of just x86_64-linux
thus causing the mis-match in file name in libv8.
I'm having trouble getting mini_racer to install on my CI/CD server (CircleCI) using a docker image that I build for the CI/CD engine. I'll give the details below, but what I'm finding is the error says
However, when I connect to the image during the build process, I can find the file:
What's the difference you might ask, it took me a while to see it, but the directory path is wrong. The mini_racer install is looking for
vendor/v8/x86_64-linux-gnu/libv8
but installed on from the libv8 dependency isvendor/v8/x86_65-linux/libv8
. So the-gnu
is added to the path maybe because I'm usinggcc
as a compiler?I've tried several things, but keep coming back to this, here are the details I think you need. Ruby version: 3.2.3 Bundler version: 2.5.13 Ubuntu version: 24 (Noble)
Gemfile
Gemfile.lock
Raw output from CI/CD build
Any help would be greatly appreciated. I saw some other issues around install, and tried those fixes, but I believe I'm on the latest of everything and it's still not working.