rubyjs / mini_racer

Minimal embedded v8
MIT License
594 stars 93 forks source link

mini_racer can't install on ubuntu 24 using ruby 3.2.3 and bundler 2.5.13 #305

Closed cschroed closed 3 months ago

cschroed commented 3 months ago

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

linking shared-object mini_racer_extension.so
/usr/bin/ld: cannot find
/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:
No such file or directory

However, when I connect to the image during the build process, I can find the file:

root@8a61e29912fd:/root/project/vendor/ruby/3.2.0/gems/libv8-node-21.7.2.0-x86_64-linux/vendor/v8/x86_64-linux/libv8/obj# ls -l
total 184744
-rw-r--r-- 1 root root 189177824 Jun 21 00:18 libv8_monolith.a

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?

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

# frozen_string_literal: true

source 'https://rubygems.org'
ruby '3.2.3'

group :production, :development do
  gem 'addressable', '>= 2.8.0'
  gem 'aws-sdk-ec2'
  gem 'aws-sdk-s3'
  gem 'aws-sdk-sqs'
  gem 'aws_config'
  gem 'cancancan'
  gem 'coffee-rails'
  gem 'compass'
  gem 'compass-rails'
  gem 'daemons'
  gem 'delayed_job_mongoid'
  gem 'devise'
  gem 'devise_invitable'
  gem 'email_format'
  gem 'file_exists'
  gem 'guid'
  gem 'haml'
  gem 'jquery-rails'
  gem 'jbuilder', '~> 2.5'
  gem 'jwt'
  gem 'kaminari'
  gem 'kaminari-mongoid'
  gem 'liquid'
  gem 'materialize-sass'
  gem 'mini_racer'
  gem 'mongoid'
  gem 'mongoid_rails_migrations'
  gem 'openssl'
  gem 'OptionParser'
  gem 'puma', '~> 4.3'
  gem 'rails', '~> 7.1.3'
  gem 'redis'
  gem 'redis-namespace'
  gem 'redis-rack-cache'
  gem 'redis-rails'
  gem 'rest-client'
  gem 'sass-rails'
  gem 'uglifier'
  gem 'valid_url'
  gem 'web47core', '~> 3.2.2'
end

group :development do
  gem 'brakeman'
  # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
  gem 'listen'
  gem 'web-console'
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
  gem 'spring-watcher-listen'
end

group :test do
  gem 'codacy-coverage'
  gem 'database_cleaner-mongoid'
  gem 'factory_bot'
  gem 'factory_bot_rails'
  gem 'minitest'
  gem 'minitest-rails'
  gem 'minitest-reporters'
  gem 'mocha'
  gem 'ruby-prof'
  gem 'shoulda'
  gem 'shoulda-matchers'
  gem 'simplecov'
  gem 'simplecov-lcov'
  gem 'test-unit'
  gem 'webmock'
end

Gemfile.lock

GEM
  remote: https://rubygems.org/
  specs:
    OptionParser (0.5.1)
    actioncable (7.1.3.4)
      actionpack (= 7.1.3.4)
      activesupport (= 7.1.3.4)
      nio4r (~> 2.0)
      websocket-driver (>= 0.6.1)
      zeitwerk (~> 2.6)
    actionmailbox (7.1.3.4)
      actionpack (= 7.1.3.4)
      activejob (= 7.1.3.4)
      activerecord (= 7.1.3.4)
      activestorage (= 7.1.3.4)
      activesupport (= 7.1.3.4)
      mail (>= 2.7.1)
      net-imap
      net-pop
      net-smtp
    actionmailer (7.1.3.4)
      actionpack (= 7.1.3.4)
      actionview (= 7.1.3.4)
      activejob (= 7.1.3.4)
      activesupport (= 7.1.3.4)
      mail (~> 2.5, >= 2.5.4)
      net-imap
      net-pop
      net-smtp
      rails-dom-testing (~> 2.2)
    actionpack (7.1.3.4)
      actionview (= 7.1.3.4)
      activesupport (= 7.1.3.4)
      nokogiri (>= 1.8.5)
      racc
      rack (>= 2.2.4)
      rack-session (>= 1.0.1)
      rack-test (>= 0.6.3)
      rails-dom-testing (~> 2.2)
      rails-html-sanitizer (~> 1.6)
    actiontext (7.1.3.4)
      actionpack (= 7.1.3.4)
      activerecord (= 7.1.3.4)
      activestorage (= 7.1.3.4)
      activesupport (= 7.1.3.4)
      globalid (>= 0.6.0)
      nokogiri (>= 1.8.5)
    actionview (7.1.3.4)
      activesupport (= 7.1.3.4)
      builder (~> 3.1)
      erubi (~> 1.11)
      rails-dom-testing (~> 2.2)
      rails-html-sanitizer (~> 1.6)
    activejob (7.1.3.4)
      activesupport (= 7.1.3.4)
      globalid (>= 0.3.6)
    activemodel (7.1.3.4)
      activesupport (= 7.1.3.4)
    activerecord (7.1.3.4)
      activemodel (= 7.1.3.4)
      activesupport (= 7.1.3.4)
      timeout (>= 0.4.0)
    activestorage (7.1.3.4)
      actionpack (= 7.1.3.4)
      activejob (= 7.1.3.4)
      activerecord (= 7.1.3.4)
      activesupport (= 7.1.3.4)
      marcel (~> 1.0)
    activesupport (7.1.3.4)
      base64
      bigdecimal
      concurrent-ruby (~> 1.0, >= 1.0.2)
      connection_pool (>= 2.2.5)
      drb
      i18n (>= 1.6, < 2)
      minitest (>= 5.1)
      mutex_m
      tzinfo (~> 2.0)
    addressable (2.8.6)
      public_suffix (>= 2.0.2, < 6.0)
    ansi (1.5.0)
    autoprefixer-rails (10.4.16.0)
      execjs (~> 2)
    aws-eventstream (1.3.0)
    aws-partitions (1.946.0)
    aws-sdk-autoscaling (1.109.0)
      aws-sdk-core (~> 3, >= 3.197.0)
      aws-sigv4 (~> 1.1)
    aws-sdk-core (3.197.2)
      aws-eventstream (~> 1, >= 1.3.0)
      aws-partitions (~> 1, >= 1.651.0)
      aws-sigv4 (~> 1.8)
      jmespath (~> 1, >= 1.6.1)
    aws-sdk-ec2 (1.461.0)
      aws-sdk-core (~> 3, >= 3.197.0)
      aws-sigv4 (~> 1.1)
    aws-sdk-kms (1.85.0)
      aws-sdk-core (~> 3, >= 3.197.0)
      aws-sigv4 (~> 1.1)
    aws-sdk-s3 (1.152.3)
      aws-sdk-core (~> 3, >= 3.197.0)
      aws-sdk-kms (~> 1)
      aws-sigv4 (~> 1.8)
    aws-sdk-sqs (1.76.0)
      aws-sdk-core (~> 3, >= 3.197.0)
      aws-sigv4 (~> 1.1)
    aws-sigv4 (1.8.0)
      aws-eventstream (~> 1, >= 1.0.2)
    aws_config (0.1.1)
    base64 (0.2.0)
    bcrypt (3.1.20)
    bigdecimal (3.1.8)
    bindex (0.8.1)
    brakeman (6.1.2)
      racc
    bson (5.0.0)
    builder (3.3.0)
    cancancan (3.6.1)
    chunky_png (1.4.0)
    codacy-coverage (2.2.1)
      simplecov
    coffee-rails (5.0.0)
      coffee-script (>= 2.2.0)
      railties (>= 5.2.0)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.12.2)
    compass (1.0.3)
      chunky_png (~> 1.2)
      compass-core (~> 1.0.2)
      compass-import-once (~> 1.0.5)
      rb-fsevent (>= 0.9.3)
      rb-inotify (>= 0.9)
      sass (>= 3.3.13, < 3.5)
    compass-core (1.0.3)
      multi_json (~> 1.0)
      sass (>= 3.3.0, < 3.5)
    compass-import-once (1.0.5)
      sass (>= 3.2, < 3.5)
    compass-rails (2.0.1)
      compass (~> 1.0.0)
    concurrent-ruby (1.3.3)
    connection_pool (2.4.1)
    crack (1.0.0)
      bigdecimal
      rexml
    crass (1.0.6)
    daemons (1.4.1)
    database_cleaner-core (2.0.1)
    database_cleaner-mongoid (2.0.1)
      database_cleaner-core (~> 2.0.0)
      mongoid
    date (3.3.4)
    delayed_job (4.1.11)
      activesupport (>= 3.0, < 8.0)
    delayed_job_mongoid (3.0.0)
      delayed_job (>= 3.0, < 5)
      mongoid (>= 5.0)
    devise (4.9.4)
      bcrypt (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 4.1.0)
      responders
      warden (~> 1.2.3)
    devise_invitable (2.0.9)
      actionmailer (>= 5.0)
      devise (>= 4.6)
    docile (1.4.0)
    domain_name (0.6.20240107)
    drb (2.2.1)
    email_format (1.0.0)
      activemodel
      email_regex
    email_regex (0.0.1)
    erubi (1.13.0)
    execjs (2.9.1)
    factory_bot (6.4.6)
      activesupport (>= 5.0.0)
    factory_bot_rails (6.4.3)
      factory_bot (~> 6.4)
      railties (>= 5.0.0)
    faraday (2.9.2)
      faraday-net_http (>= 2.0, < 3.2)
    faraday-net_http (3.1.0)
      net-http
    ffi (1.17.0-aarch64-linux-gnu)
    ffi (1.17.0-aarch64-linux-musl)
    ffi (1.17.0-arm-linux-gnu)
    ffi (1.17.0-arm-linux-musl)
    ffi (1.17.0-arm64-darwin)
    ffi (1.17.0-x86-linux-gnu)
    ffi (1.17.0-x86-linux-musl)
    ffi (1.17.0-x86_64-darwin)
    ffi (1.17.0-x86_64-linux-gnu)
    ffi (1.17.0-x86_64-linux-musl)
    file_exists (0.2.0)
    globalid (1.2.1)
      activesupport (>= 6.1)
    guid (0.1.1)
    haml (6.3.0)
      temple (>= 0.8.2)
      thor
      tilt
    hashdiff (1.1.0)
    http-accept (1.7.0)
    http-cookie (1.0.6)
      domain_name (~> 0.5)
    i18n (1.14.5)
      concurrent-ruby (~> 1.0)
    io-console (0.7.2)
    irb (1.13.2)
      rdoc (>= 4.0.0)
      reline (>= 0.4.2)
    jbuilder (2.12.0)
      actionview (>= 5.0.0)
      activesupport (>= 5.0.0)
    jmespath (1.6.2)
    jquery-rails (4.6.0)
      rails-dom-testing (>= 1, < 3)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    jwt (2.8.2)
      base64
    kaminari (1.2.2)
      activesupport (>= 4.1.0)
      kaminari-actionview (= 1.2.2)
      kaminari-activerecord (= 1.2.2)
      kaminari-core (= 1.2.2)
    kaminari-actionview (1.2.2)
      actionview
      kaminari-core (= 1.2.2)
    kaminari-activerecord (1.2.2)
      activerecord
      kaminari-core (= 1.2.2)
    kaminari-core (1.2.2)
    kaminari-mongoid (1.0.2)
      kaminari-core (~> 1.0)
      mongoid
    libv8-node (21.7.2.0)
    libv8-node (21.7.2.0-aarch64-linux)
    libv8-node (21.7.2.0-aarch64-linux-musl)
    libv8-node (21.7.2.0-arm64-darwin)
    libv8-node (21.7.2.0-x86_64-darwin)
    libv8-node (21.7.2.0-x86_64-linux)
    libv8-node (21.7.2.0-x86_64-linux-musl)
    liquid (5.5.0)
    listen (3.9.0)
      rb-fsevent (~> 0.10, >= 0.10.3)
      rb-inotify (~> 0.9, >= 0.9.10)
    loofah (2.22.0)
      crass (~> 1.0.2)
      nokogiri (>= 1.12.0)
    mail (2.8.1)
      mini_mime (>= 0.1.1)
      net-imap
      net-pop
      net-smtp
    marcel (1.0.4)
    materialize-sass (1.0.0.1)
      autoprefixer-rails (>= 6.0.3)
    mime-types (3.5.2)
      mime-types-data (~> 3.2015)
    mime-types-data (3.2024.0604)
    mini_mime (1.1.5)
    mini_racer (0.12.0)
      libv8-node (~> 21.7.2.0)
    minitest (5.24.0)
    minitest-rails (7.1.0)
      minitest (~> 5.20)
      railties (~> 7.1.0)
    minitest-reporters (1.7.1)
      ansi
      builder
      minitest (>= 5.0)
      ruby-progressbar
    mocha (2.4.0)
      ruby2_keywords (>= 0.0.5)
    mongo (2.20.0)
      bson (>= 4.14.1, < 6.0.0)
    mongoid (8.1.5)
      activemodel (>= 5.1, < 7.2, != 7.0.0)
      concurrent-ruby (>= 1.0.5, < 2.0)
      mongo (>= 2.18.0, < 3.0.0)
      ruby2_keywords (~> 0.0.5)
    mongoid_rails_migrations (1.4.0)
      activesupport (>= 4.2.0)
      bundler (>= 1.0.0)
      mongoid (>= 4.0.0)
      rails (>= 4.2.0)
      railties (>= 4.2.0)
    multi_json (1.15.0)
    mutex_m (0.2.0)
    net-http (0.4.1)
      uri
    net-imap (0.4.13)
      date
      net-protocol
    net-pop (0.1.2)
      net-protocol
    net-protocol (0.2.2)
      timeout
    net-smtp (0.5.0)
      net-protocol
    netrc (0.11.0)
    nio4r (2.7.3)
    nokogiri (1.16.6-aarch64-linux)
      racc (~> 1.4)
    nokogiri (1.16.6-arm-linux)
      racc (~> 1.4)
    nokogiri (1.16.6-arm64-darwin)
      racc (~> 1.4)
    nokogiri (1.16.6-x86-linux)
      racc (~> 1.4)
    nokogiri (1.16.6-x86_64-darwin)
      racc (~> 1.4)
    nokogiri (1.16.6-x86_64-linux)
      racc (~> 1.4)
    openssl (3.2.0)
    orm_adapter (0.5.0)
    power_assert (2.0.3)
    psych (5.1.2)
      stringio
    public_suffix (5.1.1)
    puma (4.3.12)
      nio4r (~> 2.0)
    racc (1.8.0)
    rack (3.1.3)
    rack-cache (1.17.0)
      rack (>= 0.4)
    rack-session (2.0.0)
      rack (>= 3.0.0)
    rack-test (2.1.0)
      rack (>= 1.3)
    rackup (2.1.0)
      rack (>= 3)
      webrick (~> 1.8)
    rails (7.1.3.4)
      actioncable (= 7.1.3.4)
      actionmailbox (= 7.1.3.4)
      actionmailer (= 7.1.3.4)
      actionpack (= 7.1.3.4)
      actiontext (= 7.1.3.4)
      actionview (= 7.1.3.4)
      activejob (= 7.1.3.4)
      activemodel (= 7.1.3.4)
      activerecord (= 7.1.3.4)
      activestorage (= 7.1.3.4)
      activesupport (= 7.1.3.4)
      bundler (>= 1.15.0)
      railties (= 7.1.3.4)
    rails-dom-testing (2.2.0)
      activesupport (>= 5.0.0)
      minitest
      nokogiri (>= 1.6)
    rails-html-sanitizer (1.6.0)
      loofah (~> 2.21)
      nokogiri (~> 1.14)
    railties (7.1.3.4)
      actionpack (= 7.1.3.4)
      activesupport (= 7.1.3.4)
      irb
      rackup (>= 1.0.0)
      rake (>= 12.2)
      thor (~> 1.0, >= 1.2.2)
      zeitwerk (~> 2.6)
    rake (13.2.1)
    rb-fsevent (0.11.2)
    rb-inotify (0.11.1)
      ffi (~> 1.0)
    rdoc (6.7.0)
      psych (>= 4.0.0)
    redis (5.2.0)
      redis-client (>= 0.22.0)
    redis-actionpack (5.4.0)
      actionpack (>= 5, < 8)
      redis-rack (>= 2.1.0, < 4)
      redis-store (>= 1.1.0, < 2)
    redis-activesupport (5.3.0)
      activesupport (>= 3, < 8)
      redis-store (>= 1.3, < 2)
    redis-client (0.22.2)
      connection_pool
    redis-namespace (1.11.0)
      redis (>= 4)
    redis-rack (3.0.0)
      rack-session (>= 0.2.0)
      redis-store (>= 1.2, < 2)
    redis-rack-cache (2.2.1)
      rack-cache (>= 1.10, < 2)
      redis-store (>= 1.6, < 2)
    redis-rails (5.0.2)
      redis-actionpack (>= 5.0, < 6)
      redis-activesupport (>= 5.0, < 6)
      redis-store (>= 1.2, < 2)
    redis-store (1.10.0)
      redis (>= 4, < 6)
    reline (0.5.9)
      io-console (~> 0.5)
    responders (3.1.1)
      actionpack (>= 5.2)
      railties (>= 5.2)
    rest-client (2.1.0)
      http-accept (>= 1.7.0, < 2.0)
      http-cookie (>= 1.0.2, < 2.0)
      mime-types (>= 1.16, < 4.0)
      netrc (~> 0.8)
    rexml (3.3.0)
      strscan
    ruby-prof (1.7.0)
    ruby-progressbar (1.13.0)
    ruby2_keywords (0.0.5)
    sass (3.4.25)
    sass-rails (6.0.0)
      sassc-rails (~> 2.1, >= 2.1.1)
    sassc (2.4.0)
      ffi (~> 1.9)
    sassc-rails (2.1.2)
      railties (>= 4.0.0)
      sassc (>= 2.0)
      sprockets (> 3.0)
      sprockets-rails
      tilt
    shoulda (2.11.3)
    shoulda-matchers (6.2.0)
      activesupport (>= 5.2.0)
    simplecov (0.22.0)
      docile (~> 1.1)
      simplecov-html (~> 0.11)
      simplecov_json_formatter (~> 0.1)
    simplecov-html (0.12.3)
    simplecov-lcov (0.8.0)
    simplecov_json_formatter (0.1.4)
    spring (4.2.1)
    spring-watcher-listen (2.1.0)
      listen (>= 2.7, < 4.0)
      spring (>= 4)
    sprockets (4.2.1)
      concurrent-ruby (~> 1.0)
      rack (>= 2.2.4, < 4)
    sprockets-rails (3.5.1)
      actionpack (>= 6.1)
      activesupport (>= 6.1)
      sprockets (>= 3.0.0)
    stringio (3.1.1)
    strscan (3.1.0)
    temple (0.10.3)
    test-unit (3.6.2)
      power_assert
    thor (1.3.1)
    tilt (2.3.0)
    timeout (0.4.1)
    twilio-ruby (7.2.0)
      faraday (>= 0.9, < 3.0)
      jwt (>= 1.5, < 3.0)
      nokogiri (>= 1.6, < 2.0)
    tzinfo (2.0.6)
      concurrent-ruby (~> 1.0)
    tzinfo-data (1.2024.1)
      tzinfo (>= 1.0.0)
    uglifier (4.2.0)
      execjs (>= 0.3.0, < 3)
    uri (0.13.0)
    valid_url (0.0.4)
      addressable
      rails
    validate_url (1.0.15)
      activemodel (>= 3.0.0)
      public_suffix
    warden (1.2.9)
      rack (>= 2.0.9)
    web-console (4.2.1)
      actionview (>= 6.0.0)
      activemodel (>= 6.0.0)
      bindex (>= 0.4.0)
      railties (>= 6.0.0)
    web47core (3.2.2)
      activemodel
      activesupport
      aws-sdk-autoscaling
      cancancan
      daemons
      delayed_job_mongoid
      haml
      jwt
      liquid
      materialize-sass
      mongoid (~> 8.1.4)
      rails (~> 7.1.3)
      railties
      redis
      rest-client
      sass
      sass-rails
      twilio-ruby
      tzinfo-data
      valid_url
      validate_url
    webmock (3.23.1)
      addressable (>= 2.8.0)
      crack (>= 0.3.2)
      hashdiff (>= 0.4.0, < 2.0.0)
    webrick (1.8.1)
    websocket-driver (0.7.6)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.5)
    zeitwerk (2.6.16)

PLATFORMS
  aarch64-linux
  aarch64-linux-gnu
  aarch64-linux-musl
  arm-linux
  arm-linux-gnu
  arm-linux-musl
  arm64-darwin
  x86-linux
  x86-linux-gnu
  x86-linux-musl
  x86_64-darwin
  x86_64-linux
  x86_64-linux-gnu
  x86_64-linux-musl

DEPENDENCIES
  OptionParser
  addressable (>= 2.8.0)
  aws-sdk-ec2
  aws-sdk-s3
  aws-sdk-sqs
  aws_config
  brakeman
  cancancan
  codacy-coverage
  coffee-rails
  compass
  compass-rails
  daemons
  database_cleaner-mongoid
  delayed_job_mongoid
  devise
  devise_invitable
  email_format
  factory_bot
  factory_bot_rails
  file_exists
  guid
  haml
  jbuilder (~> 2.5)
  jquery-rails
  jwt
  kaminari
  kaminari-mongoid
  liquid
  listen
  materialize-sass
  mini_racer
  minitest
  minitest-rails
  minitest-reporters
  mocha
  mongoid
  mongoid_rails_migrations
  openssl
  puma (~> 4.3)
  rails (~> 7.1.3)
  redis
  redis-namespace
  redis-rack-cache
  redis-rails
  rest-client
  ruby-prof
  sass-rails
  shoulda
  shoulda-matchers
  simplecov
  simplecov-lcov
  spring
  spring-watcher-listen
  test-unit
  uglifier
  valid_url
  web-console
  web47core (~> 3.2.2)
  webmock

RUBY VERSION
   ruby 3.2.3p157

BUNDLED WITH
   2.5.13

Raw output from CI/CD build

Don't run Bundler as root. Installing your bundle as root will break this
application for all non-root users on this machine.
Fetching gem metadata from https://rubygems.org/........
Fetching rake 13.2.1
Installing rake 13.2.1
Fetching base64 0.2.0
Fetching concurrent-ruby 1.3.3
Fetching connection_pool 2.4.1
Fetching minitest 5.24.0
Fetching mutex_m 0.2.0
Fetching erubi 1.13.0
Fetching racc 1.8.0
Fetching crass 1.0.6
Fetching nio4r 2.7.3
Fetching zeitwerk 2.6.16
Fetching timeout 0.4.1
Fetching mini_mime 1.1.5
Fetching date 3.3.4
Fetching ansi 1.5.0
Fetching execjs 2.9.1
Fetching aws-partitions 1.946.0
Fetching aws_config 0.1.1
Fetching bcrypt 3.1.20
Fetching bindex 0.8.1
Fetching cancancan 3.6.1
Fetching docile 1.4.0
Fetching simplecov_json_formatter 0.1.4
Fetching OptionParser 0.5.1
Fetching drb 2.2.1
Fetching builder 3.3.0
Fetching rack 3.1.3
Fetching websocket-extensions 0.1.5
Fetching marcel 1.0.4
Fetching public_suffix 5.1.1
Fetching aws-eventstream 1.3.0
Fetching jmespath 1.6.2
Fetching bson 5.0.0
Fetching chunky_png 1.4.0
Fetching simplecov-html 0.12.3
Installing crass 1.0.6
Installing connection_pool 2.4.1
Installing base64 0.2.0
Fetching coffee-script-source 1.12.2
Installing docile 1.4.0
Fetching bigdecimal 3.1.8
Installing bcrypt 3.1.20 with native extensions
Installing timeout 0.4.1
Installing OptionParser 0.5.1
Fetching stringio 3.1.1
Installing execjs 2.9.1
Installing mini_mime 1.1.5
Installing coffee-script-source 1.12.2
Installing aws_config 0.1.1
Installing drb 2.2.1
Installing bindex 0.8.1 with native extensions
Installing simplecov_json_formatter 0.1.4
Installing mutex_m 0.2.0
Installing ansi 1.5.0
Installing erubi 1.13.0
Installing rack 3.1.3
Installing aws-partitions 1.946.0
Installing date 3.3.4 with native extensions
Installing cancancan 3.6.1
Fetching io-console 0.7.2
Installing aws-eventstream 1.3.0
Installing websocket-extensions 0.1.5
Installing builder 3.3.0
Fetching webrick 1.8.1
Fetching thor 1.3.1
Installing zeitwerk 2.6.16
Installing stringio 3.1.1 with native extensions
Fetching multi_json 1.15.0
Installing jmespath 1.6.2
Fetching sass 3.4.25
Installing marcel 1.0.4
Fetching rb-fsevent 0.11.2
Fetching ffi 1.17.0 (x86_64-linux-gnu)
Installing public_suffix 5.1.1
Installing racc 1.8.0 with native extensions
Installing webrick 1.8.1
Installing minitest 5.24.0
Installing io-console 0.7.2 with native extensions
Fetching strscan 3.1.0
Fetching daemons 1.4.1
Installing thor 1.3.1
Fetching ruby2_keywords 0.0.5
Fetching database_cleaner-core 2.0.1
Fetching orm_adapter 0.5.0
Installing nio4r 2.7.3 with native extensions
Installing strscan 3.1.0 with native extensions
Installing multi_json 1.15.0
Fetching domain_name 0.6.20240107
Fetching email_regex 0.0.1
Installing daemons 1.4.1
Installing concurrent-ruby 1.3.3
Installing ruby2_keywords 0.0.5
Installing email_regex 0.0.1
Installing rb-fsevent 0.11.2
Installing database_cleaner-core 2.0.1
Installing orm_adapter 0.5.0
Installing bigdecimal 3.1.8 with native extensions
Fetching uri 0.13.0
Installing domain_name 0.6.20240107
Installing chunky_png 1.4.0
Fetching temple 0.10.3
Fetching guid 0.1.1
Fetching tilt 2.3.0
Fetching file_exists 0.2.0
Fetching hashdiff 1.1.0
Installing bson 5.0.0 with native extensions
Fetching kaminari-core 1.2.2
Fetching http-accept 1.7.0
Fetching libv8-node 21.7.2.0 (x86_64-linux)
Fetching liquid 5.5.0
Installing temple 0.10.3
Installing ffi 1.17.0 (x86_64-linux-gnu)
Fetching mime-types-data 3.2024.0604
Installing kaminari-core 1.2.2
Installing file_exists 0.2.0
Installing sass 3.4.25
Fetching openssl 3.2.0
Installing tilt 2.3.0
Installing uri 0.13.0
Installing hashdiff 1.1.0
Fetching ruby-progressbar 1.13.0
Fetching power_assert 2.0.3
Fetching netrc 0.11.0
Fetching ruby-prof 1.7.0
Fetching shoulda 2.11.3
Fetching simplecov-lcov 0.8.0
Fetching spring 4.2.1
Fetching jwt 2.8.2
Installing power_assert 2.0.3
Fetching redis-client 0.22.2
Fetching aws-sigv4 1.8.0
Fetching net-protocol 0.2.2
Installing jwt 2.8.2
Installing simplecov-html 0.12.3
Fetching websocket-driver 0.7.6
Fetching autoprefixer-rails 10.4.16.0
Installing netrc 0.11.0
Installing http-accept 1.7.0
Installing ruby-progressbar 1.13.0
Fetching coffee-script 2.4.1
Installing guid 0.1.1
Installing redis-client 0.22.2
Installing ruby-prof 1.7.0 with native extensions
Fetching uglifier 4.2.0
Installing spring 4.2.1
Installing aws-sigv4 1.8.0
Fetching mocha 2.4.0
Fetching addressable 2.8.6
Fetching net-http 0.4.1
Installing mime-types-data 3.2024.0604
Fetching rack-session 2.0.0
Fetching test-unit 3.6.2
Installing openssl 3.2.0 with native extensions
Fetching rack-cache 1.17.0
Fetching nokogiri 1.16.6 (x86_64-linux)
Installing liquid 5.5.0
Installing simplecov-lcov 0.8.0
Fetching rack-test 2.1.0
Fetching rackup 2.1.0
Installing coffee-script 2.4.1
Fetching warden 1.2.9
Installing shoulda 2.11.3
Fetching aws-sdk-core 3.197.2
Installing rack-test 2.1.0
Installing websocket-driver 0.7.6 with native extensions
Installing test-unit 3.6.2
Installing warden 1.2.9
Installing mocha 2.4.0
Installing addressable 2.8.6
Installing net-protocol 0.2.2
Installing rack-session 2.0.0
Installing rack-cache 1.17.0
Installing rackup 2.1.0
Fetching brakeman 6.1.2
Fetching psych 5.1.2
Fetching minitest-reporters 1.7.1
Installing net-http 0.4.1
Fetching haml 6.3.0
Fetching http-cookie 1.0.6
Installing minitest-reporters 1.7.1
Installing psych 5.1.2 with native extensions
Fetching rexml 3.3.0
Installing autoprefixer-rails 10.4.16.0
Fetching redis 5.2.0
Fetching net-pop 0.1.2
Installing http-cookie 1.0.6
Installing uglifier 4.2.0
Installing haml 6.3.0
Fetching net-smtp 0.5.0
Installing net-pop 0.1.2
Installing rexml 3.3.0
Installing redis 5.2.0
Installing net-smtp 0.5.0
Fetching simplecov 0.22.0
Installing simplecov 0.22.0
Fetching mime-types 3.5.2
Fetching faraday-net_http 3.1.0
Installing mime-types 3.5.2
Installing faraday-net_http 3.1.0
Installing aws-sdk-core 3.197.2
Fetching faraday 2.9.2
Fetching redis-store 1.10.0
Fetching redis-namespace 1.11.0
Installing redis-store 1.10.0
Installing redis-namespace 1.11.0
Installing faraday 2.9.2
Fetching rb-inotify 0.11.1
Fetching sassc 2.4.0
Installing rb-inotify 0.11.1
Fetching rest-client 2.1.0
Fetching i18n 1.14.5
Fetching tzinfo 2.0.6
Fetching sprockets 4.2.1
Fetching codacy-coverage 2.2.1
Installing codacy-coverage 2.2.1
Fetching reline 0.5.9
Installing i18n 1.14.5
Installing tzinfo 2.0.6
Installing sprockets 4.2.1
Installing rest-client 2.1.0
Fetching listen 3.9.0
Installing reline 0.5.9
Fetching materialize-sass 1.0.0.1
Installing listen 3.9.0
Installing sassc 2.4.0 with native extensions
Fetching redis-rack-cache 2.2.1
Fetching redis-rack 3.0.0
Installing redis-rack 3.0.0
Installing brakeman 6.1.2
Installing materialize-sass 1.0.0.1
Installing redis-rack-cache 2.2.1
Fetching spring-watcher-listen 2.1.0
Installing spring-watcher-listen 2.1.0
Fetching tzinfo-data 1.2024.1
Installing tzinfo-data 1.2024.1
Fetching compass-core 1.0.3
Fetching compass-import-once 1.0.5
Installing compass-import-once 1.0.5
Installing compass-core 1.0.3
Fetching aws-sdk-kms 1.85.0
Fetching aws-sdk-autoscaling 1.109.0
Fetching aws-sdk-ec2 1.461.0
Fetching aws-sdk-sqs 1.76.0
Installing aws-sdk-sqs 1.76.0
Installing aws-sdk-kms 1.85.0
Installing aws-sdk-autoscaling 1.109.0
Fetching aws-sdk-s3 1.152.3
Installing nokogiri 1.16.6 (x86_64-linux)
Fetching rdoc 6.7.0
Installing aws-sdk-ec2 1.461.0
Installing aws-sdk-s3 1.152.3
Fetching compass 1.0.3
Fetching mongo 2.20.0
Fetching puma 4.3.12
Installing compass 1.0.3
Installing puma 4.3.12 with native extensions
Installing rdoc 6.7.0
Installing mongo 2.20.0
Fetching irb 1.13.2
Installing irb 1.13.2
Fetching twilio-ruby 7.2.0
Fetching loofah 2.22.0
Installing loofah 2.22.0
Fetching rails-html-sanitizer 1.6.0
Installing rails-html-sanitizer 1.6.0
Installing twilio-ruby 7.2.0
Fetching compass-rails 2.0.1
Installing compass-rails 2.0.1
Installing libv8-node 21.7.2.0 (x86_64-linux)
Fetching mini_racer 0.12.0
Installing mini_racer 0.12.0 with native extensions
Fetching net-imap 0.4.13
Installing net-imap 0.4.13
Fetching mail 2.8.1
Installing mail 2.8.1
Fetching activesupport 7.1.3.4
Fetching crack 1.0.0
Installing crack 1.0.0
Fetching webmock 3.23.1
Installing activesupport 7.1.3.4
Installing webmock 3.23.1
Fetching rails-dom-testing 2.2.0
Fetching activemodel 7.1.3.4
Fetching globalid 1.2.1
Fetching shoulda-matchers 6.2.0
Fetching factory_bot 6.4.6
Fetching redis-activesupport 5.3.0
Fetching delayed_job 4.1.11
Installing rails-dom-testing 2.2.0
Installing activemodel 7.1.3.4
Installing globalid 1.2.1
Installing redis-activesupport 5.3.0
Installing delayed_job 4.1.11
Installing factory_bot 6.4.6
Installing shoulda-matchers 6.2.0
Fetching activejob 7.1.3.4
Fetching actionview 7.1.3.4
Installing activejob 7.1.3.4
Installing actionview 7.1.3.4
Fetching activerecord 7.1.3.4
Fetching mongoid 8.1.5
Fetching email_format 1.0.0
Fetching validate_url 1.0.15
Installing email_format 1.0.0
Installing validate_url 1.0.15
Installing activerecord 7.1.3.4
Installing mongoid 8.1.5
Fetching jbuilder 2.12.0
Fetching kaminari-actionview 1.2.2
Fetching actionpack 7.1.3.4
Installing kaminari-actionview 1.2.2
Installing jbuilder 2.12.0
Installing actionpack 7.1.3.4
Fetching sprockets-rails 3.5.1
Fetching actioncable 7.1.3.4
Fetching actionmailer 7.1.3.4
Fetching railties 7.1.3.4
Fetching redis-actionpack 5.4.0
Installing sprockets-rails 3.5.1
Installing redis-actionpack 5.4.0
Installing actioncable 7.1.3.4
Installing actionmailer 7.1.3.4
Installing railties 7.1.3.4
Fetching redis-rails 5.0.2
Installing redis-rails 5.0.2
Fetching activestorage 7.1.3.4
Fetching kaminari-activerecord 1.2.2
Installing kaminari-activerecord 1.2.2
Installing activestorage 7.1.3.4
Fetching kaminari 1.2.2
Installing kaminari 1.2.2
Fetching actionmailbox 7.1.3.4
Fetching actiontext 7.1.3.4
Installing actionmailbox 7.1.3.4
Installing actiontext 7.1.3.4
Fetching factory_bot_rails 6.4.3
Fetching jquery-rails 4.6.0
Fetching coffee-rails 5.0.0
Fetching responders 3.1.1
Fetching minitest-rails 7.1.0
Fetching web-console 4.2.1
Fetching rails 7.1.3.4
Installing factory_bot_rails 6.4.3
Installing coffee-rails 5.0.0
Installing minitest-rails 7.1.0
Installing rails 7.1.3.4
Installing responders 3.1.1
Installing web-console 4.2.1
Fetching valid_url 0.0.4
Installing valid_url 0.0.4
Fetching devise 4.9.4
Installing devise 4.9.4
Installing jquery-rails 4.6.0
Fetching devise_invitable 2.0.9
Installing devise_invitable 2.0.9
Fetching delayed_job_mongoid 3.0.0
Fetching kaminari-mongoid 1.0.2
Fetching mongoid_rails_migrations 1.4.0
Fetching database_cleaner-mongoid 2.0.1
Installing delayed_job_mongoid 3.0.0
Installing kaminari-mongoid 1.0.2
Installing mongoid_rails_migrations 1.4.0
Installing database_cleaner-mongoid 2.0.1
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/root/project/vendor/ruby/3.2.0/gems/mini_racer-0.12.0/ext/mini_racer_extension
/usr/bin/ruby3.2 -I/usr/lib/ruby/vendor_ruby extconf.rb
checking for -lpthread... yes
checking for whether -Wl,--exclude-libs=ALL  is accepted as LDFLAGS... no
creating Makefile

