-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Installing libvips on Heroku #57
Comments
Very likely possible, yes, but I've yet to try it. As I mentioned in #42 (comment) there's a Heroku Buildpack at https://github.com/alex88/heroku-buildpack-vips that is only slightly out of date with respect to required version numbers. Perhaps send a PR to upgrade to libvips 7.38.5 and liborc 0.4.19. |
Ah thanks. Will give that a try. |
Hi lovell, So I've given this another go. I've upgraded the buildpack to 7.38.5 and 0.4.19 as above. The buildpack can be found here (https://github.com/dbousamra/heroku-buildpack-vips). When I run:
I am greeted with this error: ~ $ npm install sharp
npm WARN package.json mongoose-schema@0.0.6 No repository field.
npm WARN package.json path@0.4.9 path is also the name of a node core module.
> sharp@0.5.0 install /app/node_modules/sharp
> node-gyp rebuild
Package vips was not found in the pkg-config search path.
Perhaps you should add the directory containing `vips.pc'
to the PKG_CONFIG_PATH environment variable
No package 'vips' found
gyp: Call to 'PKG_CONFIG_PATH="/usr/local/Library/ENV/pkgconfig/10.8:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig" pkg-config --libs vips' returned exit status 1. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/app/vendor/node/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 3.8.11-ec2
gyp ERR! command "node" "/app/vendor/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /app/node_modules/sharp
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
npm ERR! sharp@0.5.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp@0.5.0 install script.
npm ERR! This is most likely a problem with the sharp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls sharp
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.8.11-ec2
npm ERR! command "/app/vendor/node/bin/node" "/app/vendor/node/bin/npm" "install" "sharp"
npm ERR! cwd /app
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /app/npm-debug.log
npm ERR! not ok code 0 Any ideas? |
That buildpack looks like it uses It also looks like it attempts to set up To help me confirm this, what does the following return, if anything?
I'm hoping this provides the path automagically. If so, this should be a one-line config fix to the binding.gyp file to get you up and running. |
Echoing
Notice the |
The |
Ah cool. Appreciate the help! On Mon, Jun 16, 2014 at 8:02 AM, Lovell Fuller notifications@github.com
|
Please can you try installing sharp on Heroku using the master branch:
If this works, are you OK with me linking to your Heroku buildpack in sharp's README? |
Bit closer. For some reason it's complaining I don't have
|
Getting closer... try adding the |
No go. Same error sorry. |
As author of the original buildpack, I wonder if @alex88 is able to help us here? I suspect Heroku will be providing a new stack soon, hopefully based on Ubuntu 14.04 LTS, which will make this significantly easier. |
Hi guys, seems strange it requires fftw3. Btw I'm going to update the buildpack with the latest 7.40 vips version and I'll try to add fftw3 support to see if that fixes it, just give me some hours. |
Hi @alex88, thank you for offering to help us here, this is very much appreciated.
The libvips-dev package in Ubuntu 14.04 has libfftw3-dev as a required dependency. The vips package in Homebrew has fftw as a recommended dependency. There's logic in libvips' source that checks whether we HAVE_FFTW, which suggests it is optional when compiling from source. There's a certain irony here in that AFAIK sharp doesn't use any feature of libvips that depends on Fourier transformations. I will at least remove it as a dependency from the manual compilation steps. |
I've updated the library to 7.40.3 including fftw 3.3.4, could you please try that and see if the problem still occurs? |
Fast work @alex88, thank you. Over to you @dbousamra. @alex88 as an aside, you may want to upgrade liborc to the latest 0.4.21 as versions .18 and .19 both have pretty serious memory leak/overflow bugs. |
@lovell ok I'll do that asap, I've some work for my job to finish this weekend so maybe next week, I'm having serious dependency issues trying to install libgsf too (required to use vips dzsave) so I'll do a release with all the updates! Thanks for the tips |
Boom! All working! So in the sharp README, we should link the Alex's buildpack repo, not my fork. Thanks heaps guys. Can switch from gm to sharp now. |
@lovell a tip, where you've found .21 version of orc? I can see just .18 here http://code.entropywave.com/download/orc/ |
@lovell ok found them, problem is, heroku ships with autoconf 2.65 and 2.68 is required |
Thanks again @alex88, I've added a link in the README to your buildpack. liborc version 0.4.18 is the least bad of the pre .21 versions. Probably best to wait until Heroku adds a new stack rather then dive deeper into that particular dependency hell. |
Thanks for the mention! |
Any idea if this is possible?
The text was updated successfully, but these errors were encountered: