action #156769
closedopenQA nightly documentation build CI jobs fail with "ERROR: Error installing asciidoctor-pdf: /usr/bin/ruby.ruby2.5…can't find header files for ruby", possibly needs update to more recent ruby version? size:S
0%
Description
Observation¶
Building native extensions. This could take a while...
ERROR: Error installing asciidoctor-pdf:
ERROR: Failed to build gem native extension.
current directory: /home/squamata/project/.gem/gems/bigdecimal-3.1.6/ext/bigdecimal
/usr/bin/ruby.ruby2.5 -r ./siteconf20240306-923-t3r9gw.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib64/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /home/squamata/project/.gem/gems/bigdecimal-3.1.6 for inspection.
Results logged to /home/squamata/project/.gem/extensions/x86_64-linux/2.5.0/bigdecimal-3.1.6/gem_make.out
Exited with code exit status 1
I think I have seen that reproducing over the past days
Suggestions¶
- Check where ruby2.5 is pulled in which is possibly outdated and ensure to use a current version
- Consider quick fixes or dropping PDF support at all but also keep in mind references in "gh-pages" itself
- Consider updating the stack but then the base of Leap is a problem, so maybe switch to a different container base, e.g. Tumbleweed or use pandoc or something else to generate the PDF or headless web-browser
Updated by okurz 9 months ago
- Status changed from New to In Progress
- Assignee set to okurz
maybe this is related to https://github.com/os-autoinst/openQA/pull/5389 ?
Trying to reproduce this. I ran podman run --pull=always --rm -it registry.opensuse.org/devel/openqa/ci/containers/base:latest
to replicate the CI environment and then called
sudo zypper -n in -C 'rubygem(asciidoctor)' 'perl(Pod::AsciiDoctor)' git-core
git clone https://github.com/os-autoinst/openQA
cd openQA
sudo gem install asciidoctor pygments.rb
tools/ci/build-docs
Updated by szarate 9 months ago · Edited
Something else is missing:
The bundle install is happening because asciidoctor could not be found, and that's a different issue, but not because of this script (tools/generate-docs).
Since it was already present before that pr was merged; My money is that something changed for the PDF generation, and asciidoctor-pdf
is not available anymore. At this point, we could rely on the HTML-only format and remove the need for distributing a PDF.
squamata@f5be1bfa2cdf:/opt/testing_area/openQA> ag tools/generate-documentation
tools/ci/build-docs
7: bash -xe tools/generate-documentation
12: bash -xe tools/generate-documentation https://token@github.com/os-autoinst-bot/openQA.git gh-pages-"$(date +%y%m%d%H%M%S)"
tools/generate-documentation
19:# PUBLISH=1 tools/generate-documentation https://github.com/andrii-suse/openQA.git gh-pages
20:# PUBLISH=1 GITHUB_TOKEN=xxxx271e PULL_REQUEST_USER=andrii-suse tools/generate-documentation https://token@github.com/os-autoinst-bot/openQA.git gh-pages-$(date +%y%m%d%H%M%S)
okurz wrote in #note-2:
maybe this is related to https://github.com/os-autoinst/openQA/pull/5389 ?
sudo zypper -n in -C 'rubygem(asciidoctor)' 'perl(Pod::AsciiDoctor)' git-core git clone https://github.com/os-autoinst/openQA cd openQA sudo gem install asciidoctor pygments.rb tools/ci/build-docs
Updated by okurz 9 months ago
- Subject changed from openQA nightly documentation build CI jobs fail with "ERROR: Error installing asciidoctor-pdf: /usr/bin/ruby.ruby2.5…can't find header files for ruby", possibly needs update to more recent ruby version? to openQA nightly documentation build CI jobs fail with "ERROR: Error installing asciidoctor-pdf: /usr/bin/ruby.ruby2.5…can't find header files for ruby", possibly needs update to more recent ruby version? size:S
- Description updated (diff)
- Due date deleted (
2024-03-20) - Status changed from Feedback to Workable
- Assignee deleted (
okurz)
Updated by jbaier_cz 9 months ago
- Status changed from Workable to In Progress
okurz wrote in #note-2:
maybe this is related to https://github.com/os-autoinst/openQA/pull/5389 ?
Probably not related as we are still dealing with ruby inside the devel/openqa/ci/containers/base
container. Having Leap as a base does not help but seems not to be the main issue here.
szarate wrote in #note-4:
The bundle install is happening because asciidoctor could not be found, and that's a different issue, but not because of this script (tools/generate-docs).
Please note that tools/generate-docs
script is not used at all in CirleCI context, there is tools/ci/build-docs
as the main entry point which is invoking tools/generate-documentation
.
Since it was already present before that pr was merged; My money is that something changed for the PDF generation, and
asciidoctor-pdf
is not available anymore. At this point, we could rely on the HTML-only format and remove the need for distributing a PDF.
Nope, you lost your money. This has nothing to do with the asciidoctor-pdf directly, one of its dependencies (bigdecimal) needs to build a native extension and hence needs the ruby devel headers. See https://app.circleci.com/pipelines/github/os-autoinst/openQA/13086/workflows/c5beef2e-d0f1-4516-93cd-552ea903e83f/jobs/122001?invite=true#step-109-5806_87
Fetching: bigdecimal-3.1.6.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing asciidoctor-pdf:
ERROR: Failed to build gem native extension.
current directory: /home/squamata/project/.gem/gems/bigdecimal-3.1.6/ext/bigdecimal
/usr/bin/ruby.ruby2.5 -r ./siteconf20240306-923-t3r9gw.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib64/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /home/squamata/project/.gem/gems/bigdecimal-3.1.6 for inspection.
Results logged to /home/squamata/project/.gem/extensions/x86_64-linux/2.5.0/bigdecimal-3.1.6/gem_make.out
The core of the problem is actually a new version of ttfunk from March 5th which added the dependency for bigdecimal (which needs to compile) and it also dropped support for Ruby 2.5 (now 2.7 is the new minimal version). The simplest solution is to keep the version pinned to 1.7.0 (as was done for other gems). Alternative solution provided in https://github.com/os-autoinst/openQA/pull/5503
Updated by szarate 9 months ago
Please note that
tools/generate-docs
script is not used at all in CirleCI context, there istools/ci/build-docs
as the main entry point which is invokingtools/generate-documentation
.
That was more to @okurz, as he was pointing to the wrong place
Since it was already present before that pr was merged; My money is that something changed for the PDF generation, and
asciidoctor-pdf
is not available anymore. At this point, we could rely on the HTML-only format and remove the need for distributing a PDF.Nope, you lost your money. This has nothing to do with the asciidoctor-pdf directly, one of its dependencies (bigdecimal) needs to build a native extension and hence needs the ruby devel headers. See https://app.circleci.com/pipelines/github/os-autoinst/openQA/13086/workflows/c5beef2e-d0f1-4516-93cd-552ea903e83f/jobs/122001?invite=true#step-109-5806_87
Fetching: bigdecimal-3.1.6.gem (100%) Building native extensions. This could take a while... ERROR: Error installing asciidoctor-pdf: ERROR: Failed to build gem native extension.
This is exacly my point @jbaier_cz, something changed with asciidoctor-pdf; I don't really need to split hairs here :P. And as mentioned, at this point, I think the pdf generation can be dropped altogether; less code to maintain after all, and no need to install exta gems (so only one workflow exists)
Updated by jbaier_cz 9 months ago
szarate wrote in #note-8:
This is exacly my point @jbaier_cz, something changed with asciidoctor-pdf; I don't really need to split hairs here :P. And as mentioned, at this point, I think the pdf generation can be dropped altogether; less code to maintain after all, and no need to install exta gems (so only one workflow exists)
No, I do not believe in transitivity in this case. Nothing changed in asciidoctor-pdf; someone made a new version of something which is used by asciidoctor-pdf (and the change itself is probably not even used)... but nevertheless that's not important, the problem was in the ruby stack, yes.
I agree that we should drop the PDF generation once the effort to fix it outweighs the effort to remove it. But unless we change the documentation format we still need the ruby stack and some gems, so it will be only a few gems less. Not a big code change.
Updated by openqa_review 9 months ago
- Due date set to 2024-03-22
Setting due date based on mean cycle time of SUSE QE Tools
Updated by szarate 9 months ago
jbaier_cz wrote in #note-9:
I agree that we should drop the PDF generation once the effort to fix it outweighs the effort to remove it. But unless we change the documentation format we still need the ruby stack and some gems, so it will be only a few gems less. Not a big code change.
The thing is we have two ways of documentation generation, i'd argue that the pdf generation for the openqa documentation (not the testapi) is not necessarily useful anymore (I can't even remember why I enabled it)
It is clear now and eventually, we can circle back to drop (the generation of documentation in a single pdf page) in favor of generating the documentation using just the Ruby stack (i.e no need for zypper in asciidoctor) and for os-autoinst (testapi) to keep using the Perl module to distribute with the package in case some user needs it.
After all, users don't seem to go through the PDF, but rather go through the HTML (IBM, and Gnome at least)
Updated by livdywan 9 months ago
- Status changed from In Progress to Feedback
The core of the problem is actually a new version of ttfunk from March 5th which added the dependency for bigdecimal (which needs to compile) and it also dropped support for Ruby 2.5 (now 2.7 is the new minimal version). The simplest solution is to keep the version pinned to 1.7.0 (as was done for other gems). Alternative solution provided in https://github.com/os-autoinst/openQA/pull/5503
The alternative solution was merged.