Bug#1066267: libauthen-smb-perl: FTBFS: valid.c:22:3: error: implicit declaration of function ‘SMB_Init’ [-Werror=implicit-function-declaration]

Lucas Nussbaum lucas at debian.org
Wed Mar 13 11:40:30 GMT 2024


Source: libauthen-smb-perl
Version: 0.91-7
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):
> x86_64-linux-gnu-gcc -c   -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -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   -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC "-I/usr/lib/x86_64-linux-gnu/perl/5.38/CORE"   smbencrypt.c
> valid.c: In function ‘Valid_User’:
> valid.c:22:3: error: implicit declaration of function ‘SMB_Init’ [-Werror=implicit-function-declaration]
>    22 |   SMB_Init();
>       |   ^~~~~~~~
> valid.c:30:7: error: implicit declaration of function ‘SMB_Negotiate’ [-Werror=implicit-function-declaration]
>    30 |   if (SMB_Negotiate(con, SMB_Prots) < 0) { /* An error */
>       |       ^~~~~~~~~~~~~
> valid.c:31:5: error: implicit declaration of function ‘SMB_Discon’; did you mean ‘SMBtcon’? [-Werror=implicit-function-declaration]
>    31 |     SMB_Discon(con,0);
>       |     ^~~~~~~~~~
>       |     SMBtcon
> valid.c:42:7: error: implicit declaration of function ‘SMB_Logon_Server’; did you mean ‘SMB_Connect_Server’? [-Werror=implicit-function-declaration]
>    42 |   if (SMB_Logon_Server(con, USERNAME, PASSWORD) < 0) {
>       |       ^~~~~~~~~~~~~~~~
>       |       SMB_Connect_Server
> session.c: In function ‘RFCNB_Get_Error_Msg’:
> session.c:360:40: error: implicit declaration of function ‘abs’ [-Werror=implicit-function-declaration]
>   360 |   strncpy(msg_buf, RFCNB_Error_Strings[abs(code)], len);
>       |                                        ^~~
> Please specify prototyping behavior for Smb.xs (see perlxs manual)
> session.c:38:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘abs’
>    37 | #include "rfcnb-io.h"
>   +++ |+#include <stdlib.h>
>    38 | 
> mv Smb.xsc Smb.c
> x86_64-linux-gnu-gcc -c   -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -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   -DVERSION=\"0.91\" -DXS_VERSION=\"0.91\" -fPIC "-I/usr/lib/x86_64-linux-gnu/perl/5.38/CORE"   Smb.c
> smblib-util.c: In function ‘SMB_AtrToStr’:
> smblib-util.c:87:5: error: implicit declaration of function ‘strcat’ [-Werror=implicit-function-declaration]
>    87 |     strcat(SMB_Attrib_Temp, (verbose?"Read Only ":"R"));
>       |     ^~~~~~
> smblib-util.c:30:1: note: include ‘<string.h>’ or provide a declaration of ‘strcat’
>    29 | #include "rfcnb.h"
>   +++ |+#include <string.h>
>    30 | 
> smblib-util.c:87:5: warning: incompatible implicit declaration of built-in function ‘strcat’ [-Wbuiltin-declaration-mismatch]
>    87 |     strcat(SMB_Attrib_Temp, (verbose?"Read Only ":"R"));
>       |     ^~~~~~
> smblib-util.c:87:5: note: include ‘<string.h>’ or provide a declaration of ‘strcat’
> smblib-util.c:90:5: warning: incompatible implicit declaration of built-in function ‘strcat’ [-Wbuiltin-declaration-mismatch]
>    90 |     strcat(SMB_Attrib_Temp, (verbose?"Hidden ":"H"));
>       |     ^~~~~~
> smblib-util.c:90:5: note: include ‘<string.h>’ or provide a declaration of ‘strcat’
> smblib-util.c:93:5: warning: incompatible implicit declaration of built-in function ‘strcat’ [-Wbuiltin-declaration-mismatch]
>    93 |     strcat(SMB_Attrib_Temp, (verbose?"System ":"S"));
>       |     ^~~~~~
> smblib-util.c:93:5: note: include ‘<string.h>’ or provide a declaration of ‘strcat’
> smblib-util.c:96:5: warning: incompatible implicit declaration of built-in function ‘strcat’ [-Wbuiltin-declaration-mismatch]
>    96 |     strcat(SMB_Attrib_Temp, (verbose?"Volume ":"V"));
>       |     ^~~~~~
> smblib-util.c:96:5: note: include ‘<string.h>’ or provide a declaration of ‘strcat’
> smblib-util.c:99:5: warning: incompatible implicit declaration of built-in function ‘strcat’ [-Wbuiltin-declaration-mismatch]
>    99 |     strcat(SMB_Attrib_Temp, (verbose?"Directory ":"D"));
>       |     ^~~~~~
> smblib-util.c:99:5: note: include ‘<string.h>’ or provide a declaration of ‘strcat’
> smblib-util.c:102:5: warning: incompatible implicit declaration of built-in function ‘strcat’ [-Wbuiltin-declaration-mismatch]
>   102 |     strcat(SMB_Attrib_Temp, (verbose?"Archive ":"A"));
>       |     ^~~~~~
> smblib-util.c:102:5: note: include ‘<string.h>’ or provide a declaration of ‘strcat’
> smblib-util.c: In function ‘SMB_Figure_Protocol’:
> smblib-util.c:178:11: error: implicit declaration of function ‘strcmp’ [-Werror=implicit-function-declaration]
>   178 |       if (strcmp(dialects[prot_index], SMB_Prots[i]) == 0) { /* A match */
>       |           ^~~~~~
> smblib-util.c:178:11: note: include ‘<string.h>’ or provide a declaration of ‘strcmp’
> smblib-util.c: In function ‘SMB_Negotiate’:
> smblib-util.c:214:29: error: implicit declaration of function ‘strlen’ [-Werror=implicit-function-declaration]
>   214 |     prots_len = prots_len + strlen(Prots[i]) + 2; /* Account for null etc */
>       |                             ^~~~~~
> smblib-util.c:214:29: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
> smblib-util.c:214:29: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
> smblib-util.c:214:29: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
> smblib-util.c:266:5: error: implicit declaration of function ‘strcpy’ [-Werror=implicit-function-declaration]
>   266 |     strcpy(p + 1, Prots[i]);
>       |     ^~~~~~
> smblib-util.c:266:5: note: include ‘<string.h>’ or provide a declaration of ‘strcpy’
> smblib-util.c:266:5: warning: incompatible implicit declaration of built-in function ‘strcpy’ [-Wbuiltin-declaration-mismatch]
> smblib-util.c:266:5: note: include ‘<string.h>’ or provide a declaration of ‘strcpy’
> smblib-util.c:267:13: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
>   267 |     p = p + strlen(Prots[i]) + 2; /* Adjust len of p for null plus dialectID */
>       |             ^~~~~~
> smblib-util.c:267:13: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
> cc1: some warnings being treated as errors
> smblib-util.c:362:23: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘char *’ [-Wformat=]
>   362 |     fprintf(stderr, "%d", (char *)(SMB_Hdr(pkt) + SMB_negrLM_buf_offset));
>       |                      ~^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       |                       |   |
>       |                       int char *
>       |                      %s
> smblib-util.c:363:5: error: implicit declaration of function ‘memcpy’ [-Werror=implicit-function-declaration]
>   363 |     memcpy(Con_Handle->Encrypt_Key, p, 8);
>       |     ^~~~~~
> smblib-util.c:363:5: note: include ‘<string.h>’ or provide a declaration of ‘memcpy’
> smblib-util.c:363:5: warning: incompatible implicit declaration of built-in function ‘memcpy’ [-Wbuiltin-declaration-mismatch]
> smblib-util.c:363:5: note: include ‘<string.h>’ or provide a declaration of ‘memcpy’
> smblib-util.c:367:5: error: implicit declaration of function ‘strncpy’ [-Werror=implicit-function-declaration]
>   367 |     strncpy(p, Con_Handle -> Svr_PDom, sizeof(Con_Handle -> Svr_PDom) - 1);
>       |     ^~~~~~~
> smblib-util.c:367:5: note: include ‘<string.h>’ or provide a declaration of ‘strncpy’
> smblib-util.c:367:5: warning: incompatible implicit declaration of built-in function ‘strncpy’ [-Wbuiltin-declaration-mismatch]
> smblib-util.c:367:5: note: include ‘<string.h>’ or provide a declaration of ‘strncpy’
> smblib-util.c: In function ‘SMB_Get_My_Name’:
> smblib-util.c:421:5: warning: incompatible implicit declaration of built-in function ‘strncpy’ [-Wbuiltin-declaration-mismatch]
>   421 |     strncpy(name, "unknown", len);
>       |     ^~~~~~~
> smblib-util.c:421:5: note: include ‘<string.h>’ or provide a declaration of ‘strncpy’
> smblib-util.c: In function ‘SMB_TreeConnect’:
> smblib-util.c:465:15: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
>   465 |   param_len = strlen(path) + 2 + strlen(password) + 2 + strlen(device) + 2;
>       |               ^~~~~~
> smblib-util.c:465:15: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
> smblib-util.c:503:3: warning: incompatible implicit declaration of built-in function ‘strncpy’ [-Wbuiltin-declaration-mismatch]
>   503 |   strncpy(tree -> path, path, sizeof(tree -> path));
>       |   ^~~~~~~
> smblib-util.c:503:3: note: include ‘<string.h>’ or provide a declaration of ‘strncpy’
> make[2]: *** [Makefile:343: valid.o] Error 1


The full build log is available from:
http://qa-logs.debian.net/2024/03/13/libauthen-smb-perl_0.91-7_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-perl-maintainers mailing list