libvips / php-vips

php binding for libvips
MIT License
615 stars 25 forks source link

Version incompatibility with VIPS < 8.9.0 - FFI\Exception: Failed resolving C function 'vips_error_buffer_copy' in /app/app/vendor/jcupitt/vips/src/FFI.php:731 #162

Closed Waschnick closed 2 years ago

Waschnick commented 2 years ago

Hey! My issue is actually the same as #145, but I can't resolve it.

Error Message

[SYSLOG] [333]: [172.18.0.1][-][-][error][FFI\Exception] FFI\Exception: Failed resolving C function 'vips_error_buffer_copy' in /app/app/vendor/jcupitt/vips/src/FFI.php:731
[SYSLOG] [333]: Stack trace:
[SYSLOG] [333]: #0 /app/app/vendor/jcupitt/vips/src/FFI.php(731): FFI::cdef('// we need the ...', 'libvips.so.42')

System

I'm just trying to call $image = Vips\Image::thumbnail('../some-image.svg', 128);

Steps I tried

AFAIK this means that vips_error_buffer_copy is not available in the loaded C-ABI library. From the release logs of vips that method was added in VIPS 8.9.0, but your documentation says php-vips is for vips 8.7. For me this looks like a version mismatch.

jcupitt commented 2 years ago

Hi @Waschnick,

Thanks for the report -- this sounds like a bug.

It doesn't look like this function was ever used, so I think you can just delete the line in FFI.php. Does that fix this issue?

jcupitt commented 2 years ago

... I made a tiny PR for this. Any testing would be great.

jcupitt commented 2 years ago

OK, merged to master. Thanks!