Your message dated Wed, 3 Jul 2024 18:40:47 +0200
with message-id <4931a657-ea0c-45c2-bc40-c2666dfeb...@debian.org>
has caused the   report #1075395,
regarding postfix-gld: ftbfs with GCC-14
to be marked as having been forwarded to the upstream software
author(s) Salim Gasmi <sa...@gasmi.net>

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1075395: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1075395
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Hello.

I've received the following report from the Debian bug system.

Summary: GLD does not build ok when using gcc-14 due to incorrect declarations
of some arguments.

The attached diff, which I will apply in my next upload, seems to be enough
to fix the problem.

Thanks.

-------- Mensaje reenviado --------
Asunto: Bug#1075395: postfix-gld: ftbfs with GCC-14
De: Matthias Klose <d...@debian.org>

Package: src:postfix-gld
Version: 1.7-9
Severity: important
Tags: sid trixie
User: debian-...@lists.debian.org
Usertags: ftbfs-gcc-14

[This bug is targeted to the upcoming trixie release]

Please keep this issue open in the bug tracker for the package it
was filed for.  If a fix in another package is required, please
file a bug for the other package (or clone), and add a block in this
package. Please keep the issue open until the package can be built in
a follow-up test rebuild.

The package fails to build in a test rebuild on at least amd64 with
gcc-14/g++-14, but succeeds to build with gcc-13/g++-13. The
severity of this report will be raised before the trixie release.

The full build log can be found at:
http://qa-logs.debian.net/2024/07/01/postfix-gld_1.7-9_unstable_gccexp.log
The last lines of the build log are at the end of this report.

To build with GCC 14, either set CC=gcc-14 CXX=g++-14 explicitly,
or install the gcc, g++, gfortran, ... packages from experimental.

  apt-get -t=experimental install g++

Common build failures are new warnings resulting in build failures with
-Werror turned on, or new/dropped symbols in Debian symbols files.
For other C/C++ related build failures see the porting guide at
http://gcc.gnu.org/gcc-14/porting_to.html

[...]
  141 | if(s<0) return(S_SOCK_ERR);
      | ^~
sockets.c:143:9: note: ...this statement, but the latter is misleadingly 
indented as if it were guarded by the ‘if’
  143 |         timeout.tv_sec=tout;
      |         ^~~~~~~
sockets.c: In function ‘ReadUdpData’:
sockets.c:494:68: warning: pointer targets in passing argument 6 of ‘recvfrom’ 
differ in signedness [-Wpointer-sign]
  494 |            nbytes=recvfrom(s,buffer,maxsize,0,(struct sockaddr *)0,(int 
*)0);
      |                                                                    
^~~~~~~~
      |                                                                    |
      |                                                                    int *
In file included from /usr/include/x86_64-linux-gnu/sys/socket.h:343,
                 from sockets.h:17,
                 from sockets.c:31:
/usr/include/x86_64-linux-gnu/bits/socket2.h:62:56: note: expected ‘socklen_t * 
restrict’ {aka ‘unsigned int * restrict’} but argument is of type ‘int *’
   62 |           __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len)
      |                                  ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
sockets.c: In function ‘CloseSocket’:
sockets.c:518:30: warning: comparison of constant ‘0’ with boolean expression 
is always false [-Wbool-compare]
  518 |         if ( (s && close(s)) < 0 ) return(S_CLOS_ERR);
      |                              ^
sockets.c: In function ‘GetPeerIp’:
sockets.c:643:48: error: passing argument 3 of ‘getpeername’ from incompatible 
pointer type [-Wincompatible-pointer-types]
  643 | if (getpeername(sock,(struct sockaddr *)&from, &foo) == 0)
      |                                                ^~~~
      |                                                |
      |                                                size_t * {aka long 
unsigned int *}
/usr/include/x86_64-linux-gnu/sys/socket.h:131:47: note: expected ‘socklen_t * 
restrict’ {aka ‘unsigned int * restrict’} but argument is of type ‘size_t *’ 
{aka ‘long unsigned int *’}
  131 |                         socklen_t *__restrict __len) __THROW;
      |                         ~~~~~~~~~~~~~~~~~~~~~~^~~~~
sockets.c: In function ‘WaitTcpServer’:
sockets.c:726:54: error: passing argument 3 of ‘accept’ from incompatible 
pointer type [-Wincompatible-pointer-types]
  726 | return(accept(serv.sd,(struct sockaddr *)&(serv.sin),&foo));
      |                                                      ^~~~
      |                                                      |
      |                                                      size_t * {aka long 
unsigned int *}
/usr/include/x86_64-linux-gnu/sys/socket.h:307:42: note: expected ‘socklen_t * 
restrict’ {aka ‘unsigned int * restrict’} but argument is of type ‘size_t *’ 
{aka ‘long unsigned int *’}
  307 |                    socklen_t *__restrict __addr_len);
      |                    ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
make[1]: *** [Makefile:9: sockets.o] Error 1
make[1]: *** Waiting for unfinished jobs....
greylist.c: In function ‘GreyList’:
greylist.c:99:9: warning: ‘__builtin_strncpy’ output may be truncated copying 
31 bytes from a string of length 31 [-Wstringop-truncation]
   99 |         strncpy(netw,oip,sizeof(netw)-1);
      |         ^
server.c: In function ‘HandleChild’:
server.c:226:84: warning: ‘%s’ directive output may be truncated writing up to 
2047 bytes into a region of size 2010 [-Wformat-truncation=]
  226 |                 snprintf(buff,sizeof(buff)-1,"Rejected New incoming 
connexion from %s (%s)\n",buff,ip);
      |                                                                         
           ^~         ~~~~
In file included from /usr/include/stdio.h:964,
                 from gld.h:1,
                 from server.c:1:
In function ‘snprintf’,
    inlined from ‘HandleChild’ at server.c:226:3:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:54:10: note: 
‘__builtin___snprintf_chk’ output 42 or more bytes (assuming 2089) into a 
destination of size 2047
   54 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   55 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   56 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/bits/stdio2.h:54:10: warning: 
‘__builtin___snprintf_chk’ argument 6 overlaps destination object ‘buff’ 
[-Wrestrict]
server.c: In function ‘HandleChild’:
server.c:191:6: note: destination object referenced by ‘restrict’-qualified 
argument 1 was declared here
  191 | char buff[BLEN];
      |      ^~~~
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j8 returned exit code 2
make: *** [debian/rules:3: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
From: Santiago Vila <sanv...@debian.org>
Subject: Fix build with gcc-14
Bug-Debian: https://bugs.debian.org/1075395

--- a/sockets.c
+++ b/sockets.c
@@ -634,7 +634,7 @@
 void GetPeerIp(int sock,char *ipfrom,char *hostfrom)
 {
 struct sockaddr_in from;
-size_t foo=sizeof(struct sockaddr_in);
+socklen_t foo=sizeof(struct sockaddr_in);
 struct hostent *hostptr;
 
 strcpy(ipfrom,"???.???.???.???");
@@ -722,7 +722,7 @@
 int WaitTcpServer(TcpServer serv)
 {
 
-size_t foo=sizeof(serv.sin);
+socklen_t foo=sizeof(serv.sin);
 return(accept(serv.sd,(struct sockaddr *)&(serv.sin),&foo));
 }
 

--- End Message ---

Reply via email to