Bug#1066649: libtritonus-java: FTBFS: org_tritonus_lowlevel_pogg_Buffer.c:224:16: error: implicit declaration of function ‘memcpy’ [-Werror=implicit-function-declaration]

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


Source: libtritonus-java
Version: 20070428-14.1
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 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g -Wall -I. -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux -I../../../jni/ -fPIC -D_REENTRANT   -c -o org_tritonus_lowlevel_pogg_Buffer.o org_tritonus_lowlevel_pogg_Buffer.c
> In file included from common.h:24,
>                  from org_tritonus_lowlevel_pogg_Buffer.c:27:
> org_tritonus_lowlevel_pogg_Buffer.c: In function ‘setHandle’:
> ../common/HandleFieldHandler.h:59:57: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
>    59 |         (*env)->SetLongField(env, obj, fieldID, (jlong) (int) handle);       \
>       |                                                         ^
> org_tritonus_lowlevel_pogg_Buffer.c:30:1: note: in expansion of macro ‘HandleFieldHandlerDeclaration’
>    30 | HandleFieldHandlerDeclaration(handler, oggpack_buffer*)
>       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> org_tritonus_lowlevel_pogg_Buffer.c: In function ‘getHandle’:
> ../common/HandleFieldHandler.h:66:26: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>    66 |         _type   handle = (_type) (int) (*env)->GetLongField(env, obj, fieldID); \
>       |                          ^
> org_tritonus_lowlevel_pogg_Buffer.c:30:1: note: in expansion of macro ‘HandleFieldHandlerDeclaration’
>    30 | HandleFieldHandlerDeclaration(handler, oggpack_buffer*)
>       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> org_tritonus_lowlevel_pogg_Buffer.c: In function ‘Java_org_tritonus_lowlevel_pogg_Buffer_readInit’:
> org_tritonus_lowlevel_pogg_Buffer.c:224:16: error: implicit declaration of function ‘memcpy’ [-Werror=implicit-function-declaration]
>   224 |         (void) memcpy(buffer2, buffer, nBytes);
>       |                ^~~~~~
> org_tritonus_lowlevel_pogg_Buffer.c:29:1: note: include ‘<string.h>’ or provide a declaration of ‘memcpy’
>    28 | #include "org_tritonus_lowlevel_pogg_Buffer.h"
>   +++ |+#include <string.h>
>    29 | 
> org_tritonus_lowlevel_pogg_Buffer.c:224:16: warning: incompatible implicit declaration of built-in function ‘memcpy’ [-Wbuiltin-declaration-mismatch]
>   224 |         (void) memcpy(buffer2, buffer, nBytes);
>       |                ^~~~~~
> org_tritonus_lowlevel_pogg_Buffer.c:224:16: note: include ‘<string.h>’ or provide a declaration of ‘memcpy’
> org_tritonus_lowlevel_pogg_Buffer.c: In function ‘Java_org_tritonus_lowlevel_pogg_Buffer_getBuffer’:
> org_tritonus_lowlevel_pogg_Buffer.c:439:61: warning: pointer targets in passing argument 5 of ‘(*env)->SetByteArrayRegion’ differ in signedness [-Wpointer-sign]
>   439 |         (*env)->SetByteArrayRegion(env, abBuffer, 0, bytes, buffer);
>       |                                                             ^~~~~~
>       |                                                             |
>       |                                                             unsigned char *
> org_tritonus_lowlevel_pogg_Buffer.c:439:61: note: expected ‘const jbyte *’ {aka ‘const signed char *’} but argument is of type ‘unsigned char *’
> cc1: some warnings being treated as errors
> make[2]: *** [<builtin>: org_tritonus_lowlevel_pogg_Buffer.o] Error 1


The full build log is available from:
http://qa-logs.debian.net/2024/03/13/libtritonus-java_20070428-14.1_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-java-maintainers mailing list