tamatebako/tebako

Psych 5.x support

Closed this issue · 2 comments

Psych gem 5.x abandons --enable-bundled-libyaml configuration option in this commit: ruby/psych@447d372

In 5.x it looks (by default ?) for locally installed libyaml and it causes failure for all tebako packages.

re metanorma/packed-mn#198

According to psych documentation (https://github.com/ruby/psych) they support static builds from sources

Psych supported the static build with specific version of libyaml sources. You can build psych with libyaml-0.2.5 like this.

gem install psych -- --with-libyaml-source-dir=/path/to/libyaml-0.2.5

It looks like Ruby has general limitation - if there is statically linked native extension it is not possible to load newer version.

In Psych case Ruby 2.7, 3.0, 3.1 comes with Psych 3, so it is not possible to use Psych 5 that has upgraded native extension. However, it is possible to use Psych 4 that uses the same native extension as Psych 3

Ruby 3.2 come with bundled Psych 5 so we apply different build options when 3.2 is used for Tebako packaging.