Mini_suffix and Freebsd


(Roman Teuk) #1

Hi! I use Discourse from sources on FreeBSD. Everything was file until I upgraded it to latest version which uses ‘mini_suffix’ gem. Seems that ‘mini_suffux’ includes precompiled libpsl library for Linux and OSX only.

/usr/local/lib/ruby/gems/2.3/gems/ffi-1.9.18/lib/ffi/library.rb:147:in `block in ffi_lib': Could not open library '/usr/local/lib/ruby/gems/2.3/gems/mini_suffix-0.3.0/vendor/': Shared object "" not found, required by "". (LoadError)

Is there any chance to make it working on FreeBSD?

(Rafael dos Santos Silva) #2

Can you compile and supply the dep yourself? Also, you should be using Ruby 2.4 on latest Discourse.

(Roman Teuk) #3

I have installed dns/libpsl port and replaced vendor/ inside gem with /usr/local/lib/
It seems to work now.
Thank you

(Sam Saffron) #4

Our intention is for the gem to always work great BSDs, and PRs to the gem directly to improve its compatibility would be greatly appreciated.

(Matt Palmer) #5

Not vendoring Linux-specific shared libraries would probably be a winning first step…

(Sam Saffron) #6

Yeah the first step here is following a pattern more similar to what libv8 gem does where we push a “general” gem that compiles from source and then a platform specific gems for each platform.