Bug#1066263: xfonts-utils: FTBFS: ../fonttosfnt/util.c:89:10: error: implicit declaration of function ‘vasprintf’; did you mean ‘vsprintf’? [-Werror=implicit-function-declaration]

2024-03-14 Thread Thomas Dickey
On Wed, Mar 13, 2024 at 10:44:07PM +0500, Andrey Rakhmatullin wrote:
> On Wed, Mar 13, 2024 at 12:46:49PM +0100, Lucas Nussbaum wrote:
> > > ../fonttosfnt/util.c: In function ‘vsprintf_alloc’:
> > > ../fonttosfnt/util.c:89:10: error: implicit declaration of function 
> > > ‘vasprintf’; did you mean ‘vsprintf’? 
> > > [-Werror=implicit-function-declaration]
> Looks like it's caused by the lack of -D_GNU_SOURCE, not sure who should
> set it. There is a very old debian/changelog entry about temporarily
> setting it from d/rules and fonttosfnt/write.c sets it but
> fonttosfnt/util.c doesn't and there is nothing related in the autotools
> stuff.

The Debian rules file is rather old, which may be the problem.

https://salsa.debian.org/xorg-team/font/xfonts-utils

In my (other) test packages, I haven't had to add -D_DEFAULT_SOURCE,**
only for non-package builds has that been necessary.

** -D_GNU_SOURCE should only be used for the rare program relying upon
   non-POSIX interfaces.

-- 
Thomas E. Dickey 
https://invisible-island.net


signature.asc
Description: PGP signature


Bug#1066263: xfonts-utils: FTBFS: ../fonttosfnt/util.c:89:10: error: implicit declaration of function ‘vasprintf’; did you mean ‘vsprintf’? [-Werror=implicit-function-declaration]

2024-03-13 Thread Andrey Rakhmatullin
On Wed, Mar 13, 2024 at 12:46:49PM +0100, Lucas Nussbaum wrote:
> > ../fonttosfnt/util.c: In function ‘vsprintf_alloc’:
> > ../fonttosfnt/util.c:89:10: error: implicit declaration of function 
> > ‘vasprintf’; did you mean ‘vsprintf’? 
> > [-Werror=implicit-function-declaration]
Looks like it's caused by the lack of -D_GNU_SOURCE, not sure who should
set it. There is a very old debian/changelog entry about temporarily
setting it from d/rules and fonttosfnt/write.c sets it but
fonttosfnt/util.c doesn't and there is nothing related in the autotools
stuff.

-- 
WBR, wRAR


signature.asc
Description: PGP signature


Bug#1066263: xfonts-utils: FTBFS: ../fonttosfnt/util.c:89:10: error: implicit declaration of function ‘vasprintf’; did you mean ‘vsprintf’? [-Werror=implicit-function-declaration]

2024-03-13 Thread Lucas Nussbaum
Source: xfonts-utils
Version: 1:7.7+6
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: lu...@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 -DHAVE_CONFIG_H -I. -I../fonttosfnt   -Wdate-time -D_FORTIFY_SOURCE=2 
> -DXVENDORNAME=\"X.Org\ Foundation\" -I/usr/include/freetype2 
> -I/usr/include/libpng16  -DXVENDORNAMESHORT=\"X.Org\" -D_BSD_SOURCE  -g -O2 
> -Werror=implicit-function-declaration -ffile-prefix-map=/<>=. 
> -fstack-protector-strong -fstack-clash-protection -Wformat 
> -Werror=format-security -fcf-protection -c ../fonttosfnt/write.c
> sed -e 's|__vendorversion__|"fonttosfnt 1.0.4" "X Version 11"|' -e 
> 's|__xorgversion__|"fonttosfnt 1.0.4" "X Version 11"|' -e 
> 's|__xservername__|Xorg|g' -e 's|__xconfigfile__|xorg.conf|g' -e 
> 's|__projectroot__|/usr|g' -e 's|__apploaddir__||' -e 
> 's|__appmansuffix__|1|g' -e 's|__libmansuffix__|3|g' -e 
> 's|__adminmansuffix__|8|g' -e 's|__miscmansuffix__|7|g' -e 
> 's|__filemansuffix__|5|g' < ../fonttosfnt/fonttosfnt.man > fonttosfnt.1
> In file included from 
> /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
>  from /usr/include/stdlib.h:26,
>  from ../fonttosfnt/struct.c:24:
> /usr/include/features.h:195:3: warning: #warning "_BSD_SOURCE and 
> _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
>   195 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use 
> _DEFAULT_SOURCE"
>   |   ^~~
> In file included from /usr/include/time.h:25,
>  from ../fonttosfnt/util.c:25:
> /usr/include/features.h:195:3: warning: #warning "_BSD_SOURCE and 
> _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
>   195 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use 
> _DEFAULT_SOURCE"
>   |   ^~~
> In file included from 
> /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
>  from /usr/include/stdio.h:27,
>  from ../fonttosfnt/read.c:26:
> /usr/include/features.h:195:3: warning: #warning "_BSD_SOURCE and 
> _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
>   195 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use 
> _DEFAULT_SOURCE"
>   |   ^~~
> In file included from 
> /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
>  from /usr/include/stdio.h:27,
>  from ../fonttosfnt/fonttosfnt.c:25:
> /usr/include/features.h:195:3: warning: #warning "_BSD_SOURCE and 
> _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
>   195 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use 
> _DEFAULT_SOURCE"
>   |   ^~~
> In file included from 
> /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
>  from /usr/include/stdio.h:27,
>  from ../fonttosfnt/write.c:29:
> /usr/include/features.h:195:3: warning: #warning "_BSD_SOURCE and 
> _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
>   195 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use 
> _DEFAULT_SOURCE"
>   |   ^~~
> ../fonttosfnt/read.c: In function ‘readFile’:
> ../fonttosfnt/read.c:239:40: warning: format ‘%d’ expects argument of type 
> ‘int’, but argument 4 has type ‘FT_Pos’ {aka ‘long int’} [-Wformat=]
>   239 | fprintf(stderr, "size %d: %dx%d\n",
>   |   ~^
>   ||
>   |int
>   |   %ld
>   240 | i,
>   241 | face->available_sizes[i].x_ppem >> 6,
>   | 
>   | |
>   | FT_Pos {aka long 
> int}
> ../fonttosfnt/read.c:239:43: warning: format ‘%d’ expects argument of type 
> ‘int’, but argument 5 has type ‘FT_Pos’ {aka ‘long int’} [-Wformat=]
>   239 | fprintf(stderr, "size %d: %dx%d\n",
>   |  ~^
>   |   |
>   |   int
>   |  %ld
> ..
>   242 | face->available_sizes[i].y_ppem >> 6);
>   | 
>   | |
>   | FT_Pos {aka long 
> int}
> ../fonttosfnt/util.c: In function ‘vsprintf_alloc’:
>