Bug#1066531: policykit-1: FTBFS: ../subprojects/mocklibc-1.0/src/netgroup-debug.c:25:3: error: implicit declaration of function ‘print_indent’ [-Werror=implicit-function-declaration]
Am 15.03.24 um 19:55 schrieb Michael Biebl: Control: tags -1 - patch On Wed, 13 Mar 2024 13:01:49 + Mark Hindley wrote: Control: tags -1 patch I also bumped into this whilst rebuilding src:policykit-1 yesterday. There is an upstream patch[1], but it doesn't fix the build for me; I think it is patching the wrong files.The problem appears to be multiple copies of mocklibc. AFAICS ./test/mocklibc is not used in favour of a meson subproject. The pkla-compat tarball also has mocklibc, but that is also patched already. We should drop pkla-compat in trixie. But that is a separate issue. Getting the multiple layers of quilt and meson patches to work was unpleasant. So the attached patch may save you some time. HTH Mark [1] https://github.com/polkit-org/polkit/commit/0d78d1e4bf5ab3ce11678005b220aac0cfc5bee5 Thanks for the patch Unfortunately it fails to apply to the src:policykit-1 package as shipped in Debian sid. Thus marking the bug report accordingly. Thanks for hint regarding diff_files for wrapped Meson projects. I've submitted this upstream as https://github.com/polkit-org/polkit/pull/436 OpenPGP_signature.asc Description: OpenPGP digital signature
Bug#1066531: policykit-1: FTBFS: ../subprojects/mocklibc-1.0/src/netgroup-debug.c:25:3: error: implicit declaration of function ‘print_indent’ [-Werror=implicit-function-declaration]
Control: tags -1 - patch On Wed, 13 Mar 2024 13:01:49 + Mark Hindley wrote: Control: tags -1 patch I also bumped into this whilst rebuilding src:policykit-1 yesterday. There is an upstream patch[1], but it doesn't fix the build for me; I think it is patching the wrong files.The problem appears to be multiple copies of mocklibc. AFAICS ./test/mocklibc is not used in favour of a meson subproject. The pkla-compat tarball also has mocklibc, but that is also patched already. Getting the multiple layers of quilt and meson patches to work was unpleasant. So the attached patch may save you some time. HTH Mark [1] https://github.com/polkit-org/polkit/commit/0d78d1e4bf5ab3ce11678005b220aac0cfc5bee5 Thanks for the patch Unfortunately it fails to apply to the src:policykit-1 package as shipped in Debian sid. Thus marking the bug report accordingly. OpenPGP_signature.asc Description: OpenPGP digital signature
Bug#1066531: policykit-1: FTBFS: ../subprojects/mocklibc-1.0/src/netgroup-debug.c:25:3: error: implicit declaration of function ‘print_indent’ [-Werror=implicit-function-declaration]
Control: tags -1 patch I also bumped into this whilst rebuilding src:policykit-1 yesterday. There is an upstream patch[1], but it doesn't fix the build for me; I think it is patching the wrong files.The problem appears to be multiple copies of mocklibc. AFAICS ./test/mocklibc is not used in favour of a meson subproject. The pkla-compat tarball also has mocklibc, but that is also patched already. Getting the multiple layers of quilt and meson patches to work was unpleasant. So the attached patch may save you some time. HTH Mark [1] https://github.com/polkit-org/polkit/commit/0d78d1e4bf5ab3ce11678005b220aac0cfc5bee5 >From f50131bcb98802a66dcc1ee4cc952ca1cc9f8ff4 Mon Sep 17 00:00:00 2001 From: Mark Hindley Date: Wed, 13 Mar 2024 09:13:27 + Subject: [PATCH] Import upstream patch to fix embedded mocklibc subproject FTBFS with gcc 14. --- ...e-print_indent-function-to-the-file-.patch | 91 +++ debian/patches/series | 1 + 2 files changed, 92 insertions(+) create mode 100644 debian/patches/06-embedded-mocklibc-move-the-print_indent-function-to-the-file-.patch diff --git a/debian/patches/06-embedded-mocklibc-move-the-print_indent-function-to-the-file-.patch b/debian/patches/06-embedded-mocklibc-move-the-print_indent-function-to-the-file-.patch new file mode 100644 index ..184161b7 --- /dev/null +++ b/debian/patches/06-embedded-mocklibc-move-the-print_indent-function-to-the-file-.patch @@ -0,0 +1,91 @@ +--- a/subprojects/mocklibc.wrap b/subprojects/mocklibc.wrap +@@ -8,3 +8,5 @@ + patch_url = https://wrapdb.mesonbuild.com/v1/projects/mocklibc/1.0/2/get_zip + patch_filename = mocklibc-1.0-2-wrap.zip + patch_hash = 0280f96a2eeb3c023e5acf4e00cef03d362868218d4a85347ea45137c0ef6c56 ++diff_files = mocklibc-move-the-print_indent-function-to-the-file.patch ++ +--- /dev/null b/subprojects/packagefiles/mocklibc-move-the-print_indent-function-to-the-file.patch +@@ -0,0 +1,69 @@ ++From 0d78d1e4bf5ab3ce11678005b220aac0cfc5bee5 Mon Sep 17 00:00:00 2001 ++From: Vincent Mihalkovic ++Date: Fri, 8 Mar 2024 14:04:33 +0100 ++Subject: [PATCH] mocklibc: move the print_indent function to the file where it ++ is used ++MIME-Version: 1.0 ++Content-Type: text/plain; charset=UTF-8 ++Content-Transfer-Encoding: 8bit ++ ++This fixes build error with GCC >= 14 and clang >= 17, ++failing on: ++``` ++../subprojects/mocklibc-1.0/src/netgroup-debug.c:25:3: error: implicit declaration of function ‘print_indent’ [-Wimplicit-function-declaration] ++ 25 | print_indent(stream, indent); ++ | ^~~~ ++``` ++ ++Closes: #6 ++--- ++ src/netgroup-debug.c | 11 +++ ++ src/netgroup.c | 11 --- ++ 2 files changed, 11 insertions(+), 11 deletions(-) ++ ++diff --git a/src/netgroup-debug.c b/src/netgroup-debug.c ++index 81d6e728..46e5b25f 100644 ++--- a/src/netgroup-debug.c + b/src/netgroup-debug.c ++@@ -21,6 +21,17 @@ ++ #include ++ #include ++ +++/** +++ * Print a varaible indentation to the stream. +++ * @param stream Stream to print to +++ * @param indent Number of indents to use +++ */ +++static void print_indent(FILE *stream, unsigned int indent) { +++ int i; +++ for (i = 0; i < indent; i++) +++fprintf(stream, " "); +++} +++ ++ void netgroup_debug_print_entry(struct entry *entry, FILE *stream, unsigned int indent) { ++ print_indent(stream, indent); ++ ++diff --git a/src/netgroup.c b/src/netgroup.c ++index 06a8a894..e16e4519 100644 ++--- a/src/netgroup.c + b/src/netgroup.c ++@@ -71,17 +71,6 @@ static char *parser_copy_word(char **cur) { ++ return result; ++ } ++ ++-/** ++- * Print a varaible indentation to the stream. ++- * @param stream Stream to print to ++- * @param indent Number of indents to use ++- */ ++-void print_indent(FILE *stream, unsigned int indent) { ++- int i; ++- for (i = 0; i < indent; i++) ++-fprintf(stream, " "); ++-} ++- ++ /** ++ * Connect entries with 'child' type to their child entries. ++ * @param headentry Head of list of entries that need to be connected ++-- ++2.39.2 +--- a/meson.build b/meson.build +@@ -7,7 +7,7 @@ + 'prefix=/usr', + 'cpp_std=c++17', + ], +- meson_version: '>= 0.50.0', ++ meson_version: '>= 0.63.0', + ) + + pk_version = meson.project_version() diff --git a/debian/patches/series b/debian/patches/series index ddbec3c1..24156d33 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ +06-embedded-mocklibc-move-the-print_indent-function-to-the-file-.patch 04-fix-pkexec-fails-with-GDBus.Error-org.freedesktop.Po.patch 01_devuan-pkexec-pass-gtk-vars.patch 02_gettext.patch -- 2.39.2
Bug#1066531: policykit-1: FTBFS: ../subprojects/mocklibc-1.0/src/netgroup-debug.c:25:3: error: implicit declaration of function ‘print_indent’ [-Werror=implicit-function-declaration]
Source: policykit-1 Version: 124-1 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): > cc -Isubprojects/mocklibc-1.0/src/mocklibc-debug-netgroup.p > -Isubprojects/mocklibc-1.0/src -I../subprojects/mocklibc-1.0/src > -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g -O2 > -Werror=implicit-function-declaration -ffile-prefix-map=/<>=. > -fstack-protector-strong -fstack-clash-protection -Wformat > -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -MD > -MQ subprojects/mocklibc-1.0/src/mocklibc-debug-netgroup.p/netgroup-debug.c.o > -MF > subprojects/mocklibc-1.0/src/mocklibc-debug-netgroup.p/netgroup-debug.c.o.d > -o subprojects/mocklibc-1.0/src/mocklibc-debug-netgroup.p/netgroup-debug.c.o > -c ../subprojects/mocklibc-1.0/src/netgroup-debug.c > ../subprojects/mocklibc-1.0/src/netgroup-debug.c: In function > ‘netgroup_debug_print_entry’: > ../subprojects/mocklibc-1.0/src/netgroup-debug.c:25:3: error: implicit > declaration of function ‘print_indent’ [-Werror=implicit-function-declaration] >25 | print_indent(stream, indent); > | ^~~~ > cc1: some warnings being treated as errors > [90/108] cc -o src/programs/pkexec src/programs/pkexec.p/pkexec.c.o > -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -g -O2 > -Werror=implicit-function-declaration -ffile-prefix-map=/<>=. > -fstack-protector-strong -fstack-clash-protection -Wformat > -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 > '-Wl,-rpath,$ORIGIN/../polkitagent:$ORIGIN/../polkit' > -Wl,-rpath-link,/<>/obj-x86_64-linux-gnu/src/polkitagent > -Wl,-rpath-link,/<>/obj-x86_64-linux-gnu/src/polkit > -Wl,--start-group src/polkitagent/libpolkit-agent-1.so.0.0.0 > src/polkit/libpolkit-gobject-1.so.0.0.0 -lpam > /usr/lib/x86_64-linux-gnu/libgio-2.0.so > /usr/lib/x86_64-linux-gnu/libgobject-2.0.so > /usr/lib/x86_64-linux-gnu/libglib-2.0.so -Wl,--end-group > [91/108] cc -Isubprojects/mocklibc-1.0/src/libmocklibc.so.0.0.0.p > -Isubprojects/mocklibc-1.0/src -I../subprojects/mocklibc-1.0/src > -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g -O2 > -Werror=implicit-function-declaration -ffile-prefix-map=/<>=. > -fstack-protector-strong -fstack-clash-protection -Wformat > -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC > -MD -MQ subprojects/mocklibc-1.0/src/libmocklibc.so.0.0.0.p/netgroup.c.o -MF > subprojects/mocklibc-1.0/src/libmocklibc.so.0.0.0.p/netgroup.c.o.d -o > subprojects/mocklibc-1.0/src/libmocklibc.so.0.0.0.p/netgroup.c.o -c > ../subprojects/mocklibc-1.0/src/netgroup.c > [92/108] cc -Itest/polkit/polkitunixgrouptest.p -Itest/polkit > -I../test/polkit -Isrc -I../src -Isrc/polkit -I/usr/include/glib-2.0 > -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount > -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -fdiagnostics-color=always > -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c99 -DHAVE_CONFIG_H -g -O2 > -Werror=implicit-function-declaration -ffile-prefix-map=/<>=. > -fstack-protector-strong -fstack-clash-protection -Wformat > -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 > -pthread -D_POLKIT_COMPILATION -D_POLKIT_BACKEND_COMPILATION -MD -MQ > test/polkit/polkitunixgrouptest.p/polkitunixgrouptest.c.o -MF > test/polkit/polkitunixgrouptest.p/polkitunixgrouptest.c.o.d -o > test/polkit/polkitunixgrouptest.p/polkitunixgrouptest.c.o -c > ../test/polkit/polkitunixgrouptest.c > [93/108] cc -Itest/polkit/polkitunixusertest.p -Itest/polkit -I../test/polkit > -Isrc -I../src -Isrc/polkit -I/usr/include/glib-2.0 > -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount > -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -fdiagnostics-color=always > -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c99 -DHAVE_CONFIG_H -g -O2 > -Werror=implicit-function-declaration -ffile-prefix-map=/<>=. > -fstack-protector-strong -fstack-clash-protection -Wformat > -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 > -pthread -D_POLKIT_COMPILATION -D_POLKIT_BACKEND_COMPILATION -MD -MQ > test/polkit/polkitunixusertest.p/polkitunixusertest.c.o -MF > test/polkit/polkitunixusertest.p/polkitunixusertest.c.o.d -o > test/polkit/polkitunixusertest.p/polkitunixusertest.c.o -c > ../test/polkit/polkitunixusertest.c > [94/108] cc -Itest/polkit/polkitunixnetgrouptest.p -Itest/polkit > -I../test/polkit -Isrc -I../src -Isrc/polkit -I/usr/include/glib-2.0 > -I/usr/lib/x86_64-linux-gnu/glib-2.0/include