diff --git a/CHANGELOG.md b/CHANGELOG.md index 54c5b59..f830578 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## master +* try to catch and warn about ffi startup failures [paulschreiber] + ## Version 2.3.0 (2025-12-10) * move library_name out of the global namespace and into FFI [jcupitt] diff --git a/README.md b/README.md index 1e9f4c2..490d045 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,11 @@ gem install ruby-vips Or include `gem "ruby-vips"` in your gemfile. +ruby-vips uses FFI to call into the libvips binary, and this needs +write-execute permission to construct function wrappers. If ruby-vips fails to +start, check your systemd settings and make sure `MemoryDenyWriteExecute` is not +enabled, see https://github.com/libvips/ruby-vips/issues/439. + ## Install on Windows The gemspec will pull in the msys libvips for you, so all you need is: diff --git a/VERSION b/VERSION index 276cbf9..2bf1c1c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.3.0 +2.3.1 diff --git a/lib/vips.rb b/lib/vips.rb index ac0b06e..8e30b3b 100644 --- a/lib/vips.rb +++ b/lib/vips.rb @@ -52,6 +52,14 @@ module Vips @@is_unified = true rescue FFI::NotFoundError @@is_unified = false + rescue RuntimeError + $stderr.puts "ruby-vips RuntimeError" + $stderr.puts "\tFFI has been able to load a library, but unable to call" + $stderr.puts "\ta known function in that library. You may have" + $stderr.puts "\twrite-execute protection enabled, preventing FFI from" + $stderr.puts "\tmaking wrappers for function dispatch." + $stderr.puts "\tSee https://github.com/libvips/ruby-vips/issues/439" + raise end def self.unified? diff --git a/lib/vips/version.rb b/lib/vips/version.rb index 401e0b9..714c62f 100644 --- a/lib/vips/version.rb +++ b/lib/vips/version.rb @@ -1,3 +1,3 @@ module Vips - VERSION = "2.3.0" + VERSION = "2.3.1" end