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

Webp not working on M1 Mac (Apple Silicon) #39

Closed
corygrunk opened this issue Mar 18, 2021 · 5 comments · Fixed by #81
Closed

Webp not working on M1 Mac (Apple Silicon) #39

corygrunk opened this issue Mar 18, 2021 · 5 comments · Fixed by #81

Comments

@corygrunk
Copy link

corygrunk commented Mar 18, 2021

I installed Pixlet via Homebrew on a M1 MacBook Pro, but am getting the following errors with the Web library when running the "Hello World" curl command:

Library not loaded: /usr/local/opt/webp/lib/libwebpdemux.2.dylib
  Referenced from: /opt/homebrew/bin/pixlet
  Reason: no suitable image found.  Did find:
	/usr/local/opt/webp/lib/libwebpdemux.2.dylib: mach-o, but wrong architecture
	/usr/local/opt/webp/lib/libwebpdemux.2.dylib: stat() failed with errno=1
	/usr/local/opt/webp/lib/libwebpdemux.2.dylib: mach-o, but wrong architecture
@betterengineering
Copy link
Contributor

Hey @corygrunk! So sorry for the delay. None of us at Tidbyt have access to an M1 Mac, so we'd certainly need help from the community to be able to support M1 based installs at the moment. Can you confirm if this is still an issue?

@corygrunk
Copy link
Author

corygrunk commented Jun 15, 2021

Actually, it is more of an issue now. I revisited this today and am unable to install Pixlet through brew on an M1 Mac. I run the install command in Homebrew and get this error:

Error: Invalid formula: /opt/homebrew/Library/Taps/tidbyt/homebrew-tidbyt/pixlet.rb formulae require at least a URL
Error: Cannot tap tidbyt/tidbyt: invalid syntax in tap!

@btjones
Copy link
Contributor

btjones commented Aug 18, 2021

@corygrunk I was able to install on my M1 but had to build from source. Here are the steps I did:

Pixlet Installation on Apple Silicon with Homebrew

  1. Install Golang and WebP via Homebrew

     brew install go
     brew install webp
    
  2. Add webp to .zshrc / .bashrc:

     export CPATH=/opt/homebrew/include
     export LIBRARY_PATH=/opt/homebrew/lib
    
  3. Follow Pixlet build steps

  4. Add pixlet to .zshrc / .bashrc:

     export PATH=/PATH/TO/pixlet:$PATH
    

@antonym
Copy link

antonym commented Nov 23, 2021

Can confirm I got the original error on an M1 Mac:

Error: Invalid formula: /opt/homebrew/Library/Taps/tidbyt/homebrew-tidbyt/pixlet.rb formulae require at least a URL
Error: Cannot tap tidbyt/tidbyt: invalid syntax in tap!

but I was also able to build it from source with @btjones instructions and start pixlet.

samandmoore added a commit to samandmoore/pixlet that referenced this issue Dec 18, 2021
this adds arm64 to the list of supported go architectures in the
goreleaser configuration.

it also updates the fetch-artifacts.sh script to copy the linux and
darwin arm64 artifacts. i'm not entirely sure how this fits into the
buildkite CI process, but it seems like it might need to be updated.

i'm able to run the goreleaser command locally and see it generate all
the proper files.

one interesting and important note about building the render module
while running on macos, i did need to set up the CPATH and LIBRARY_PATH
as described here tidbyt#39 (comment)
@betterengineering
Copy link
Contributor

Hi folks! I'm going to close this in favor of #38. @btjones's solution works in the immediate term (thanks @btjones!!) and we're aiming get #38 closed in the next few days.

betterengineering added a commit that referenced this issue Jan 3, 2022
this adds arm64 to the list of supported go architectures in the
goreleaser configuration.

it also updates the fetch-artifacts.sh script to copy the linux and
darwin arm64 artifacts. i'm not entirely sure how this fits into the
buildkite CI process, but it seems like it might need to be updated.

i'm able to run the goreleaser command locally and see it generate all
the proper files.

one interesting and important note about building the render module
while running on macos, i did need to set up the CPATH and LIBRARY_PATH
as described here #39 (comment)

Co-authored-by: Mark Spicer <spicer93@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants