Giter Site home page Giter Site logo

Comments (13)

hadees avatar hadees commented on July 21, 2024 5

So replacing the buildpack with https://github.com/brandoncc/heroku-buildpack-vips#6d1895def2c82371e3c2c64ae2ec07ab5be1fccd also worked for me, following Heroku's documentation.

Maybe we can use this issue now as a way to know when I can unpin this? Seems like you wouldn't want to do this forever.

from heroku-buildpack-vips.

jon-sully avatar jon-sully commented on July 21, 2024 1

I was wrong 😄. Just spent an hour playing with the buildpack and while I had initially thought that I could leave libpoppler out of the Aptfile because my app doesn't do any work with pdfs, that's what was causing this error. Added it to the Aptfile (still with libglib2.0-0 and libglib2.0-dev) and things worked just fine. Thanks y'all!

EDIT: Hate to be the guy that doesn't follow the instructions..

you must install these packages in your heroku application

then makes suggestions 🤦 but it may be worth calling out in the README that libpoppler is required even if you have no intention to work with Pdfs for smart-alecs like me that think it'll just work without. 😅

from heroku-buildpack-vips.

dp6ai avatar dp6ai commented on July 21, 2024

I've tried explicitly stating this commit in the app.json and its still failing.

Edited

I can confirm the above commit does solve the problem for me. Thanks

I get 1000's of lines like this

-----> Running test command `bundle exec rspec`...
...F/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/

/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:51: warning: previous definition of G_FREE was here
/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:59: warning: already initialized constant GLib::LOG_FLAG_RECURSION
/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:59: warning: previous definition of LOG_FLAG_RECURSION was here
/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:60: warning: already initialized constant GLib::LOG_FLAG_FATAL
/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:60: warning: previous definition of LOG_FLAG_FATAL was here
/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:63: warning: already initialized constant GLib::LOG_LEVEL_ERROR
/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:63: warning: previous definition of LOG_LEVEL_ERROR was here
/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:64: warning: already initialized constant GLib::LOG_LEVEL_CRITICAL
/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:64: warning: previous definition of LOG_LEVEL_CRITICAL was here
/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:65: warning: already initialized constant GLib::LOG_LEVEL_WARNING
/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:65: warning: previous definition of LOG_LEVEL_WARNING was here
/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:66: warning: already initialized constant GLib::LOG_LEVEL_MESSAGE
/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:66: warning: previous definition of LOG_LEVEL_MESSAGE was here
/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:67: warning: already initialized constant GLib::LOG_LEVEL_INFO
/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:67: warning: previous definition of LOG_LEVEL_INFO was here
/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:68: warning: already initialized constant GLib::LOG_LEVEL_DEBUG
/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:68: warning: previous definition of LOG_LEVEL_DEBUG was here
/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:71: warning: already initialized constant GLib::GLIB_TO_SEVERITY
/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:71: warning: previous definition of GLIB_TO_SEVERITY was here
/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:86: warning: already initialized constant GLib::LOG_HANDLER
/app/vendor/bundle/ruby/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:86: warning: previous definition of LOG_HANDLER was here

followed by

Failures:
  1) Browsing An admin has the correct navigation
     Failure/Error: image.respond_to?(:variant) ? Rails.application.routes.url_helpers.rails_representation_url(image.variant(attributes).processed, only_path: true) : image_path("os_alternative.png")
     LoadError:
       Could not open library 'vips.so.42': vips.so.42: cannot open shared object file: No such file or directory.
       Could not open library 'libvips.so.42': libwebpmux.so.3: cannot open shared object file: No such file or director

from heroku-buildpack-vips.

dp6ai avatar dp6ai commented on July 21, 2024

and on the server

~ $ which vips
/app/vendor/vips/bin/vips
~ $ vips --version
vips: error while loading shared libraries: libwebpmux.so.3: cannot open shared object file: No such file or directory
~ $

from heroku-buildpack-vips.

hadees avatar hadees commented on July 21, 2024

I can't deploy, getting similar problems.

