raycast / extensions

Everything you need to extend Raycast.
https://developers.raycast.com
MIT License
5.25k stars 2.95k forks source link

[Image Modification] ...Can't install AVIF encoder to convert .avif images to .jpg #14225

Closed danicomar closed 3 weeks ago

danicomar commented 4 weeks ago

Extension

https://www.raycast.com/HelloImSteven/sips

Raycast Version

1.81.2

macOS Version

15.0

Description

Hi. I use the Image Modification extension a lot to convert images but recently experienced problems with the AVIF format. When trying to convert .avif to .jpg it prompts me to install the AVIF encoder (fair enough) but then it just shows an error. Any tips on how to get the encoder installation to work and be able to perform the conversion as per usual? Thanks! Screenshot 2024-08-28 at 14 38 42 Screenshot 2024-08-28 at 14 38 54 Screenshot 2024-08-28 at 14 39 16

Steps To Reproduce

  1. Select .avif image
  2. Try to convert to .jpg
  3. Advice to install AVIF encoder extension appears
  4. Confirm installation
  5. Error appears

Current Behaviour

Unable to install the encoder and convert .avif images

Expected Behaviour

Able to install AVIF encoder and convert images

raycastbot commented 4 weeks ago

Thank you for opening this issue!

🔔 @SKaplanOfficial @arronhunt @nakaakist @JUSTIVE @patomos you might want to have a look.

💡 Author and Contributors commands The author and contributors of `HelloImSteven/sips` can trigger bot actions by commenting: - `@raycastbot close this issue` Closes the issue. - `@raycastbot close as not planned` Closes the issue as not planned. - `@raycastbot rename this issue to "Awesome new title"` Renames the issue. - `@raycastbot reopen this issue` Reopens the issue. - `@raycastbot assign me` Assigns yourself to the issue. - `@raycastbot good first issue` Adds the "Good first issue" label to the issue. - `@raycastbot keep this issue open` Make sure the issue won't go stale and will be kept open by the bot.
SKaplanOfficial commented 3 weeks ago

Hi, thanks for the report. It seems that the homebrew formula is failing to build. To confirm this is the same issue, can you check to see if the log file ~/Library/Logs/Homebrew/avifenc/05.ninja both exists and contains the following error:

FAILED: ext/libpng/CMakeFiles/png_static.dir/arm/arm_init.c.o 
/opt/homebrew/Library/Homebrew/shims/mac/super/clang -DPNG_ARM_NEON_CHECK_SUPPORTED -I/tmp/avifenc-20240828-81554-vzi52b/libavif-0.9.3/build/ext/zlib -I/tmp/avifenc-20240828-81554-vzi52b/libavif-0.9.3/build/ext/libpng -I/tmp/avifenc-20240828-81554-vzi52b/libavif-0.9.3/ext/libpng -I/tmp/avifenc-20240828-81554-vzi52b/libavif-0.9.3/ext/zlib -std=gnu99 -arch arm64 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk -MD -MT ext/libpng/CMakeFiles/png_static.dir/arm/arm_init.c.o -MF ext/libpng/CMakeFiles/png_static.dir/arm/arm_init.c.o.d -o ext/libpng/CMakeFiles/png_static.dir/arm/arm_init.c.o -c /tmp/avifenc-20240828-81554-vzi52b/libavif-0.9.3/ext/libpng/arm/arm_init.c
/tmp/avifenc-20240828-81554-vzi52b/libavif-0.9.3/ext/libpng/arm/arm_init.c:49:4: error: "PNG_ARM_NEON_FILE undefined: no support for run-time ARM NEON checks"
   49 | #  error "PNG_ARM_NEON_FILE undefined: no support for run-time ARM NEON checks"
      |    ^
/tmp/avifenc-20240828-81554-vzi52b/libavif-0.9.3/ext/libpng/arm/arm_init.c:86:27: error: call to undeclared function 'png_have_neon'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   86 |                no_neon = !png_have_neon(pp);
      |                           ^
2 errors generated.

Assuming this is the same error you're getting, I'll need to explore options to avoid it...

danicomar commented 3 weeks ago

Hi. The file is there, but the error is not. Any other possibilities/actions? Thanks in any case. Screenshot 2024-08-28 at 18 49 33

SKaplanOfficial commented 3 weeks ago

There should be a 05.ninja file without the .cc extension

danicomar commented 3 weeks ago

Oh, my bad. You’re right. Yes, the file is there and I'm getting the same message. How shall I proceed then?

FAILED: ext/libpng/CMakeFiles/png_static.dir/arm/arm_init.c.o /opt/homebrew/Library/Homebrew/shims/mac/super/clang -DPNG_ARM_NEON_CHECK_SUPPORTED -I/tmp/avifenc-20240828-38837-ut2h60/libavif-0.9.3/build/ext/zlib -I/tmp/avifenc-20240828-38837-ut2h60/libavif-0.9.3/build/ext/libpng -I/tmp/avifenc-20240828-38837-ut2h60/libavif-0.9.3/ext/libpng -I/tmp/avifenc-20240828-38837-ut2h60/libavif-0.9.3/ext/zlib -std=gnu99 -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk -MD -MT ext/libpng/CMakeFiles/png_static.dir/arm/arm_init.c.o -MF ext/libpng/CMakeFiles/png_static.dir/arm/arm_init.c.o.d -o ext/libpng/CMakeFiles/png_static.dir/arm/arm_init.c.o -c /tmp/avifenc-20240828-38837-ut2h60/libavif-0.9.3/ext/libpng/arm/arm_init.c /tmp/avifenc-20240828-38837-ut2h60/libavif-0.9.3/ext/libpng/arm/arm_init.c:49:4: error: "PNG_ARM_NEON_FILE undefined: no support for run-time ARM NEON checks" 49 | # error "PNG_ARM_NEON_FILE undefined: no support for run-time ARM NEON checks" | ^ /tmp/avifenc-20240828-38837-ut2h60/libavif-0.9.3/ext/libpng/arm/arm_init.c:86:27: error: call to undeclared function 'png_have_neon'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 86 | no_neon = !png_have_neon(pp); | ^ 2 errors generated.

SKaplanOfficial commented 3 weeks ago

Hi, try manually running brew install libavif. It seems that formula actually includes the avifenc binaries, which I don't think it did before.

Will push a general fix for the extension soon when I get a chance.

danicomar commented 3 weeks ago

Understood. Thank you so much!