Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

thumbnail auto_rotate option doesn't work since vips isn't built with libexif #4

Open
mdoyle13 opened this issue Jun 7, 2019 · 8 comments

Comments

@mdoyle13
Copy link

mdoyle13 commented Jun 7, 2019

It's me again :)

I noticed that when compiling vips - its compiled without exif support. Exif support is needed in order for autorotate options when using the thumbnail method.
(libvips/libvips#319)

I tried a few things to no avail and will try again soon to get this working but wanted to put some info here

For sure yum needs to install libexif-devel so vips will build with exif support

Then we need to figure out how to referencethe libexif.so files in the layer files somehow. I'm not aware how to do this at this time but I did try symlinking and copying some libexif.so files into share/lib directory without success.

When loading vips the lambda responds with this error:

"errorMessage": "Could not open library 'vips': vips: cannot open shared object file: No such file or directory.\nCould not open library 'libvips.so': libexif.so.12: cannot open shared object file: No such file or directory",

@metaskills
Copy link
Contributor

Always a joy to hear from you Mike! :)

Please do investigate more and let me know what you find. Maybe even make work in progress pull request that I can checkout and toy around with too.

@metaskills
Copy link
Contributor

I've recently re-done the whole Dockerfile (for Ruby 2.7) which means it should be easier to add this if needed. Take a look.

@rawpixel-vincent
Copy link

got that working with the latest docker image, hope that helps

# install libexif
RUN git clone https://github.com/libexif/libexif.git && \
  cd libexif && \
  autoreconf -i && \
  ./configure --prefix=/opt && \
  make && \
  make install && \
  ldconfig

RUN cp -a /opt/lib/libexif.so* /build/share/lib && \
  cp -a /opt/lib/libexif.so /build/share/lib

@metaskills
Copy link
Contributor

Thanks, mind making a PR to the vips-slim branch? cc @brcarp

@brcarp
Copy link

brcarp commented May 28, 2020

I can add a commit for it. Looking at this though:

RUN cp -a /opt/lib/libexif.so* /build/share/lib &&
cp -a /opt/lib/libexif.so /build/share/lib

I'm not quite sure what that's designed to achieve. If the goal is to handle the symbolic link properly then I think this needs to be written differently, because: the /opt/lib/libexif.so* glob will also grab /opt/lib/libexif.so so perhaps /opt/lib/libexif.so.* is intended; and cp -a used for both would handle symbolic links the same way. Is there more context for this, @rawpixel-vincent ?

@brcarp
Copy link

brcarp commented May 28, 2020

Also, after reviewing the dependencies, libexif.so.12()(64bit) is already a dependency for vips.x86_64 0:8.9.2-1.lambda2. In the current build in the vips-slim branch, libexif.so.12.3.3 is installed into the lib directory with libexif.so.12 linked to it. So it's possible that this isn't an issue in the vips-slim branch, but someone would have to test that with a vipsthumbnail example to confirm.

@rawpixel-vincent
Copy link

rawpixel-vincent commented May 28, 2020

Well I went with a complete different solution since I use python 3.7, and I can definitely post the dockerfile here tmr, but at the end we had some issue with this build you are proposing. And I'm not good at devops so was just trying to help here and you know better for sure.

@metaskills
Copy link
Contributor

And I'm not good at devops so was just trying to help here and you know better for sure.

And we appreciate that!!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants