[Debian-med-packaging] Bug#1066675: pvrg-jpeg: FTBFS: codec.c:120:15: error: implicit declaration of function ‘abs’ [-Werror=implicit-function-declaration]

Lucas Nussbaum lucas at debian.org
Wed Mar 13 11:55:59 GMT 2024


Source: pvrg-jpeg
Version: 1.2.1+dfsg1-6
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: lucas at debian.org
Usertags: ftbfs-20240313 ftbfs-trixie ftbfs-impfuncdef

Hi,

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

This is most likely caused by a change in dpkg 1.22.6, that enabled
-Werror=implicit-function-declaration. For more information, see
https://wiki.debian.org/qa.debian.org/FTBFS#A2024-03-13_-Werror.3Dimplicit-function-declaration

Relevant part (hopefully):
> /usr/bin/cc -DNOTRUNCATE -DSYSV -I/<<PKGBUILDDIR>> -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -MD -MT CMakeFiles/pvrg-jpeg.dir/chendct.o -MF CMakeFiles/pvrg-jpeg.dir/chendct.o.d -o CMakeFiles/pvrg-jpeg.dir/chendct.o -c /<<PKGBUILDDIR>>/chendct.c
> /<<PKGBUILDDIR>>/codec.c: In function ‘FrequencyAC’:
> /<<PKGBUILDDIR>>/codec.c:120:15: error: implicit declaration of function ‘abs’ [-Werror=implicit-function-declaration]
>   120 |       cofac = abs(matrix[k]);           /* Find absolute size */
>       |               ^~~
> /<<PKGBUILDDIR>>/codec.c:33:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘abs’
>    32 | #include "csize.h"
>   +++ |+#include <stdlib.h>
>    33 | 
> /<<PKGBUILDDIR>>/marker.c:206:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
>   206 | WriteDnl()
>       | ^~~~~~~~
> /<<PKGBUILDDIR>>/marker.c: In function ‘ReadSof’:
> /<<PKGBUILDDIR>>/marker.c:369:12: error: implicit declaration of function ‘bgetw’; did you mean ‘bgetc’? [-Werror=implicit-function-declaration]
>   369 |   Length = bgetw();
>       |            ^~~~~
>       |            bgetc
> /<<PKGBUILDDIR>>/jpeg.c: In function ‘JpegEncodeScan’:
> /<<PKGBUILDDIR>>/huffman.c: In function ‘UseDCHuffmanCheckingGEMSBug’:
> /<<PKGBUILDDIR>>/jpeg.c:817:9: error: implicit declaration of function ‘WriteDnl’; did you mean ‘WriteDht’? [-Werror=implicit-function-declaration]
>   817 |         WriteDnl();  /* Automatically write a dnl if no resync is enabled.*/
>       |         ^~~~~~~~
>       |         WriteDht
> /<<PKGBUILDDIR>>/marker.c: In function ‘CheckMarker’:
> /<<PKGBUILDDIR>>/huffman.c:714:14: warning: too many arguments for format [-Wformat-extra-args]
>   714 |       printf("GE table selection bug detected - assuming predictor bug also\n",index);
>       |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /<<PKGBUILDDIR>>/marker.c:604:12: error: implicit declaration of function ‘brtell’; did you mean ‘mrtell’? [-Werror=implicit-function-declaration]
>   604 |   Length = brtell();
>       |            ^~~~~~
>       |            mrtell
> /<<PKGBUILDDIR>>/marker.c:609:7: error: implicit declaration of function ‘brseek’; did you mean ‘mrseek’? [-Werror=implicit-function-declaration]
>   609 |       brseek(Length,0L);
>       |       ^~~~~~
>       |       mrseek
> /<<PKGBUILDDIR>>/jpeg.c: In function ‘JpegLosslessDecodeScan’:
> /<<PKGBUILDDIR>>/jpeg.c:1493:15: error: implicit declaration of function ‘CheckMarker’ [-Werror=implicit-function-declaration]
>  1493 |           if (CheckMarker()==0xdc)
>       |               ^~~~~~~~~~~
> /<<PKGBUILDDIR>>/io.c: In function ‘SeekEndIob’:
> /<<PKGBUILDDIR>>/io.c:789:11: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
>   789 |           write(Iob->file,Terminator,1);
>       |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /<<PKGBUILDDIR>>/io.c: In function ‘TerminateFile’:
> /<<PKGBUILDDIR>>/io.c:945:19: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
>   945 |                   write(CScan->Iob[i]->file,Terminator,1);
>       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> [ 83%] Building C object CMakeFiles/pvrg-jpeg.dir/transform.o
> /usr/bin/cc -DNOTRUNCATE -DSYSV -I/<<PKGBUILDDIR>> -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -MD -MT CMakeFiles/pvrg-jpeg.dir/transform.o -MF CMakeFiles/pvrg-jpeg.dir/transform.o.d -o CMakeFiles/pvrg-jpeg.dir/transform.o -c /<<PKGBUILDDIR>>/transform.c
> cc1: some warnings being treated as errors
> [ 91%] Building C object CMakeFiles/pvrg-jpeg.dir/lexer.o
> /usr/bin/cc -DNOTRUNCATE -DSYSV -I/<<PKGBUILDDIR>> -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -MD -MT CMakeFiles/pvrg-jpeg.dir/lexer.o -MF CMakeFiles/pvrg-jpeg.dir/lexer.o.d -o CMakeFiles/pvrg-jpeg.dir/lexer.o -c /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/lexer.c
> make[3]: *** [CMakeFiles/pvrg-jpeg.dir/build.make:97: CMakeFiles/pvrg-jpeg.dir/codec.o] Error 1


The full build log is available from:
http://qa-logs.debian.net/2024/03/13/pvrg-jpeg_1.2.1+dfsg1-6_unstable.log

All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240313;users=lucas@debian.org
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20240313&fusertaguser=lucas@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results

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!

If you reassign this bug to another package, please mark it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects

If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.



More information about the Debian-med-packaging mailing list