badboy / mdbook-mermaid

A preprocessor for mdbook to add mermaid support
Mozilla Public License 2.0
306 stars 32 forks source link

Precompiled `mdbook-mermaid` executable requires newer glibc version #29

Closed jontze closed 1 year ago

jontze commented 1 year ago

First of all thank you for the amazing project! :)

I recently noticed that the newest v0.12.2 release of mdbook-mermaid requires a newer glibc version if the precompiled executable attached to the github releases is used (https://github.com/jontze/action-mdbook/issues/290).

This is due to the ubuntu github runner image that is used for compilation. As the deploy.yml workflow uses ubuntu-latest and github is currently in the process of rolling out ubuntu22.04 as latest runner https://github.com/actions/runner-images/issues/6399.

Due to the roll out some workflows with ubuntu-latest still use ubuntu20 and others are already using ubuntu22. This repository uses already the new ubuntu22 version for the workflows.

However, all repos that are still on ubuntu20 and download the precompiled mdbook-mermaid-v0.12.2-x86_64-unknown-linux-gnu binary from the release assets are unable to use the executable as they don't have the required glibc version installed.

mdbook-mermaid: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by mdbook-mermaid)

Steps to reproduce

Example workflow logs: https://github.com/jontze/action-mdbook/actions/runs/3627714992

Suggested Solution I'm not really sure what the cleanest solution might be. In the github issue that tracks the roll out, it's mentioned to hardcode the used ubuntu version to ubuntu20 if any issues occur (https://github.com/actions/runner-images/issues/6399). So to change the used ubuntu version in the deploy workflow might be a possible solution.

I saw that other open source projects also selected this approach, e.g. nushell:

Or we jut do nothing and use the following workarounds during the roll out: