Coder Social home page Coder Social logo

Comments (24)

Spomsoree avatar Spomsoree commented on August 15, 2024 5

I'm currently getting the same error with the brew install

imageoptim-cli: The x86_64 architecture is required for this software.

from imageoptim-cli.

JamieMason avatar JamieMason commented on August 15, 2024 3

@inspiredearth @matthewferry @jwryan9 @shuguenot @sebastienbarre I have updated the version of node.js which imageoptim is built with to 12.18.2, hopefully this will solve this issue.

This is in [email protected] which has just been released, it might take some time before it appears on homebrew (I don't control that).

from imageoptim-cli.

ickc avatar ickc commented on August 15, 2024 3

@sammcj, which part of the issue "Unable to install on M1 / Apple Silicon" you think is not closed/resolved?

Feel free to open a new issue if you want.

And have you visited the linked issue? It seems like you're not really reading what I wrote, nor understanding what is really the issue at hand. And given your attitude I'll refrain from commenting here further.

from imageoptim-cli.

sebastienbarre avatar sebastienbarre commented on August 15, 2024 2

Thanks.

I just cloned the repo to test it out manually.

  • I tried the old 3.0.2, and indeed it failed at yarn install, same error as seen with Homebrew. What I didn't realize is that yarn build does work and produces a binary, but since the previous step failed, Homebrew had already given up.
  • I then switched to the 3.0.7 tag you just released, and yarn install now succeeds (and so does yarn build). So this is looking good for Homebrew, thanks for fixing that.

from imageoptim-cli.

ickc avatar ickc commented on August 15, 2024 2

@sammcj, I know you're confused, but this issue is about installing on Apple Silicon, not running it natively. People above showed that it can be installed, so indeed this issue is resolved.

The comment I made is about the brew formula. The maintainer here tried to fix it, but clearly wasn't very familiar with homebrew. And technically it is an issue for homebrew, not this repo (homebrew formula are individually maintained, sometimes by the same developer of the software, but most of the time not, as in any other package index.)

Regarding running it natively, probably you should worry more about this issue: ImageOptim/ImageOptim#334

Lastly, it is easy to ask for people to "just recompile for arm64". But remember this is all free softwares developed by people in their free time and volunteer to release it with an open source license. Most these licenses come with a clause saying that the software has no warranty. They have no obligation at all to do those volunteer work. So just be nice and stop behaving like a consumer.

from imageoptim-cli.

cobyism avatar cobyism commented on August 15, 2024 2

Friendly bump: We're ~9 months on since last activity here, but this is still an issue.

When I attempt to brew install imageoptim-cli on Apple Silicon (M2), I get the message:

$ brew install imageoptim-cli
[…snip…]
imageoptim-cli: The x86_64 architecture is required for this software.
Error: imageoptim-cli: An unsatisfied requirement failed this build.

The version pulled down by yarn seems to run fine:

$ yarn add imageoptim-cli
[…snip…]
✨  Done in 0.50s.

$ node_modules/imageoptim-cli/dist/imageoptim --version
3.0.7

What, specifically, are the blockers to updating the homebrew formula?

from imageoptim-cli.

intmainreturn00 avatar intmainreturn00 commented on August 15, 2024 2

Also don't work for me:

> brew install imageoptim-cli
imageoptim-cli: The x86_64 architecture is required for this software.
Error: imageoptim-cli: An unsatisfied requirement failed this build.

maybe this should be reopen?

from imageoptim-cli.

levibuzolic avatar levibuzolic commented on August 15, 2024 1

@janosh yes, runs without issue.

$ imageoptim --imagealpha --quality 0-100 --number-of-colors 32 example.PNG
i Running ImageAlpha...
i Running ImageOptim...
✓ example.PNG was: 474kB now: 47.7kB saving: 426kB (89.93%)
✓ TOTAL was: 474kB now: 47.7kB saving: 426kB (89.93%)
✓ Finished

$ which imageoptim
/Users/levi/.npm-global/bin/imageoptim

$ ls -lah /Users/levi/.npm-global/bin/imageoptim
lrwxr-xr-x 1 levi staff 54 Feb 15 12:52 /Users/levi/.npm-global/bin/imageoptim -> ../../.config/yarn/global/node_modules/.bin/imageoptim*

$ arch
arm64

from imageoptim-cli.

levibuzolic avatar levibuzolic commented on August 15, 2024 1

Yep.

image

from imageoptim-cli.

ickc avatar ickc commented on August 15, 2024 1

@Spomsoree, if you follow Homebrew/homebrew-core#96368 then you'll see the patch isn't accepted, and is made under the assumption that you can run it through rosetta 2.

So in short, it can't be run native yet, but you can run it through rosetta 2. In order to do this, follow Homebrew/brew#9173

from imageoptim-cli.

sammcj avatar sammcj commented on August 15, 2024 1

@ickc that's a bit petty / high and mighty, I'm an OSS maintainer as well. While I appreciate what you're saying in general - I didn't like a consumer - I just stated that it's not fixed and needs to be compiled for ARM plain and simple 🤷

from imageoptim-cli.

inspiredearth avatar inspiredearth commented on August 15, 2024 1

Also don't work for me:

> brew install imageoptim-cli
imageoptim-cli: The x86_64 architecture is required for this software.
Error: imageoptim-cli: An unsatisfied requirement failed this build.

maybe this should be reopen?

Ask far as I've understood from the responses to this thread (started be me), it was determined (here) that since it can be installed if Homebrew is installed in Rosetta mode, the issue is resolved.

I have been using Homebrew for a few years in native Silicon mode, and having to reinstall my Homebrew and all packages (in Rosetta mode) seems like too much hassle just to get imageoptim-cli working. So I've moved on from trying to use imageoptim-cli via Homebrew.

I understand from comments in this discussion that we can install Yarn (a Javascript package manager) via Homebrew (or via Shell script), and then install imageoptim-cli with yarn. I've not yet tried that.

from imageoptim-cli.

OberstKrueger avatar OberstKrueger commented on August 15, 2024

Tangential, but based on this pull request, it looks like imageoptim not being updated is blocking the homebrew formula from being updated.

from imageoptim-cli.

joelbowen avatar joelbowen commented on August 15, 2024

What needs to be done to update the homebrew formula? Still seeing 3.0.2 and unable to install on Apple silicon https://formulae.brew.sh/formula/imageoptim-cli#default

from imageoptim-cli.

JamieMason avatar JamieMason commented on August 15, 2024

I've not had any time to check but I suspect the package needs building for a different version of node.js than it is currently or it seems like maybe homebrew also supports linux now(?) and, if that's the case, could be related to this package being mac only.

from imageoptim-cli.

3zzy avatar 3zzy commented on August 15, 2024

https://formulae.brew.sh/formula/imageoptim-cli is now 3.0.7 but I still don't see support for Apple Silicon mentioned there, and of course it doesn't install:

imageoptim-cli: The x86_64 architecture is required for this software.
Error: imageoptim-cli: An unsatisfied requirement failed this build.

Installing via NPM is no different:

zsh: bad CPU type in executable: imageoptim

from imageoptim-cli.

levibuzolic avatar levibuzolic commented on August 15, 2024

get the same as above for homebrew, but I was able to install imageoptim-cli via Yarn without issue on Apple Silicon.

$ yarn global add imageoptim-cli

  yarn global v1.22.17
  [1/4] 🔍  Resolving packages...
  [2/4] 🚚  Fetching packages...
  [3/4] 🔗  Linking dependencies...
  [4/4] 🔨  Building fresh packages...
  success Installed "[email protected]" with binaries:
        - imageoptim
  ✨  Done in 5.25s.

Looks like the homebrew formula needs to be updated: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/imageoptim-cli.rb#L23

from imageoptim-cli.

janosh avatar janosh commented on August 15, 2024

@levibuzolic Does it actually run after yarn installation?

from imageoptim-cli.

janosh avatar janosh commented on August 15, 2024

@levibuzolic Thanks! Can you confirm that it's using Rosetta?

from imageoptim-cli.

JamieMason avatar JamieMason commented on August 15, 2024

Anything I need to do for this? I don't own an M1 Mac.

from imageoptim-cli.

jasonhibbs avatar jasonhibbs commented on August 15, 2024

Similar issues to above, but with Yarn I get:

$ imageoptim --imagealpha --quality 0-100 --number-of-colors 32 example.PNG
zsh: bad CPU type in executable: imageoptim

$ which imageoptim
/Users/jason/.yarn/bin/imageoptim

$ ls -lah /Users/jason/.yarn/bin/imageoptim
lrwxr-xr-x  1 jason  staff    54B 10 Oct 17:25 /Users/jason/.yarn/bin/imageoptim -> ../../.config/yarn/global/node_modules/.bin/imageoptim

$ arch
arm64

EDIT: turns out, I hadn’t installed rosetta yet – all good after this.

softwareupdate --install-rosetta

from imageoptim-cli.

sammcj avatar sammcj commented on August 15, 2024

Just hit this problem as well - it's definitely not resolved @JamieMason.

Note - If you use it with Rosetta it'll run in emulation mode which is not efficient, the software needs to be compiled for ARM.

from imageoptim-cli.

chenrui333 avatar chenrui333 commented on August 15, 2024

it looks like it is not installing the arm native artifact

  imageoptim-cli
    * Binaries built for a non-native architecture were installed into imageoptim-cli's prefix.
      The offending files are:
        /opt/homebrew/Cellar/imageoptim-cli/3.1.7/libexec/lib/node_modules/imageoptim-cli/dist/imageoptim

See this PR, Homebrew/homebrew-core#135595
The build log is in here, https://github.com/Homebrew/homebrew-core/actions/runs/5437629545/jobs/9888363914

from imageoptim-cli.

sammcj avatar sammcj commented on August 15, 2024

Yeah running software in emulation is a workaround/hack especially for something that's processor or GPU intensive, but I'm aware Jamie is doing a complete rewrite of imageOptim so probably isn't investing time in the current codebase.

from imageoptim-cli.

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.