Bug#964653: freeimage: FTBFS: Source/FreeImage/PluginJPEG.cpp:506:1: error: ‘BOOL jpeg_read_icc_profile(j_decompress_ptr, JOCTET**, unsigned int*) ’ was declared ‘extern’ and later ‘static’ [-fpermissive]

Lucas Nussbaum lucas at debian.org
Thu Jul 9 11:44:41 BST 2020


Source: freeimage
Version: 3.18.0+ds2-3
Severity: serious
Justification: FTBFS on amd64
Tags: bullseye sid ftbfs
Usertags: ftbfs-20200709 ftbfs-bullseye

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.

Relevant part (hopefully):
> x86_64-linux-gnu-g++ -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -D__ANSI__ -I. -ISource -ISource/Metadata -ISource/FreeImageToolkit -ISource/LibJPEG -ISource/LibPNG -ISource/LibTIFF4 -ISource/ZLib -ISource/LibOpenJPEG -ISource/OpenEXR -ISource/OpenEXR/Half -ISource/OpenEXR/Iex -ISource/OpenEXR/IlmImf -ISource/OpenEXR/IlmThread -ISource/OpenEXR/Imath -ISource/OpenEXR/IexMath -ISource/LibRawLite -ISource/LibRawLite/dcraw -ISource/LibRawLite/internal -ISource/LibRawLite/libraw -ISource/LibRawLite/src -ISource/LibWebP -ISource/LibJXR -ISource/LibJXR/common/include -ISource/LibJXR/image/sys -ISource/LibJXR/jxrgluelib -I/usr/include/jxrlib -I/usr/include/openjpeg-2.3 -I/usr/include/libpng16 -I/usr/include/libraw -I/usr/include/x86_64-linux-gnu -I/usr/include/OpenEXR -Wdate-time -D_FORTIFY_SOURCE=2 -c Source/FreeImage/PluginJPEG.cpp -o Source/FreeImage/PluginJPEG.o
> Source/FreeImage/PluginJPEG.cpp:506:1: error: ‘BOOL jpeg_read_icc_profile(j_decompress_ptr, JOCTET**, unsigned int*)’ was declared ‘extern’ and later ‘static’ [-fpermissive]
>   506 | jpeg_read_icc_profile(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) {
>       | ^~~~~~~~~~~~~~~~~~~~~
> In file included from Source/FreeImage/PluginJPEG.cpp:39:
> /usr/include/jpeglib.h:1066:17: note: previous declaration of ‘boolean jpeg_read_icc_profile(j_decompress_ptr, JOCTET**, unsigned int*)’
>  1066 | EXTERN(boolean) jpeg_read_icc_profile(j_decompress_ptr cinfo,
>       |                 ^~~~~~~~~~~~~~~~~~~~~
> Source/FreeImage/PluginJPEG.cpp: In function ‘BOOL jpeg_write_jfxx(j_compress_ptr, FIBITMAP*)’:
> Source/FreeImage/PluginJPEG.cpp:962:93: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
>   962 |  if((FreeImage_GetImageType(thumbnail) != FIT_BITMAP) || (FreeImage_GetBPP(thumbnail) != 8) && (FreeImage_GetBPP(thumbnail) != 24)) {
>       |                                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from Source/FreeImage/PluginJPEG.cpp:44:
> Source/Utilities.h: At global scope:
> Source/Utilities.h:533:20: warning: ‘FI_MSG_ERROR_UNSUPPORTED_COMPRESSION’ defined but not used [-Wunused-variable]
>   533 | static const char *FI_MSG_ERROR_UNSUPPORTED_COMPRESSION = "Unsupported compression type";
>       |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Source/Utilities.h:532:20: warning: ‘FI_MSG_ERROR_UNSUPPORTED_FORMAT’ defined but not used [-Wunused-variable]
>   532 | static const char *FI_MSG_ERROR_UNSUPPORTED_FORMAT = "Unsupported format";
>       |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Source/Utilities.h:531:20: warning: ‘FI_MSG_ERROR_MAGIC_NUMBER’ defined but not used [-Wunused-variable]
>   531 | static const char *FI_MSG_ERROR_MAGIC_NUMBER = "Invalid magic number";
>       |                    ^~~~~~~~~~~~~~~~~~~~~~~~~
> Source/Utilities.h:530:20: warning: ‘FI_MSG_ERROR_PARSING’ defined but not used [-Wunused-variable]
>   530 | static const char *FI_MSG_ERROR_PARSING = "Parsing error";
>       |                    ^~~~~~~~~~~~~~~~~~~~
> make[3]: *** [Makefile.gnu:66: Source/FreeImage/PluginJPEG.o] Error 1

The full build log is available from:
   http://qa-logs.debian.net/2020/07/09/freeimage_3.18.0+ds2-3_unstable.log

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

About the archive rebuild: The rebuild was done on EC2 VM instances from
Amazon Web Services, using a clean, minimal and up-to-date chroot. Every
failed build was retried once to eliminate random failures.



More information about the debian-science-maintainers mailing list