以下の内容はhttps://marginalia.hatenablog.com/entry/2025/03/08/181748より取得しました。


Ruby Gem "glib2" が入らない。

$ bundle install
Fetching gem metadata from https://rubygems.org/........
Resolving dependencies...
Installing glib2 3.4.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native
extension.                                                
                                                          
current directory:
/home/tomoki/Documents/Ruby/vendor/bundle/ruby/3.4.0/gems/glib2-3.4.3/ext/glib2
/home/tomoki/.rbenv/versions/3.4.2/bin/ruby extconf.rb
checking for --enable-debug-build option... no
checking for -Wall option to compiler... yes
checking for -Waggregate-return option to compiler... yes
checking for -Wcast-align option to compiler... yes
checking for -Wextra option to compiler... yes
checking for -Wformat=2 option to compiler... yes
checking for -Winit-self option to compiler... yes
checking for -Wlarger-than-65500 option to compiler... yes
checking for -Wmissing-declarations option to compiler...
yes
checking for -Wmissing-format-attribute option to
compiler... yes
checking for -Wmissing-include-dirs option to compiler...
yes
checking for -Wmissing-noreturn option to compiler... yes
checking for -Wmissing-prototypes option to compiler...
yes
checking for -Wnested-externs option to compiler... yes
checking for -Wold-style-definition option to compiler...
yes
checking for -Wpacked option to compiler... yes
checking for -Wp,-D_FORTIFY_SOURCE=2 option to compiler...
yes
checking for -Wpointer-arith option to compiler... yes
checking for -Wundef option to compiler... yes
checking for -Wout-of-line-declaration option to
compiler... no
checking for -Wunsafe-loop-optimizations option to
compiler... yes
checking for -Wwrite-strings option to compiler... yes
checking for Homebrew... no
checking for gobject-2.0 version (>= 2.12.0)... yes
(2.80.0)
checking for gthread-2.0... yes (2.80.0)
checking for unistd.h... yes
checking for io.h... no
checking for g_spawn_close_pid() in glib.h... yes
checking for g_thread_init() in glib.h... yes
checking for g_main_depth() in glib.h... yes
checking for g_listenv() in glib.h... yes
checking for rb_check_array_type() in ruby.h... yes
checking for rb_check_hash_type() in ruby.h... yes
checking for rb_exec_recursive() in ruby.h... yes
checking for rb_errinfo() in ruby.h... yes
checking for rb_thread_call_without_gvl() in ruby.h... yes
checking for ruby_native_thread_p() in ruby.h... yes
checking for rb_thread_call_with_gvl() in ruby.h... yes
checking for rb_gc_register_mark_object() in ruby.h... yes
checking for rb_exc_new_str() in ruby.h... yes
checking for rb_enc_str_new_static() in ruby.h... yes
checking for curr_thread in ruby.h,node.h... no
checking for rb_curr_thread in ruby.h,node.h... no
creating ruby-glib2.pc
creating glib-enum-types.c
creating glib-enum-types.h
creating Makefile

current directory:
/home/tomoki/Documents/Ruby/vendor/bundle/ruby/3.4.0/gems/glib2-3.4.3/ext/glib2
make DESTDIR\= sitearchdir\=./.gem.20250308-106001-1kkomc
sitelibdir\=./.gem.20250308-106001-1kkomc clean

current directory:
/home/tomoki/Documents/Ruby/vendor/bundle/ruby/3.4.0/gems/glib2-3.4.3/ext/glib2
make DESTDIR\= sitearchdir\=./.gem.20250308-106001-1kkomc
sitelibdir\=./.gem.20250308-106001-1kkomc
compiling glib-enum-types.c
<command-line>: warning: "_FORTIFY_SOURCE" redefined
<command-line>: note: this is the location of the previous
definition
cc1: note: unrecognized command-line option
‘-Wno-self-assign’ may have been intended to silence
earlier diagnostics
cc1: note: unrecognized command-line option
‘-Wno-parentheses-equality’ may have been intended to
silence earlier diagnostics
cc1: note: unrecognized command-line option
‘-Wno-constant-logical-operand’ may have been intended to
silence earlier diagnostics
compiling rbglib-bytes.c
<command-line>: warning: "_FORTIFY_SOURCE" redefined
<command-line>: note: this is the location of the previous
definition
cc1: note: unrecognized command-line option
‘-Wno-self-assign’ may have been intended to silence
earlier diagnostics
cc1: note: unrecognized command-line option
‘-Wno-parentheses-equality’ may have been intended to
silence earlier diagnostics
cc1: note: unrecognized command-line option
‘-Wno-constant-logical-operand’ may have been intended to
silence earlier diagnostics
compiling rbglib-gc.c
<command-line>: warning: "_FORTIFY_SOURCE" redefined
<command-line>: note: this is the location of the previous
definition
In file included from
/home/tomoki/.rbenv/versions/3.4.2/include/ruby-3.4.0/ruby/internal/core.h:34,
from
/home/tomoki/.rbenv/versions/3.4.2/include/ruby-3.4.0/ruby/ruby.h:29,
from
/home/tomoki/.rbenv/versions/3.4.2/include/ruby-3.4.0/ruby.h:38,
                 from rbgobject.h:26,
                 from rbgprivate.h:31,
                 from rbglib-gc.c:21:
rbglib-gc.c: In function ‘rbg_gc_marker_new_raw’:
rbglib-gc.c:87:39: error: ‘rb_cData’ undeclared (first use
in this function)
   87 |     gc_marker = TypedData_Wrap_Struct(rb_cData,
      |                                       ^~~~~~~~
/home/tomoki/.rbenv/versions/3.4.2/include/ruby-3.4.0/ruby/internal/core/rtypeddata.h:450:30:
note: in definition of macro ‘TypedData_Wrap_Struct’
450 |  
rb_data_typed_object_wrap((klass),(sval),(data_type))
      |                              ^~~~~
rbglib-gc.c:87:39: note: each undeclared identifier is
reported only once for each function it appears in
   87 |     gc_marker = TypedData_Wrap_Struct(rb_cData,
      |                                       ^~~~~~~~
/home/tomoki/.rbenv/versions/3.4.2/include/ruby-3.4.0/ruby/internal/core/rtypeddata.h:450:30:
note: in definition of macro ‘TypedData_Wrap_Struct’
450 |  
rb_data_typed_object_wrap((klass),(sval),(data_type))
      |                              ^~~~~
At top level:
cc1: note: unrecognized command-line option
‘-Wno-self-assign’ may have been intended to silence
earlier diagnostics
cc1: note: unrecognized command-line option
‘-Wno-parentheses-equality’ may have been intended to
silence earlier diagnostics
cc1: note: unrecognized command-line option
‘-Wno-constant-logical-operand’ may have been intended to
silence earlier diagnostics
make: *** [Makefile:251: rbglib-gc.o] エラー 1

make failed, exit code 2

Gem files will remain installed in
/home/tomoki/Documents/Ruby/vendor/bundle/ruby/3.4.0/gems/glib2-3.4.3
for inspection.
Results logged to
/home/tomoki/Documents/Ruby/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/glib2-3.4.3/gem_make.out

/home/tomoki/.rbenv/versions/3.4.2/lib/ruby/3.4.0/rubygems/ext/builder.rb:126:in
'Gem::Ext::Builder.run'
/home/tomoki/.rbenv/versions/3.4.2/lib/ruby/3.4.0/rubygems/ext/builder.rb:52:in
'block in Gem::Ext::Builder.make'
/home/tomoki/.rbenv/versions/3.4.2/lib/ruby/3.4.0/rubygems/ext/builder.rb:44:in
'Array#each'
/home/tomoki/.rbenv/versions/3.4.2/lib/ruby/3.4.0/rubygems/ext/builder.rb:44:in
'Gem::Ext::Builder.make'
/home/tomoki/.rbenv/versions/3.4.2/lib/ruby/3.4.0/rubygems/ext/ext_conf_builder.rb:44:in
'Gem::Ext::ExtConfBuilder.build'
/home/tomoki/.rbenv/versions/3.4.2/lib/ruby/3.4.0/rubygems/ext/builder.rb:195:in
'Gem::Ext::Builder#build_extension'
/home/tomoki/.rbenv/versions/3.4.2/lib/ruby/3.4.0/rubygems/ext/builder.rb:229:in
'block in Gem::Ext::Builder#build_extensions'
/home/tomoki/.rbenv/versions/3.4.2/lib/ruby/3.4.0/rubygems/ext/builder.rb:226:in
'Array#each'
/home/tomoki/.rbenv/versions/3.4.2/lib/ruby/3.4.0/rubygems/ext/builder.rb:226:in
'Gem::Ext::Builder#build_extensions'
/home/tomoki/.rbenv/versions/3.4.2/lib/ruby/3.4.0/rubygems/installer.rb:844:in
'Gem::Installer#build_extensions'
/home/tomoki/.rbenv/versions/3.4.2/lib/ruby/3.4.0/bundler/rubygems_gem_installer.rb:111:in
'Bundler::RubyGemsGemInstaller#build_extensions'
/home/tomoki/.rbenv/versions/3.4.2/lib/ruby/3.4.0/bundler/rubygems_gem_installer.rb:30:in
'Bundler::RubyGemsGemInstaller#install'
/home/tomoki/.rbenv/versions/3.4.2/lib/ruby/3.4.0/bundler/source/rubygems.rb:205:in
'Bundler::Source::Rubygems#install'
/home/tomoki/.rbenv/versions/3.4.2/lib/ruby/3.4.0/bundler/installer/gem_installer.rb:55:in
'Bundler::GemInstaller#install'
/home/tomoki/.rbenv/versions/3.4.2/lib/ruby/3.4.0/bundler/installer/gem_installer.rb:17:in
'Bundler::GemInstaller#install_from_spec'
/home/tomoki/.rbenv/versions/3.4.2/lib/ruby/3.4.0/bundler/installer/parallel_installer.rb:133:in
'Bundler::ParallelInstaller#do_install'
/home/tomoki/.rbenv/versions/3.4.2/lib/ruby/3.4.0/bundler/installer/parallel_installer.rb:124:in
'block in Bundler::ParallelInstaller#worker_pool'
/home/tomoki/.rbenv/versions/3.4.2/lib/ruby/3.4.0/bundler/worker.rb:62:in
'Bundler::Worker#apply_func'
/home/tomoki/.rbenv/versions/3.4.2/lib/ruby/3.4.0/bundler/worker.rb:57:in
'block in Bundler::Worker#process_queue'
  <internal:kernel>:168:in 'Kernel#loop'
/home/tomoki/.rbenv/versions/3.4.2/lib/ruby/3.4.0/bundler/worker.rb:54:in
'Bundler::Worker#process_queue'
/home/tomoki/.rbenv/versions/3.4.2/lib/ruby/3.4.0/bundler/worker.rb:90:in
'block (2 levels) in Bundler::Worker#create_threads'

An error occurred while installing glib2 (3.4.3),
and Bundler cannot continue.                              

In Gemfile:
  oekaki was resolved to 0.1.7, which depends on
    gtk2 was resolved to 3.4.3, which depends on
      atk was resolved to 3.4.3, which depends on
        glib2



以上の内容はhttps://marginalia.hatenablog.com/entry/2025/03/08/181748より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14