pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/53921: graphics/ImageMagic [macOS]: fails with JPEG library version mismatch errors due to using print/ghotscript-gpl's `jpeg_CreateDecompress` function
>Number: 53921
>Category: pkg
>Synopsis: graphics/ImageMagic [macOS]: fails with JPEG library version mismatch errors due to using print/ghotscript-gpl's `jpeg_CreateDecompress` function
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 29 05:20:00 +0000 2019
>Originator: Dean Matzkov
>Release: pkgsrc-2018Q4
>Organization:
>Environment:
>Description:
On macOS, graphics/ImageMagick's ``convert`` command fails like so when attempting to convert a JPEG file:
---SNIP---
$ convert meow.jpg woof.png
convert: Wrong JPEG library version: library is 80, caller expects 90 `meow.jpg' @ error/jpeg.c/JPEGErrorHandler/333.
convert: no images defined `woof.png' @ error/convert.c/ConvertImageCommand/3300.
---/SNIP---
Upon inspection in a debugger, it seems that it's because it's using the older, incompatible ``jpeg_CreateDecompress`` function exported by libgs.dylib (print/ghostscript-gpl), rather than the one from libjpeg.dylib (graphics/jpeg):
Here's a backtrace of a stop-point set at jpeg_CreateDecompress, which demonstrates it using libgs.9.dylib's rather than libjpeg's:
---SNIP---
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 3.1
* frame #0: 0x0000000100a98c60 libgs.9.dylib`jpeg_CreateDecompress
frame #1: 0x00000001004a6977 libMagickCore-7.Q16HDRI.6.dylib`ReadJPEGImage(image_info=0x0000000103826a00, exception=0x0000000102500800) at jpeg.c:1160
frame #2: 0x0000000100146d37 libMagickCore-7.Q16HDRI.6.dylib`ReadImage(image_info=0x0000000103823600, exception=0x0000000102500800) at constitute.c:547
frame #3: 0x0000000100148649 libMagickCore-7.Q16HDRI.6.dylib`ReadImages(image_info=0x0000000103820200, filename="meow.jpg", exception=0x0000000102500800) at constitute.c:919
frame #4: 0x00000001007798fd libMagickWand-7.Q16HDRI.6.dylib`ConvertImageCommand(image_info=0x0000000103820200, argc=3, argv=0x00000001025001f0, metadata=0x00007ffeefbfd1d8, exception=0x0000000102500800) at convert.c:644
frame #5: 0x00000001008535ad libMagickWand-7.Q16HDRI.6.dylib`MagickCommandGenesis(image_info=0x0000000103802000, command=(libMagickWand-7.Q16HDRI.6.dylib`ConvertImageCommand at convert.c:518), argc=3, argv=0x00007ffeefbff368, metadata=0x0000000000000000, exception=0x0000000102500800) at mogrify.c:184
frame #6: 0x0000000100001cf5 convert`MagickMain(argc=3, argv=0x00007ffeefbff368) at magick.c:149
frame #7: 0x0000000100001a12 convert`main(argc=3, argv=0x00007ffeefbff368) at magick.c:180
frame #8: 0x00007fff6df27085 libdyld.dylib`start + 1
frame #9: 0x00007fff6df27085 libdyld.dylib`start + 1
---/SNIP---
And if I force libjpeg.dylib to be preloaded (the macOS equivalent of LD_PRELOAD), as follows, then I can get JPEG conversion to work correctly:
---SNIP---
$ export DYLD_FORCE_FLAT_NAMESPACE=1
$ export DYLD_INSERT_LIBRARIES=${PKG}/lib/libjpeg.9.dylib
$ convert meow.jpg woof.png
---/SNIP---
I'm not sure how to go about fixing this in pkgsrc, but I just thought I'd report it anyway.
Thanks!
>How-To-Repeat:
1. cd $pkgsrc/graphics/ImageMagick
2. convert meow.jpg woof.png
>Fix:
Home |
Main Index |
Thread Index |
Old Index