bleskodev / rubyripper

Fork of the original rubyripper from code.google.com/p/rubyripper + some bugs fixes
125 stars 21 forks source link

New cairo problem? #638

Closed jdrexmo closed 1 year ago

jdrexmo commented 1 year ago

GUI implementation wouldn't run today. Attempting to run it from terminal, whether rrip_gui or direct from .bin/...., yields:

/usr/lib/ruby/gems/3.0.0/extensions/x86_64-linux/3.0.0/cairo-1.17.8/cairo.so: undefined symbol: cairo_tee_surface_index - /usr/lib/ruby/gems/3.0.0/extensions/x86_64-linux/3.0.0/cairo-1.17.8/cairo.so
The ruby-gtk3 library (or one of its dependencies) could not be found. Is it correctly installed?

Tried downgrading cairo to a few different old versions with no luck.

bleskodev commented 1 year ago

Hi, yes I can confirm the problem. I'm investigating the source of the problem and the possible fixes (it is not rubyripper bug per se). I don't know which distro you are using, but on Archlinux the problem seems to appear with libcairo 1.17.8-1 (change in the feature set with which libcairo is compiled -> tee surface has been disabled). It seems that ruby-cairo does not take this change into account. To be continued...

bleskodev commented 1 year ago

ok, so, the problem is that ruby-cairo arch package is older than libcairo package, and ruby-cairo package is compiled with old compilation flags (thinking that tee surface is still enabled). The workaround, until the ruby-cairo package is updated, is to install cairo package via gem such as:

gem install --user-install cairo

This should fix the problem, because user cairo gem will take precedence over system installed gem (ruby-cairo). I will report the bug to the package maintainer. I hope this helps.

jdrexmo commented 1 year ago

Yup, that works!

bleskodev commented 1 year ago

There is a new ruby-cairo version (1.17.8-2) available. It fixes the problem for me. You can remove the user cairo gem. Cheers!