current directory:
/root/project/vendor/ruby/3.2.0/gems/mini_racer-0.12.0/ext/mini_racer_extension
make DESTDIR\= sitearchdir\=./.gem.20240621-81-s5y32i
sitelibdir\=./.gem.20240621-81-s5y32i clean

current directory:
/root/project/vendor/ruby/3.2.0/gems/mini_racer-0.12.0/ext/mini_racer_extension
make DESTDIR\= sitearchdir\=./.gem.20240621-81-s5y32i
sitelibdir\=./.gem.20240621-81-s5y32i
compiling mini_racer_extension.cc
linking shared-object mini_racer_extension.so
/usr/bin/ld: cannot find
/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:
No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:265: mini_racer_extension.so] Error 1

make failed, exit code 2

Gem files will remain installed in
/root/project/vendor/ruby/3.2.0/gems/mini_racer-0.12.0 for inspection.
Results logged to
/root/project/vendor/ruby/3.2.0/extensions/x86_64-linux-gnu/3.2.0/mini_racer-0.12.0/gem_make.out

  /usr/lib/ruby/vendor_ruby/rubygems/ext/builder.rb:119:in `run'
  /usr/lib/ruby/vendor_ruby/rubygems/ext/builder.rb:53:in `block in make'
  /usr/lib/ruby/vendor_ruby/rubygems/ext/builder.rb:45:in `each'
  /usr/lib/ruby/vendor_ruby/rubygems/ext/builder.rb:45:in `make'
  /usr/lib/ruby/vendor_ruby/rubygems/ext/ext_conf_builder.rb:42:in `build'
  /usr/lib/ruby/vendor_ruby/rubygems/ext/builder.rb:187:in `build_extension'
/usr/lib/ruby/vendor_ruby/rubygems/ext/builder.rb:221:in `block in
build_extensions'
  /usr/lib/ruby/vendor_ruby/rubygems/ext/builder.rb:218:in `each'
  /usr/lib/ruby/vendor_ruby/rubygems/ext/builder.rb:218:in `build_extensions'
  /usr/lib/ruby/vendor_ruby/rubygems/installer.rb:844:in `build_extensions'
/var/lib/gems/3.2.0/gems/bundler-2.5.13/lib/bundler/rubygems_gem_installer.rb:79:in
`build_extensions'
/var/lib/gems/3.2.0/gems/bundler-2.5.13/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
/var/lib/gems/3.2.0/gems/bundler-2.5.13/lib/bundler/source/rubygems.rb:209:in
`install'
/var/lib/gems/3.2.0/gems/bundler-2.5.13/lib/bundler/installer/gem_installer.rb:54:in
`install'
/var/lib/gems/3.2.0/gems/bundler-2.5.13/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
/var/lib/gems/3.2.0/gems/bundler-2.5.13/lib/bundler/installer/parallel_installer.rb:132:in
`do_install'
/var/lib/gems/3.2.0/gems/bundler-2.5.13/lib/bundler/installer/parallel_installer.rb:123:in
`block in worker_pool'
/var/lib/gems/3.2.0/gems/bundler-2.5.13/lib/bundler/worker.rb:62:in
`apply_func'
/var/lib/gems/3.2.0/gems/bundler-2.5.13/lib/bundler/worker.rb:57:in `block in
process_queue'
  /var/lib/gems/3.2.0/gems/bundler-2.5.13/lib/bundler/worker.rb:54:in `loop'
/var/lib/gems/3.2.0/gems/bundler-2.5.13/lib/bundler/worker.rb:54:in
`process_queue'
/var/lib/gems/3.2.0/gems/bundler-2.5.13/lib/bundler/worker.rb:90:in `block (2
levels) in create_threads'

An error occurred while installing mini_racer (0.12.0), and Bundler
cannot continue.

In Gemfile:
  mini_racer

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.

tisba commented 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:

There has been an issue in the past (I think in connection with bundler) that sounds familiar… 🤔 I think @lloeki might know more about this.

cschroed commented 3 months ago

x86_65, doh!!! That's funny...

Answering your questions:

  1. Running the same docker image locally yields the same result, so it is not CircleCI inducing anything. Good question.
  2. I tried various platform combinations, reducing down to only what is needed at the time to removing PLATFORMS all together and it yields the same result.

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

cschroed commented 3 months ago

Also, just saw that bundler released 2.5.14, I tried that and it did not work. Same result and error message.

cschroed commented 3 months ago

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.