remote:  !
remote:  !     Could not detect rake tasks
remote:  !     ensure you can run `$ bundle exec rake -P` against your app
remote:  !     and using the production group of your Gemfile.
remote:  !     rake aborted!
remote:  !     LoadError: Could not open library 'vips.so.42': vips.so.42: cannot open shared object file: No such file or directory.
remote:  !     Could not open library 'libvips.so.42': libwebpmux.so.3: cannot open shared object file: No such file or directory
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/ffi-1.13.1/lib/ffi/library.rb:145:in `block in ffi_lib'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/ffi-1.13.1/lib/ffi/library.rb:99:in `map'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/ffi-1.13.1/lib/ffi/library.rb:99:in `ffi_lib'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/ruby-vips-2.0.17/lib/vips.rb:528:in `<module:Vips>'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/ruby-vips-2.0.17/lib/vips.rb:525:in `<main>'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies.rb:324:in `block in require'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies.rb:291:in `load_dependency'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies.rb:324:in `require'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/ruby-vips-2.0.17/lib/ruby-vips.rb:1:in `<main>'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
remote:  !     /tmp/build_9927a046/vendor/ruby-2.7.1/lib/ruby/2.7.0/bundler/runtime.rb:74:in `block (2 levels) in require'
remote:  !     /tmp/build_9927a046/vendor/ruby-2.7.1/lib/ruby/2.7.0/bundler/runtime.rb:69:in `each'
remote:  !     /tmp/build_9927a046/vendor/ruby-2.7.1/lib/ruby/2.7.0/bundler/runtime.rb:69:in `block in require'
remote:  !     /tmp/build_9927a046/vendor/ruby-2.7.1/lib/ruby/2.7.0/bundler/runtime.rb:58:in `each'
remote:  !     /tmp/build_9927a046/vendor/ruby-2.7.1/lib/ruby/2.7.0/bundler/runtime.rb:58:in `require'
remote:  !     /tmp/build_9927a046/vendor/ruby-2.7.1/lib/ruby/2.7.0/bundler.rb:174:in `require'
remote:  !     /tmp/build_9927a046/config/application.rb:17:in `<main>'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies.rb:324:in `block in require'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies.rb:291:in `load_dependency'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies.rb:324:in `require'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:53:in `require_relative'
remote:  !     /tmp/build_9927a046/Rakefile:6:in `<main>'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies.rb:318:in `block in load'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies.rb:291:in `load_dependency'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies.rb:318:in `load'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/rake_module.rb:29:in `load_rakefile'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:703:in `raw_load_rakefile'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:104:in `block in load_rakefile'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:103:in `load_rakefile'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:82:in `block in run'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
remote:  !     /tmp/build_9927a046/vendor/bundle/ruby/2.7.0/gems/rake-13.0.1/lib/rake/application.rb:80:in `run'
remote:  !     /tmp/build_9927a046/bin/rake:9:in `<main>'
remote:  !

from heroku-buildpack-vips.

brandoncc avatar brandoncc commented on July 21, 2024

I just saw this in our own app too, sorry! I'm not sure what broke. Working on it now.

from heroku-buildpack-vips.

brandoncc avatar brandoncc commented on July 21, 2024

Sorry everyone, I didn't think there would be any issues because it built fine. I reverted my changes for now, and will test them before putting those changes back in master. Feel free to keep your apps pinned to the revisions, but that will keep you from getting version updates :-/

I'm going to try to have this resolved today.

from heroku-buildpack-vips.

jonknapp avatar jonknapp commented on July 21, 2024

For what it's worth, I just did a deploy with the following buildpacks and did not have to pin to a specific release:

  1. heroku-community/apt
  2. https://github.com/brandoncc/heroku-buildpack-vips

Aptfile has:

libglib2.0-0
libglib2.0-dev
libpoppler-glib8

I don't believe other buildpacks impacted anything, but just in case:

  1. https://github.com/heroku/heroku-buildpack-activestorage-preview
  2. heroku/nodejs
  3. heroku/ruby

from heroku-buildpack-vips.

brandoncc avatar brandoncc commented on July 21, 2024

Thanks @jonknapp. I reverted the breaking changes, so that all sounds right. I haven't had a chance yet to dig into making the originally-intended fix again yet.

from heroku-buildpack-vips.

hogeman-hoges avatar hogeman-hoges commented on July 21, 2024

Note: This buildpack is still broken. Regarding the above:

For what it's worth, I just did a deploy with the following buildpacks and did not have to pin to a specific release:

    heroku-community/apt
    https://github.com/brandoncc/heroku-buildpack-vips

Aptfile has:

libglib2.0-0
libglib2.0-dev
libpoppler-glib8

I don't believe other buildpacks impacted anything, but just in case:

    https://github.com/heroku/heroku-buildpack-activestorage-preview
    heroku/nodejs
    heroku/ruby

It ONLY works if heroku/nodejs is set as a buildpack before heroku/ruby. When it isn't, LD_LIBRARY_PATH does not include the proper vips vendor lib paths, leading to the shared library error. This must be a problem somewhere in the code where the path is either incorrectly set, or unset after some changes.

from heroku-buildpack-vips.

brandoncc avatar brandoncc commented on July 21, 2024

That is very interesting! I actually have heroku/nodejs setup exactly as you mentioned in my projects, so I didn't know about this. Thanks for bringing it up. I'll put it on my todo list to work on it and see if I can identify the problem. I'll try to do it on Sunday.

from heroku-buildpack-vips.

brandoncc avatar brandoncc commented on July 21, 2024

I don't think this is a problem anymore, because I'm using the buildpack on servers without the nodejs buildpack. I'm going to close the issue, but feel free to re-open it if the problem resurfaces.

from heroku-buildpack-vips.

jon-sully avatar jon-sully commented on July 21, 2024

Hey @brandoncc! I think there is still an issue with this, though I'm not sure exactly what it is yet. I'm chatting with John Cupitt over on libvips/ruby-vips#219 about it too but I received this very same error on a new install of the buildpack yesterday. Had to end up going with a pure Aptfile approach that makes a massive slug, but let me go ahead and spin up a new staging app with the buildpack again to see if I can repro the error to give you some context.

from heroku-buildpack-vips.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.