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

pngquant libraries not loaded dmg installer & homebrew cask install approaches (libpng + little-cms2) [fixed!] #7

Closed
2 tasks done
soundage opened this issue Mar 25, 2018 · 12 comments

Comments

@soundage
Copy link

soundage commented Mar 25, 2018

After installing wthe DMG file and dragging the PNG, this is what I got:

dyld: Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib Referenced from: /Applications/Crunch.app/Contents/Resources/./pngquant Reason: image not found /Applications/Crunch.app/Contents/Resources/script: line 10: 6549 Abort trap: 6 ./pngquant --quality=80-98 --skip-if-larger --force --ext -crunch.png "$imagepath" > /dev/null

@chrissimpkins edits below -------

Associated closed issue reports to limit discussion to this thread:

#10
#12

TODO:

FIX IS AVAILABLE (v1.0.1)

For those who previously used the Homebrew Cask installer

Try to install with the Homebrew cask install approach again. The installer script was updated with a couple of new dependencies and this should now be fixed

For those who want to install with the dmg installer

Please attempt your install with the v1.0.1 build. This should be the fix for this issue. Feedback needed to confirm and close this issue report.

https://github.com/chrissimpkins/Crunch/releases/tag/v1.0.1

@chrissimpkins
Copy link
Owner

chrissimpkins commented Mar 25, 2018

If you happen to have access to Homebrew can I ask you to install libpng with the following and try again?

$ brew install libpng

If that works I will update the docs with this dependency and add it as a dependency during the homebrew installation. Sorry I didn't realize this was an issue. Thanks for reporting it.

@kevinrajaram
Copy link

Had the same issue and installing libpng fixed that!

Another issue arose:

dyld: Library not loaded: /usr/local/opt/little-cms2/lib/liblcms2.2.dylib Referenced from: /Applications/Crunch.app/Contents/Resources/./pngquant Reason: image not found /Applications/Crunch.app/Contents/Resources/script: line 10: 26240 Abort trap: 6 ./pngquant --quality=80-98 --skip-if-larger --force --ext -crunch.png "$imagepath" > /dev/null

Installing pngquant fixed up everything for me and now it's working flawless!
brew install pngquant

Hopes this helps others if they run into similar issues.

@chrissimpkins
Copy link
Owner

chrissimpkins commented Mar 26, 2018

@kevinrajaram Thanks Kevin! Looks like we need to add these two libraries as dependencies to both documentation and the homebrew installation process:

  • libpng
  • little-cms2

Will get on it this week. Will update here when available.

@chrissimpkins
Copy link
Owner

Verified both of those are pngquant dependencies in the pngquant homebrew Ruby installer script:

https://github.com/Homebrew/homebrew-core/blob/49a2074c5eb2c6ce836adc4f75cd8f7dd75acb6a/Formula/pngquant.rb#L17-L18

@chrissimpkins
Copy link
Owner

chrissimpkins commented Mar 26, 2018

Here is what we need in the Crunch homebrew installer script:

depends_on formula: [ 
        'libpng', 
        'little-cms2'
 ]

@chrissimpkins
Copy link
Owner

chrissimpkins commented Mar 26, 2018

Formula update submitted as a new PR on Homebrew cask repo:

Homebrew/homebrew-cask#45222

This should fix these issues when accepted in Homebrew cask.

@chrissimpkins chrissimpkins changed the title Library not loaded Library not loaded [libpng + little-cms2] Mar 26, 2018
@chrissimpkins
Copy link
Owner

The Homebrew Cask PR was merged. @soundage mind trying the install with Homebrew Cask again and let me know if this fixes the issue for you (or can someone else please confirm)?

@chrissimpkins chrissimpkins changed the title Library not loaded [libpng + little-cms2] pngquant libraries not loaded [libpng + little-cms2] Mar 26, 2018
@olssonm
Copy link

olssonm commented Mar 26, 2018

I had the same issue before; but downloaded the latest Homebrew Cask and now it's working for me – great job!

@chrissimpkins
Copy link
Owner

chrissimpkins commented Mar 26, 2018

Hooah! Thank you very much for the feedback @olssonm! Much appreciated.

And thanks for taking the time to report this issue @soundage. Will leave open until all boxes are complete in the OP

@chrissimpkins chrissimpkins changed the title pngquant libraries not loaded [libpng + little-cms2] pngquant libraries not loaded dmg installer & homebrew cask install approaches [libpng + little-cms2] Mar 26, 2018
@chrissimpkins
Copy link
Owner

chrissimpkins commented Mar 26, 2018

This should be fixed across both install approaches as of v1.0.1 release.

dmg installer file is available here: https://github.com/chrissimpkins/Crunch/releases/download/v1.0.1/Crunch-Installer.dmg

Please confirm that this installs and executes without issues if you do not have libpng or little-cms2 installed through Homebrew on your system (or prior builds from source...).

You can confirm that these libraries are present from prior Homebrew installs with brew list and inspection of your installed Homebrew packages. There is a wide array of software that depends on libpng so this may be present for many. Unknown (to me) how widely used little-cms2 is out there.

Will close if we have achieved a fix with the v1.0.1 release to address this issue.

We should be able to eliminate the Homebrew install of these additional dependencies through the Homebrew cask installation approach if we are gtg with the current pngquant build.

@chrissimpkins chrissimpkins changed the title pngquant libraries not loaded dmg installer & homebrew cask install approaches [libpng + little-cms2] pngquant libraries not loaded dmg installer & homebrew cask install approaches (libpng + little-cms2) [fixed!] Mar 27, 2018
@adidalal
Copy link

I was able to confirm that using the 1.0.1 .dmg build (without having libpng or little-cms2) works.

[~/Downloads] > brew list | grep libpng
[~/Downloads] > brew list | grep little-cms2
[~/Downloads] > 

Verified by crunching a test file using Crunch.app from the above link.

@chrissimpkins
Copy link
Owner

@adidalal Thank you very much Aditya! Greatly appreciated! Will close this as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants