libvips / php-vips

php binding for libvips
MIT License
606 stars 24 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 1 year ago

Waschnick commented 1 year 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 1 year 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 1 year ago

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

jcupitt commented 1 year ago

OK, merged to master. Thanks!