Bug#1066470: kxl: FTBFS: KXLsound.c:75:9: error: implicit declaration of function 'read'; did you mean 'fread'? [-Werror=implicit-function-declaration]

Lucas Nussbaum lucas at debian.org
Wed Mar 13 11:52:04 GMT 2024


Source: kxl
Version: 1.1.7-17
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):
>  gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"KXL\" -DVERSION=\"1.1.7\" -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_FCNTL_H=1 -DHAVE_MALLOC_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_LINUX_JOYSTICK_H=1 -DHAVE_LINUX_SOUNDCARD_H=1 -DTIME_WITH_SYS_TIME=1 -DRETSIGTYPE=void -DHAVE_SELECT=1 -I. -I. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c KXLjoystick.c  -fPIC -DPIC -o .libs/KXLjoystick.o
> KXLmisc.c: In function 'KXL_ReadU16':
> KXLmisc.c:196:3: warning: ignoring return value of 'fread' declared with attribute 'warn_unused_result' [-Wunused-result]
>   196 |   fread(c, 1, 2, fp);
>       |   ^~~~~~~~~~~~~~~~~~
> KXLmisc.c: In function 'KXL_ReadU32':
> KXLmisc.c:209:3: warning: ignoring return value of 'fread' declared with attribute 'warn_unused_result' [-Wunused-result]
>   209 |   fread(c, 1, 4, fp);
>       |   ^~~~~~~~~~~~~~~~~~
> KXLsound.c: In function 'KXL_SoundServer':
> KXLsound.c:75:9: error: implicit declaration of function 'read'; did you mean 'fread'? [-Werror=implicit-function-declaration]
>    75 |     if (read(KXL_SoundData.Pipe[0], &Command,sizeof(Command)) != sizeof(Command))
>       |         ^~~~
>       |         fread
> KXLsound.c:165:9: error: implicit declaration of function 'write'; did you mean 'fwrite'? [-Werror=implicit-function-declaration]
>   165 |         write(KXL_SoundData.Device, KXL_SoundData.PBuff, fragment_size);
>       |         ^~~~~
>       |         fwrite
> KXLimage.c: In function 'KXL_ReadBitmapHeader':
> KXLimage.c:112:3: warning: ignoring return value of 'fread' declared with attribute 'warn_unused_result' [-Wunused-result]
>   112 |   fread(hed->magic, 1, 2, fp);
>       |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> KXLimage.c:166:7: warning: ignoring return value of 'fread' declared with attribute 'warn_unused_result' [-Wunused-result]
>   166 |       fread(&(hed->data[i * hed->w]), hed->w, 1, fp);
>       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> KXLsound.c: In function 'KXL_InitSound':
> KXLsound.c:262:7: error: implicit declaration of function 'pipe' [-Werror=implicit-function-declaration]
>   262 |   if (pipe(KXL_SoundData.Pipe) < 0) {
>       |       ^~~~
> KXLsound.c:267:27: error: implicit declaration of function 'fork' [-Werror=implicit-function-declaration]
>   267 |   if ((KXL_SoundData.ID = fork()) < 0) {
>       |                           ^~~~
> KXLsound.c:273:5: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Werror=implicit-function-declaration]
>   273 |     close(KXL_SoundData.Pipe[1]);
>       |     ^~~~~
>       |     pclose
> KXLsound.c: In function 'KXL_LoadSound':
> KXLsound.c:213:3: warning: ignoring return value of 'fread' declared with attribute 'warn_unused_result' [-Wunused-result]
>   213 |   fread(dummy, sizeof(Uint8), 40, file);
>       |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> KXLsound.c:216:3: warning: ignoring return value of 'fread' declared with attribute 'warn_unused_result' [-Wunused-result]
>   216 |   fread(new.Data, sizeof(Uint8), new.Length, file);
>       |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> KXLjoystick.c: In function 'KXL_CloseJoystick':
> KXLjoystick.c:43:5: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Werror=implicit-function-declaration]
>    43 |     close(KXL_joydev);
>       |     ^~~~~
>       |     pclose
> KXLjoystick.c: In function 'KXL_ReadJoystick':
> KXLjoystick.c:55:9: error: implicit declaration of function 'read'; did you mean 'fread'? [-Werror=implicit-function-declaration]
>    55 |     if (read(KXL_joydev, my, JS_RETURN) == JS_RETURN) {
>       |         ^~~~
>       |         fread
>  gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"KXL\" -DVERSION=\"1.1.7\" -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_FCNTL_H=1 -DHAVE_MALLOC_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_LINUX_JOYSTICK_H=1 -DHAVE_LINUX_SOUNDCARD_H=1 -DTIME_WITH_SYS_TIME=1 -DRETSIGTYPE=void -DHAVE_SELECT=1 -I. -I. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c KXLmisc.c -o KXLmisc.o >/dev/null 2>&1
> cc1: some warnings being treated as errors
> make[2]: *** [Makefile:281: KXLjoystick.lo] Error 1


The full build log is available from:
http://qa-logs.debian.net/2024/03/13/kxl_1.1.7-17_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 Pkg-games-devel mailing list