tidy_ffi icon indicating copy to clipboard operation
tidy_ffi copied to clipboard

Support Debian 10 out-of-the-box

Open rosenfeld opened this issue 4 years ago • 3 comments

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!

rosenfeld avatar Mar 12 '20 19:03 rosenfeld

: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?

simi avatar Apr 13 '20 17:04 simi

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.

rosenfeld avatar Apr 14 '20 01:04 rosenfeld

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.

libc avatar May 05 '20 10:05 libc