Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Error installing v0.18.1 on Ruby v3.4.8 on MacOSX x86

未关闭
#388 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
javascript, ruby

调研方向

Start with the native extension build output for mini_racer 0.18.1 and compare the failing mini_racer_v8.cc compilation on Ruby 3.4.8 with the reported working Ruby 3.4.7 setup. The issue gives no compiler error details beyond make failing, so first collect the full compiler output and check the existing Ruby 3.4 compatibility discussion, including issue #359. Done when installation succeeds on the reported macOS and Ruby version.

由索引模型根据 Issue 内容生成。

描述

platform: darwin/x86

I have updated to Ruby v3.4.8 and the v0.18.1 doesn't work anymore (it worked with Ruby v3.4.7).
It means that while building with native extensions, I get an error and I can't continue.

$ bundle
Fetching gem metadata from https://rubygems.org/........
Resolving dependencies...
Installing mini_racer 0.18.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/mini_racer-0.18.1/ext/mini_racer_extension
/Users/antonio.facciolo/.rbenv/versions/3.4.8/bin/ruby extconf.rb
checking for -lpthread... yes
checking for -lobjc... yes
checking for whether -Wl,--exclude-libs=ALL  is accepted as LDFLAGS... no
creating Makefile

current directory: /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/mini_racer-0.18.1/ext/mini_racer_extension
make DESTDIR\= sitearchdir\=./.gem.20260105-54121-b5e9b7 sitelibdir\=./.gem.20260105-54121-b5e9b7 clean

current directory: /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/mini_racer-0.18.1/ext/mini_racer_extension
make DESTDIR\= sitearchdir\=./.gem.20260105-54121-b5e9b7 sitelibdir\=./.gem.20260105-54121-b5e9b7
compiling mini_racer_extension.c
In file included from mini_racer_extension.c:13:
./serde.c:101:27: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
  101 |     n = next_power_of_two(n);
      |         ~~~~~~~~~~~~~~~~~ ^
./serde.c:111:14: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
  111 |     b->cap = n;
      |            ~ ^
./serde.c:393:29: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
  393 |         des_object_ref(arg, u);
      |         ~~~~~~~~~~~~~~      ^
./serde.c:567:33: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'int' [-Wshorten-64-to-32]
  567 |         des_bigint(arg, *p, u, 1-2*t);
      |         ~~~~~~~~~~             ~^~~~
mini_racer_extension.c:599:23: warning: incompatible pointer types passing 'unsigned long[64]' to parameter of type 'const uint64_t *' (aka 'const unsigned long long *')
[-Wincompatible-pointer-types]
  599 |         ser_bigint(s, limbs, countof(limbs), sign);
      |                       ^~~~~
./serde.c:269:48: note: passing argument to parameter 'p' here
  269 | static void ser_bigint(Ser *s, const uint64_t *p, size_t n, int sign)
      |                                                ^
mini_racer_extension.c:524:32: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
  524 |             ser_array_begin(s, n);
      |             ~~~~~~~~~~~~~~~    ^
mini_racer_extension.c:528:30: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
  528 |             ser_array_end(s, n);
      |             ~~~~~~~~~~~~~    ^
mini_racer_extension.c:530:31: warning: implicit conversion loses integer precision: 'long' to 'uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
  530 |             ser_object_ref(s, FIX2LONG(id));
      |             ~~~~~~~~~~~~~~    ^~~~~~~~~~~~
/Users/antonio.facciolo/.rbenv/versions/3.4.8/include/ruby-3.4.0/ruby/internal/arithmetic/long.h:46:22: note: expanded from macro 'FIX2LONG'
   46 | #define FIX2LONG     RB_FIX2LONG          /**< @old{RB_FIX2LONG} */
      |                      ^
/Users/antonio.facciolo/.rbenv/versions/3.4.8/include/ruby-3.4.0/ruby/internal/arithmetic/long.h:53:22: note: expanded from macro 'RB_FIX2LONG'
   53 | #define RB_FIX2LONG  rb_fix2long          /**< @alias{rb_fix2long} */
      |                      ^
mini_racer_extension.c:559:35: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
  559 |                 ser_object_end(s, n);
      |                 ~~~~~~~~~~~~~~    ^
mini_racer_extension.c:564:31: warning: implicit conversion loses integer precision: 'long' to 'uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
  564 |             ser_object_ref(s, FIX2LONG(id));
      |             ~~~~~~~~~~~~~~    ^~~~~~~~~~~~
/Users/antonio.facciolo/.rbenv/versions/3.4.8/include/ruby-3.4.0/ruby/internal/arithmetic/long.h:46:22: note: expanded from macro 'FIX2LONG'
   46 | #define FIX2LONG     RB_FIX2LONG          /**< @old{RB_FIX2LONG} */
      |                      ^
/Users/antonio.facciolo/.rbenv/versions/3.4.8/include/ruby-3.4.0/ruby/internal/arithmetic/long.h:53:22: note: expanded from macro 'RB_FIX2LONG'
   53 | #define RB_FIX2LONG  rb_fix2long          /**< @alias{rb_fix2long} */
      |                      ^
mini_racer_extension.c:677:31: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int' [-Wshorten-64-to-32]
  677 |     deadline = deadline_ms(c->timeout);
      |                ~~~~~~~~~~~ ~~~^~~~~~~
mini_racer_extension.c:758:43: warning: implicit conversion loses integer precision: 'int64_t' (aka 'long long') to 'int' [-Wshorten-64-to-32]
  758 |                 deadline = deadline_ms(c->idle_gc);
      |                            ~~~~~~~~~~~ ~~~^~~~~~~
12 warnings generated.
compiling mini_racer_v8.cc
make: *** [mini_racer_v8.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/mini_racer-0.18.1 for inspection.
Results logged to /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/extensions/x86_64-darwin-24/3.4.0/mini_racer-0.18.1/gem_make.out

  /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/3.4.0/rubygems/ext/builder.rb:125:in 'Gem::Ext::Builder.run'
  /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/3.4.0/rubygems/ext/builder.rb:51:in 'block in Gem::Ext::Builder.make'
  /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/3.4.0/rubygems/ext/builder.rb:43:in 'Array#each'
  /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/3.4.0/rubygems/ext/builder.rb:43:in 'Gem::Ext::Builder.make'
  /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/3.4.0/rubygems/ext/ext_conf_builder.rb:44:in 'Gem::Ext::ExtConfBuilder.build'
  /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/3.4.0/rubygems/ext/builder.rb:206:in 'Gem::Ext::Builder#build_extension'
  /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/3.4.0/rubygems/ext/builder.rb:240:in 'block in Gem::Ext::Builder#build_extensions'
  /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/3.4.0/rubygems/ext/builder.rb:237:in 'Array#each'
  /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/3.4.0/rubygems/ext/builder.rb:237:in 'Gem::Ext::Builder#build_extensions'
  /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/3.4.0/rubygems/installer.rb:844:in 'Gem::Installer#build_extensions'
  /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/bundler-2.7.0/lib/bundler/rubygems_gem_installer.rb:111:in 'Bundler::RubyGemsGemInstaller#build_extensions'
  /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/bundler-2.7.0/lib/bundler/rubygems_gem_installer.rb:30:in 'Bundler::RubyGemsGemInstaller#install'
  /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/bundler-2.7.0/lib/bundler/source/rubygems.rb:220:in 'Bundler::Source::Rubygems#install'
  /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/bundler-2.7.0/lib/bundler/installer/gem_installer.rb:55:in 'Bundler::GemInstaller#install'
  /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/bundler-2.7.0/lib/bundler/installer/gem_installer.rb:17:in 'Bundler::GemInstaller#install_from_spec'
  /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/bundler-2.7.0/lib/bundler/installer/parallel_installer.rb:133:in 'Bundler::ParallelInstaller#do_install'
  /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/bundler-2.7.0/lib/bundler/installer/parallel_installer.rb:124:in 'block in Bundler::ParallelInstaller#worker_pool'
  /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/bundler-2.7.0/lib/bundler/worker.rb:62:in 'Bundler::Worker#apply_func'
  /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/bundler-2.7.0/lib/bundler/worker.rb:57:in 'block in Bundler::Worker#process_queue'
  <internal:kernel>:168:in 'Kernel#loop'
  /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/bundler-2.7.0/lib/bundler/worker.rb:54:in 'Bundler::Worker#process_queue'
  /Users/antonio.facciolo/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/bundler-2.7.0/lib/bundler/worker.rb:90:in 'block (2 levels) in Bundler::Worker#create_threads'

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

In Gemfile:
  mini_racer

MacOSX 15.7.2
Darwin 24.6.0
Ruby 3.4.8
Bundler 2.6.9 (also tried with 2.7.0)
Rubygems v3.6.7

On the same system, I have tried also the v0.19.1 with Ruby 3.4.7 and it's failing too (I have opened already an issue for that)
At the moment, the only working combination is v0.18.1 with Ruby 3.4.7.

主要语言
JavaScript
星标
628
派生
100
平均合并
1 天 20 小时
30 天内合并 PR
2

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

rubyjs/mini_racer 的其他 Issue

查看 rubyjs/mini_racer 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。