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

Outdated version of downstream sharp-phash #2904

Closed
VySellathurai opened this issue Sep 22, 2021 · 7 comments
Closed

Outdated version of downstream sharp-phash #2904

VySellathurai opened this issue Sep 22, 2021 · 7 comments
Labels

Comments

@VySellathurai
Copy link

VySellathurai commented Sep 22, 2021

Are you using the latest version? Is the version currently in use as reported by npm ls sharp the same as the latest version as reported by npm view sharp dist-tags.latest?
I use the lib [email protected] that use [email protected]

What are the steps to reproduce?
This lib works perfectly well on classical AWS processor but I tried to run my code on AWS Graviton with ARM Neoverse 64 bits and I face this exception :

Input buffer contains unsupported image format
  • Note that I install libvips v8.9.1 in global

The code of sharp-phash is trying to use sharp on image as you can see :

module.exports = async function phash(image, opts = { sharp: sharp }) {
  const data = await opts.sharp(image)

source code

Are you able to provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem?
No

Are you able to provide a sample image that helps explain the problem?
No

What is the output of running npx envinfo --binaries --system?

npx envinfo --binaries --system
npx: installed 1 in 3.953s

  System:
    OS: Linux 4.18 CentOS Linux 8
    CPU: (2) arm64 unknown
    Memory: 135.25 MB / 1.42 GB
    Container: Yes
    Shell: 4.4.20 - /bin/bash
  Binaries:
    Node: 10.24.1 - /usr/bin/node
    Yarn: 1.22.5 - /usr/bin/yarn
    npm: 6.14.12 - /usr/bin/npm

Questions / Notes

Thank you for your time

@lovell
Copy link
Owner

lovell commented Sep 22, 2021

Hi, did you mean to ask this question on the sharp-phash repo, which is a downstream consumer of sharp?

I recommend you upgrade to the latest sharp-phash, which specifies sharp as a peer dependency, then add the latest v0.29.1 of sharp to your package.json.

https://github.com/btd/sharp-phash/blob/6c1f039b6ae925fa9130da302e8c072cb60bdd5e/package.json#L26-L28

@lovell lovell added question and removed triage labels Sep 22, 2021
@lovell lovell changed the title Face "Input buffer contains unsupported image format" error on AWS Graviton with ARM Neoverse 64 bits Outdated version of downstream sharp-phash Sep 22, 2021
@VySellathurai
Copy link
Author

VySellathurai commented Sep 23, 2021

Hi,
Thank you for your response.

I open an issue on sharp-phash repo : btd/sharp-phash#10

I tested your recommendation :

I still facing the same problem

@lovell
Copy link
Owner

lovell commented Sep 23, 2021

Are you able to reproduce this using only sharp (i.e. without phash) and without a globally-installed libvips?

@VySellathurai
Copy link
Author

VySellathurai commented Sep 23, 2021

I have just tested the installation without installing libvips globally (with sharp-phase) and i'm facing this error log :

Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)\nArguments: \nDirectory: /home/centos/xxxx/xxx/node_modules/sharp\nOutput:\nsharp: Installation error: Use with glibc 2.28 requires manual installation of libvips >= 8.11.3

I'm trying right now to test with only sharp. I will come back to you later

@VySellathurai
Copy link
Author

VySellathurai commented Sep 28, 2021

Hi,

I cannot using sharp without installing libvips globally. You can see the installation error above.
Nevertheless I tried to use directly sharp (without phash) and the same error still came up : Input buffer contains unsupported image format

@lovell
Copy link
Owner

lovell commented Sep 28, 2021

Installation error: Use with glibc 2.28 requires manual installation of libvips >= 8.11.3

OS: Linux 4.18 CentOS Linux 8

My advice for those using ARM64 CPUs is to opt for a more modern OS, perhaps Fedora instead of CentOS if you're keen on RedHat derivatives.

@lovell
Copy link
Owner

lovell commented Oct 2, 2021

Please see #2837 and lovell/sharp-libvips#114

@lovell lovell closed this as completed Oct 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants