Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install libgvc6 for cedar-16 #17

Closed
wants to merge 12 commits into from
Closed

Conversation

jacobsmith
Copy link

Hello!

I was using this buildpack on Heroku and running in to issues with libgvc6.so not being present (or able to be located properly).

I stole some of https://github.com/weibeld/heroku-buildpack-graphviz to manage installing that dependency, as well as adding the install directory to the LD_LIBRARY variable. After doing that, imagemagick was working properly for me on Heroku.

(It's completely possible that I had a different issue or that libgvc6.so is actually present on Heroku Cedar-16 and I just didn't configure something properly - I wasn't able to find any concrete documentation on whether that library was pre-installed or not, but I can confirm that this PR is working properly on my own app).

@jayzes
Copy link

jayzes commented Aug 21, 2017

Hey there, thanks for the PR (and sorry for the delayed review). Does this change only work on the new stack, or will it work on cedar-14 apps as well?

@jolim
Copy link

jolim commented Oct 10, 2017

I tried it and I was unable to get it working. It compiled with this fix, but heroku run convert --version showed the built-in imagemagick version, not 6.9.5-10.

I did a heroku repo:purge_cache afterwards to resolve an issue with downgrading from Heroku-16 to Cedar-14, in case anyone runs into a strange "missing libIlmImf-2_2.so.22" error in mini-magick.

@MatzFan
Copy link

MatzFan commented Oct 13, 2017

Just come across exactly the same issue with a Ruby app using ImageMagick on heroku-16 stack:
/app/vendor/bundle/ruby/2.4.0/gems/rmagick-2.16.0/lib/rmagick_internal.rb:12:in 'require': libgvc.so.6: cannot open shared object file: No such file or directory

According to Heroku's docs libgvc6 is not available at runtime on heroku-16 (it was on cedar-14).

Moving my app to the old stack as workaround for now.

add some additional debug echo statements
trying to debug...
@DanMegaGamer
Copy link

DanMegaGamer commented Nov 23, 2017

I managed to get the buildpack working on heroku-16 by including the GraphViz buildpack, as mentioned in OP's comment.

app.json

 "buildpacks": [
    { "url": "https://github.com/heroku/heroku-buildpack-ruby" },
    { "url": "https://github.com/ello/heroku-buildpack-imagemagick" },
    { "url": "https://github.com/weibeld/heroku-buildpack-graphviz" }
  ],

@Kjir
Copy link

Kjir commented Dec 15, 2017

We had the same issue and solved it in the same way: adding the graphviz buildpack.

If merging this PR is out of the question to keep compatibility with cedar-14, at the very least please indicate this workaround in the README (in the install instructions).

@jayzes
Copy link

jayzes commented Dec 15, 2017

Sorry for the delayed response on this one. I'd love to keep compatibility with both stacks if possible -
mostly so we don't accidentally pull the rug out from anyone who's relying on it for a cedar-14 app and just pointed at master.

I'll update the README to mention that workaround. Looking at the imagemagick forums I think we could just pass the --without-gvc flag to the configure command, which would work around the core issue. Anyone have a test app handy that they'd be willing to give that a shot on?

jayzes added a commit that referenced this pull request Dec 15, 2017
einSelbst added a commit to einSelbst/heroku-buildpack-imagemagick that referenced this pull request Jan 10, 2018
@ntilwalli
Copy link

ntilwalli commented Jan 29, 2018

I experienced this issue now and I just tried the fork at https://github.com/einSelbst/heroku-buildpack-imagemagick which adds the --without-gvc flag and it worked for me.

@jayzes jayzes closed this in 1ee9346 Jan 29, 2018
@nursahketene
Copy link

Hi I have tried the workaround of adding https://github.com/weibeld/heroku-buildpack-graphviz to my build packs to solve the issue to upgrade to cedar-16. However that did not resolve the following issue

Error: Command failed: convert: error while loading shared libraries: libIlmImf.so.6: cannot open shared object file: No such file or directory 

I think the following code where it crashes.

    const gm = require('gm').subClass({imageMagick: true});

    gm(buffer)
      .resize(length*2, length*2)
      .quality(77)
      .sharpen(0, 3.0)
      .gravity('Center')
      .extent(length*2, length*2)
      .background(colour)
      .flatten()
      .transparent(colour)
      .write(path, (err) => {
        if (err) {
          return reject(err);
        } else {
          return resolve(path);
        }
      })

The same code works just fine on cedar-14.
Any ideas

henrik added a commit to barsoom/heroku-buildpack-imagemagick that referenced this pull request Sep 5, 2018
@henrik
Copy link

henrik commented Sep 6, 2018

Finally got it working with our fork of heroku-buildpack-imagemagick that has the --without-gvc flag. I also include the graphviz buildpack.

An important thing I had to do was to make sure it actually compiled it anew with that flag rather than restore a previous cached build. I did this by adding "v1" to the end of the cache filename in our fork of the buildpack.

If you don't do that, you may get an old build that is not compiled --without-gvc.

I'm not entirely sure if we needed both that flag and to include the graphviz buildpack, and I'm reluctant to redo the process to find out. Can anyone else clarify if they did both or just one?

EDIT 2019-04-02: Co-workers tried removing the graphviz buildpack and report it works fine without :)

@glennpjones
Copy link

Fixed with dokku on cedar-16 as follows:

  • was already using the graphviz buildpack
  • updated the ello imagemagick buildpack fork to https://github.com/einSelbst/heroku-buildpack-imagemagick
  • on server: dokku repo:purge-cache <app-name> and rebuild the app

@dtobi59
Copy link

dtobi59 commented Dec 31, 2018

Hello, please help am having these error:
error while loading shared libraries: libdjvulibre.so.21: cannot open shared object file: No such file or directory.
see ticket i submitted at Heroku

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

Successfully merging this pull request may close these issues.