tidy_ffi
tidy_ffi copied to clipboard
Support Debian 10 out-of-the-box
Hi, currently I have to set the library_path for getting it to work with Debian 10:
TidyFFI.library_path = Dir['/usr/lib/x86_64-linux-gnu/libtidy.so*'].first
Maybe it would be interesting to add support for Debian 10 out-of-the-box, since it's a very popular Linux distribution.
Currently this is the path tried by tidy_ffi:
https://github.com/libc/tidy_ffi/blob/master/lib/tidy_ffi/lib_tidy.rb#L8
LIB_NAME = 'tidy'.freeze
PATHS = Array([LIB_NAME] + Dir['/{opt,usr}/{,local/}lib{,64}/libtidy{,-*}.{dylib,so*}']).freeze
Maybe we could try changing it to:
LIB_NAME = 'tidy'.freeze
PATHS = Array([LIB_NAME] + Dir['/{opt,usr}/{,local/}lib{,64}/{,x86_64-linux-gnu/}libtidy{,-*}.{dylib,so*}']).freeze
I didn't submit a PR because I'm not sure there would be a better way to test for such paths.
Thanks for tidy_ffi
!
:wave:
:information_source: This problem is for example present on official ruby docker image (in my case Ruby 2.5.7) since it is Debian 10 based.
@rosenfeld would you mind to open pull request as you suggested?
Sure, I will download a Docker image based on Debian 10 and once I make sure the suggested patch works, I'll send the pull request.
Hello,
I just released version 1.0.1 that should fix this problem. Lemme know if it doesn't.
Thank you for reporting this and submitting the Pull Request.