[Pkg-phototools-devel] Bug#966904: pfstools: FTBFS: array2d.h:173:9: error: ‘__assert_fail’ was not declared in this scope; did you mean ‘MagickCore::__assert_fail’?

peter green plugwash at p10link.net
Fri Aug 28 02:49:24 BST 2020


Tags 966904 +patch
thanks

The issue is that Magick++.h (indirectly) includes assert.h inside a namespace.

Note that generally only the first include of a header actually does anything due to the presense of include gaurds.
Therefore if assert.h is included before Magick++.h then everything is fine, the symbols from assert.h are correctly
included in the global namespace. OTOH if the first include of assert.h is the one from Magick++.h then the symbols
from assert.h are defined in the MagickCore namespace which breaks stuff.

I would argue that is a bug in imagemagick and have filed bugs in both Debian and upstream as
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=969128 and https://github.com/ImageMagick/ImageMagick6/issues/95

Nevertheless this can be worked around fairly easily in pfstools by re-ordering the includes so that pfs.h
(which includes assert.h) is included before Magick++.h . I have done so in Raspbian bullseye-staging

The patch for the upstream code can be found at
https://github.com/raspbian-packages/pfstools/blob/bullseye-staging/debian/patches/reorder-includes-imagemagick.patch
a debdiff should appear soon at  https://debdiffs.raspbian.org/main/p/pfstools

I may or may not NMU this in Debian later.



More information about the Pkg-phototools-devel mailing list