ci: use rubygems-requirements-system for installing gem gobject-introspection dependencies#303
Conversation
…spection dependencies
## Problem
CI builds are failing during gem installation because
the `gobject-introspection` gem cannot find the
`girepository.h` header file.
```
Installing gobject-introspection 4.2.7 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/home/runner/work/red_amber/red_amber/vendor/bundle/ruby/3.3.0/gems/gobject-introspection-4.2.7/ext/gobject-introspection
/opt/hostedtoolcache/Ruby/3.3.7/x64/bin/ruby extconf.rb
checking for --enable-debug-build option... no
checking for -Wall 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... no
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-introspection-1.0... yes (1.80.1)
creating rbgiversion.h
creating gobject-introspection-enum-types.c
creating gobject-introspection-enum-types.h
creating ruby-gobject-introspection.pc
creating Makefile
current directory:
/home/runner/work/red_amber/red_amber/vendor/bundle/ruby/3.3.0/gems/gobject-introspection-4.2.7/ext/gobject-introspection
make DESTDIR\= sitearchdir\=./.gem.20250318-4050-aavnxv
sitelibdir\=./.gem.20250318-4050-aavnxv clean
current directory:
/home/runner/work/red_amber/red_amber/vendor/bundle/ruby/3.3.0/gems/gobject-introspection-4.2.7/ext/gobject-introspection
make DESTDIR\= sitearchdir\=./.gem.20250318-4050-aavnxv
sitelibdir\=./.gem.20250318-4050-aavnxv
compiling gobject-introspection-enum-types.c
gobject-introspection-enum-types.c:5:10: fatal error: girepository.h: No such
file or directory
5 | #include <girepository.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:248: gobject-introspection-enum-types.o] Error 1
make failed, exit code 2
```
## Cause
The `gobject-introspection` gem depends on
`libgirepository1.0-dev`, which is not automatically
downloaded during gem installation. It leads to a
missing header error.
## Solution
Using the `rubygems-requirements-system` plugin to the
Gemfile so that the required `libgirepository1.0-dev`
as gobject-introspection's dependency is automatically
fetched during gem installation.
|
I will Investigate the cause of |
|
In Fedora, problem seems to be compilation: |
|
Will create separate issue. |
|
@bkmgit It seems that it's a problem of https://github.com/ruby-numo/numo-narray . |
|
Could you remove red_amber/.github/workflows/ci.yml Lines 24 to 33 in 9e3fcbd red_amber/.github/workflows/ci.yml Lines 44 to 46 in 9e3fcbd |
|
Hmm... Could you remove red_amber/.github/workflows/ci.yml Lines 52 to 53 in 9e3fcbd bundle install manually to avoid using cache?
|
|
Thank you so much. I manually do it. It still have the same error. The current CI error log. |
|
SciRuby/iruby#369 will fix it. native-package-installer isn't parallel ( |
Thank you so much, I understood it. |
|
I will update the |
GitHub: ref red-data-toolsGH-303 This change improves the installation instructions to leverage the rubygems-requirements-system plugin, which automatically installs system packages required by the gem.
Problem
CI builds are failing during gem installation because the
gobject-introspectiongem cannot find thegirepository.hheader file.Cause
The
gobject-introspectiongem depends onlibgirepository1.0-dev, which is not automatically downloaded during gem installation. It leads to amissing header error.
Solution
Using the
rubygems-requirements-systemplugin to the Gemfile so that the requiredlibgirepository1.0-devas gobject-introspection's dependency is automatically fetched during gem installation.