-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
ImageMagick: Converting from PDFs is broken with imagemagickBig (--with-gslib) #55118
Comments
#55634 broke building zbar and thus electrum on my system. I don't think this issue really warranted breaking the build of dependencies just because an optional feature doesn't work... So I started looking into the root cause of this. My understanding is that ghostscript has its own fork of lcms2 inside its codebase ("lcms2mt" directory). We build against it, as shown by build flags at compile time: The easiest fix is probably to do like Arch is currently doing: using systemwide lcms2 and removing Ghostscript's fork. I'll give it a shot. |
imagemagickBig and imagemagick7Big were marked broken in NixOS#55634 due to NixOS#55118. NixOS#57313 fixed the bug but reverted the broken bit only on imagemagickBig. Revert it on imagemagick7Big too. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
imagemagickBig and imagemagick7Big were marked broken in NixOS#55634 due to NixOS#55118. NixOS#57313 fixed the bug but reverted the broken bit only on imagemagickBig. Revert it on imagemagick7Big too. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This bug is specific to NixOS and concerns all versions of
imageMagickBig
.Reproduce
The error also appears with
ImageMagic 6
(imagemagickBig
).Running
convert -debug all a.pdf b.png
gives more details (full debug output).This bug doesn't appear on other Linux distros that provide
--with-gslib
ImageMagick distributions, like Alpine or Arch (imagemagick-full
).Workaround
Use
imagemagick
instead ofimagemagickBig
while ghostscript is inPATH
. This way, thegs
binary is used instead of the brokengslib
.Debug
GDB reveals a segfault triggered by
lcms2
, viaghostscript
:Full backtrace
The reason for the exception shown in convert's output is that
ShredFile
tries to delete a temp file which has been previously deleted by an exception handler triggered by the segfault.Running the above script with older
nixpkgs
versions yields:17.09
: Works without errors18.03
: SIGSEGV in __strlen_sse2 (libc), via liblcms2or alternatively: SIGSEV in pthread_mutex_destroy (libpthread), via liblcms2, backtrace
18.09
: SIGSEGV in __memmove_ssse3 (libc), via liblcms2, backtraceunstable
(as demonstrated above): SIGSEGV in __memmove_ssse3 or __memmove_avx_unaligned_erms (libc), via liblcms2, backtracecc: @the-kenny
The text was updated successfully, but these errors were encountered: