riscv / docs-spec-template

https://lists.riscv.org/g/sig-documentation
Creative Commons Attribution 4.0 International
18 stars 19 forks source link

build-pdf fails in 'Setup Ruby and Gemfile content' step #6

Closed jjscheel closed 1 year ago

jjscheel commented 1 year ago

The following problems with building asciidoctor PDFs has been seen in the build-pdf workflow.

To identify the error, look for the following error details inside the "bundle install" twistie:

linking shared-object mathematical/mathematical.so /usr/bin/ld: cannot find -lwebp: No such file or directory collect2: error: ld returned 1 exit status make: *** [Makefile:262: mathematical.so] Error 1

It's most commonly seen (at this time) on local forks where "ubuntu-latest" is now running 22.04, instead of 20.04.

The bug is being investigated but the final fix is not yet available due to intricacies of building the gem mathematical file.

The simplest work around at this time is to hard-code the version statement in your .github/workflows/build-pdf.yml file from:

runs-on: ubuntu-latest

to:

runs-on: ubuntu-20.04

This statement should be found on or around line 22 of the file.

jjscheel commented 1 year ago

Commit f8f740c73a52281b387538c72d37fc2668bc55f1 (Explicitly restrict to 20.04) provides the work-around for now.

More investigation into the failure is occurring.

wmat commented 1 year ago

I believe this is fixed with my last merge. I added libwebp-dev to the dependencies file and bumped ubuntu back up to ubuntu-21.04.

jjscheel commented 1 year ago

I've also seen a similar failure with local builds (not github actions) on 22.04 where the failing library is libzstd. Adding libzstd-dev fixed this too. I'll commit a change for this for good measure.