Phashion crashed for fingerprint on Ubuntu 22
matthieubrau opened this issue · comments
Hello,
I'm trying to use Phashion on Heroku stack 22 (Ubuntu 22)
ruby => '3.1.2'
rails => '7.0.4'
I'm adding builpacks below :
https://github.com/jayzes/heroku-buildpack-jpegoptim
https://github.com/jayzes/heroku-buildpack-optipng
https://github.com/maximusdominus/heroku-buildpack-imagemagick-webp.git
It was working on Heroku stack 18 (Ubuntu 18)
ruby => '2.6.4'
rails => '5.2.3'
And it's working on my localhost (Ubuntu 18)
Looks depending Ubuntu version...
Here is the error :
When I'm trying to resolve fingerprint I have an error and the console crashed :
ruby: symbol lookup error: /app/vendor/bundle/ruby/3.1.0/gems/phashion-1.2.0/lib/phashion_ext.so: undefined symbol: _ZGVbN2v_cos
Phashion::Image.new(tmp_filename) => works
Phashion::Image.new(tmp_filename).mh_fingerprint => works
Phashion::Image.new(tmp_filename).fingerprint => crashed
Thanks for your help
I'm also seeing this error on ubuntu 22.04 with ruby 2.7.7
When running the tests on the gem (rake test), I get the following error:
./home/deploy/.rvm/rubies/ruby-2.7.7/bin/ruby: symbol lookup error: /home/deploy/phashion/lib/phashion_ext.so: undefined symbol: _ZGVbN2v_cos
rake aborted!
Command failed with status (127): [ruby -w -I"lib:lib:test" /home/deploy/.rvm/gems/ruby-2.7.7/gems/rake-13.0.6/lib/rake/rake_test_loader.rb "test/test_phashion.rb" ]
/home/deploy/.rvm/gems/ruby-2.7.7/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/home/deploy/.rvm/gems/ruby-2.7.7/bin/ruby_executable_hooks:22:in `eval'
/home/deploy/.rvm/gems/ruby-2.7.7/bin/ruby_executable_hooks:22:in `<main>'
Tasks: TOP => test
(See full trace by running task with --trace)
the following commit, in a fork of the project, seems to fix the issue:
https://github.com/secretbenefits/phashion/commit/31c4804131f4f735ffa37973afcca388a7599cb8
@rounders thanks for pointing out the specific issue.
I merged in #94, which contained the -lm
that was linked to.
@matthieubrau are you still having this issue?
@westonplatter I had the same issue under amazonlinux-2023 with Ruby 3.2 but after pulling your changes it is not happening anymore. Can you please publish a new version so I can properly reference the updated gem?
Any updates on creating a new tag? 🥺 🙏
@westonplatter please update the gem in the official rubygems repository, this simple issue keeps repeating itself over the years 🙏
PS: I also addressed some chores present in other issues, I can create a PR if you wish 👍