Bug#1066378: pike8.0: FTBFS: zlibmod.c:1235:5: error: implicit declaration of function ‘pop_n_elems’ [-Werror=implicit-function-declaration]

2024-04-20 Thread Bastian Germann

I am uploading a NMU to fix this.
The debdiff is attached.diff -Nru pike8.0-8.0.1738/debian/README.Debian 
pike8.0-8.0.1738/debian/README.Debian
--- pike8.0-8.0.1738/debian/README.Debian   2015-09-20 16:40:03.0 
+
+++ pike8.0-8.0.1738/debian/README.Debian   2024-04-20 08:24:08.0 
+
@@ -13,6 +13,7 @@
dependencies.
  - Mird: Old, unmaintained, largely unknown library.
  - Msql: Obsolete, proprietary DBM.
+ - PCRE: Depends on outdated library.
  - PDF: Uses unmaintained libraries unavailable in Debian.
  - Ssleay: Obsolete.
  - Oracle: Proprietary DBM (so far ...).
diff -Nru pike8.0-8.0.1738/debian/changelog pike8.0-8.0.1738/debian/changelog
--- pike8.0-8.0.1738/debian/changelog   2024-03-10 11:50:21.0 +
+++ pike8.0-8.0.1738/debian/changelog   2024-04-20 08:24:08.0 +
@@ -1,3 +1,12 @@
+pike8.0 (8.0.1738-1.4) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * d/copyright: Replace MPL text with link to common-licenses.
+  * Fix implicit declarations (Closes: #1066378).
+  * Add note on dropped PCRE module.
+
+ -- Bastian Germann   Sat, 20 Apr 2024 08:24:08 +
+
 pike8.0 (8.0.1738-1.3) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru pike8.0-8.0.1738/debian/copyright pike8.0-8.0.1738/debian/copyright
--- pike8.0-8.0.1738/debian/copyright   2015-09-20 18:06:03.0 +
+++ pike8.0-8.0.1738/debian/copyright   2024-04-20 08:23:34.0 +
@@ -59,474 +59,5 @@
 On Debian GNU/Linux systems, the complete text of the GNU Lesser General
 Public License can be found in `/usr/share/common-licenses/LGPL-2.1'.
 
-The full text of the Mozilla Public License 1.1 follows.
-
-  MOZILLA PUBLIC LICENSE
-Version 1.1
-
-  ---
-
-1. Definitions.
-
- 1.0.1. "Commercial Use" means distribution or otherwise making the
- Covered Code available to a third party.
-
- 1.1. "Contributor" means each entity that creates or contributes to
- the creation of Modifications.
-
- 1.2. "Contributor Version" means the combination of the Original
- Code, prior Modifications used by a Contributor, and the Modifications
- made by that particular Contributor.
-
- 1.3. "Covered Code" means the Original Code or Modifications or the
- combination of the Original Code and Modifications, in each case
- including portions thereof.
-
- 1.4. "Electronic Distribution Mechanism" means a mechanism generally
- accepted in the software development community for the electronic
- transfer of data.
-
- 1.5. "Executable" means Covered Code in any form other than Source
- Code.
-
- 1.6. "Initial Developer" means the individual or entity identified
- as the Initial Developer in the Source Code notice required by Exhibit
- A.
-
- 1.7. "Larger Work" means a work which combines Covered Code or
- portions thereof with code not governed by the terms of this License.
-
- 1.8. "License" means this document.
-
- 1.8.1. "Licensable" means having the right to grant, to the maximum
- extent possible, whether at the time of the initial grant or
- subsequently acquired, any and all of the rights conveyed herein.
-
- 1.9. "Modifications" means any addition to or deletion from the
- substance or structure of either the Original Code or any previous
- Modifications. When Covered Code is released as a series of files, a
- Modification is:
-  A. Any addition to or deletion from the contents of a file
-  containing Original Code or previous Modifications.
-
-  B. Any new file that contains any part of the Original Code or
-  previous Modifications.
-
- 1.10. "Original Code" means Source Code of computer software code
- which is described in the Source Code notice required by Exhibit A as
- Original Code, and which, at the time of its release under this
- License is not already Covered Code governed by this License.
-
- 1.10.1. "Patent Claims" means any patent claim(s), now owned or
- hereafter acquired, including without limitation,  method, process,
- and apparatus claims, in any patent Licensable by grantor.
-
- 1.11. "Source Code" means the preferred form of the Covered Code for
- making modifications to it, including all modules it contains, plus
- any associated interface definition files, scripts used to control
- compilation and installation of an Executable, or source code
- differential comparisons against either the Original Code or another
- well known, available Covered Code of the Contributor's choice. The
- Source Code can be in a compressed or archival form, provided the
- appropriate decompression or de-archiving software is widely available
- for no charge.
-
- 1.12. "You" (or "Your")  means an individual or a legal entity
- exercising rights under, and complying with 

Bug#1066378: pike8.0: FTBFS: zlibmod.c:1235:5: error: implicit declaration of function ‘pop_n_elems’ [-Werror=implicit-function-declaration]

2024-04-11 Thread Zixing Liu
Package: pike8.0
Followup-For: Bug #1066378
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu noble ubuntu-patch
Control: tags -1 patch

Dear Maintainer,

This is an update to the previous patch that contains further fixes to the
package.

In Ubuntu, the attached patch was applied to achieve the following:

  * debian/patches/gz_test_fix.patch: Fix zlib detection logic.
  * debian/patches/threads_undefined_var_fix.patch: Fix incorrect
variable referencing in threads.c.  Closes LP: #2061023.


Thanks for considering the patch.


-- System Information:
Debian Release: bookworm/sid
  APT prefers jammy-updates
  APT policy: (500, 'jammy-updates'), (500, 'jammy-security'), (500, 'jammy'), 
(100, 'jammy-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.5.0-26-generic (SMP w/10 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_CA:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru pike8.0-8.0.1738/debian/patches/gz_test_fix.patch 
pike8.0-8.0.1738/debian/patches/gz_test_fix.patch
--- pike8.0-8.0.1738/debian/patches/gz_test_fix.patch   1969-12-31 
17:00:00.0 -0700
+++ pike8.0-8.0.1738/debian/patches/gz_test_fix.patch   2024-04-11 
14:31:45.0 -0600
@@ -0,0 +1,18 @@
+Description: Fix zlib detection logic
+ Fixes the issue where vendored zlib fails to compile on armhf
+Author: Zixing Liu 
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066378
+Bug-Ubuntu: https://bugs.launchpad.net/debian/+source/pike8.0/+bug/2061023
+Forwarded: no
+Last-Update: 2024-04-11
+--- pike8.0-8.0.1738.orig/src/modules/Gz/gz_test.c
 pike8.0-8.0.1738/src/modules/Gz/gz_test.c
+@@ -320,6 +320,8 @@ void test_sync(compr, comprLen, uncompr,
+ err = inflateSync(_stream);   /* but skip the damaged part */
+ CHECK_ERR(err, "inflateSync");
+ 
++inflateEnd(_stream);
++inflateInit(_stream);
+ err = inflate(_stream, Z_FINISH);
+ if (err != Z_DATA_ERROR) {
+ fprintf(stderr, "inflate should report DATA_ERROR\n");
diff -Nru pike8.0-8.0.1738/debian/patches/series 
pike8.0-8.0.1738/debian/patches/series
--- pike8.0-8.0.1738/debian/patches/series  2022-04-18 11:30:23.0 
-0600
+++ pike8.0-8.0.1738/debian/patches/series  2024-04-11 14:33:12.0 
-0600
@@ -13,3 +13,5 @@
 undefined_htons.patch
 bad_size_t_redef.patch
 dont_disable_debug_symbols.patch
+gz_test_fix.patch
+threads_undefined_var_fix.patch
diff -Nru pike8.0-8.0.1738/debian/patches/threads_undefined_var_fix.patch 
pike8.0-8.0.1738/debian/patches/threads_undefined_var_fix.patch
--- pike8.0-8.0.1738/debian/patches/threads_undefined_var_fix.patch 
1969-12-31 17:00:00.0 -0700
+++ pike8.0-8.0.1738/debian/patches/threads_undefined_var_fix.patch 
2024-04-11 14:33:12.0 -0600
@@ -0,0 +1,16 @@
+Description: Fix incorrect variable referencing in threads.c
+Author: Zixing Liu 
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/pike8.0/+bug/2061023
+Forwarded: no
+Last-Update: 2024-04-11
+--- pike8.0-8.0.1738.orig/src/threads.c
 pike8.0-8.0.1738/src/threads.c
+@@ -3422,7 +3422,7 @@ static TH_RETURN_TYPE farm(void *_a)
+ int current = prctl(PR_GET_DUMPABLE);
+ #endif
+ #ifdef HAVE_BROKEN_LINUX_THREAD_EUID
+-if( setegid(arg.egid) != 0 || seteuid(arg.euid) != 0 )
++if( setegid(me->egid) != 0 || seteuid(me->euid) != 0 )
+ {
+   fprintf (stderr, "%s:%d: Unexpected error from setegid(2). errno=%d\n",
+  __FILE__, __LINE__, errno);


Bug#1066378: pike8.0: FTBFS: zlibmod.c:1235:5: error: implicit declaration of function ‘pop_n_elems’ [-Werror=implicit-function-declaration]

2024-04-11 Thread Zixing Liu
Package: pike8.0
Followup-For: Bug #1066378
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu noble ubuntu-patch
Control: tags -1 patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

  * debian/patches/gz_test_fix.patch: Fix zlib detection logic.  Closes
LP: #2061023.


Thanks for considering the patch.


-- System Information:
Debian Release: bookworm/sid
  APT prefers jammy-updates
  APT policy: (500, 'jammy-updates'), (500, 'jammy-security'), (500, 'jammy'), 
(100, 'jammy-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.5.0-26-generic (SMP w/10 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_CA:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru pike8.0-8.0.1738/debian/patches/gz_test_fix.patch 
pike8.0-8.0.1738/debian/patches/gz_test_fix.patch
--- pike8.0-8.0.1738/debian/patches/gz_test_fix.patch   1969-12-31 
17:00:00.0 -0700
+++ pike8.0-8.0.1738/debian/patches/gz_test_fix.patch   2024-04-11 
14:31:45.0 -0600
@@ -0,0 +1,18 @@
+Description: Fix zlib detection logic
+ Fixes the issue where vendored zlib fails to compile on armhf
+Author: Zixing Liu 
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066378
+Bug-Ubuntu: https://bugs.launchpad.net/debian/+source/pike8.0/+bug/2061023
+Forwarded: no
+Last-Update: 2024-04-11
+--- pike8.0-8.0.1738.orig/src/modules/Gz/gz_test.c
 pike8.0-8.0.1738/src/modules/Gz/gz_test.c
+@@ -320,6 +320,8 @@ void test_sync(compr, comprLen, uncompr,
+ err = inflateSync(_stream);   /* but skip the damaged part */
+ CHECK_ERR(err, "inflateSync");
+ 
++inflateEnd(_stream);
++inflateInit(_stream);
+ err = inflate(_stream, Z_FINISH);
+ if (err != Z_DATA_ERROR) {
+ fprintf(stderr, "inflate should report DATA_ERROR\n");
diff -Nru pike8.0-8.0.1738/debian/patches/series 
pike8.0-8.0.1738/debian/patches/series
--- pike8.0-8.0.1738/debian/patches/series  2022-04-18 11:30:23.0 
-0600
+++ pike8.0-8.0.1738/debian/patches/series  2024-04-11 14:19:11.0 
-0600
@@ -13,3 +13,4 @@
 undefined_htons.patch
 bad_size_t_redef.patch
 dont_disable_debug_symbols.patch
+gz_test_fix.patch


Bug#1066378: pike8.0: FTBFS: zlibmod.c:1235:5: error: implicit declaration of function ‘pop_n_elems’ [-Werror=implicit-function-declaration]

2024-03-13 Thread Lucas Nussbaum
Source: pike8.0
Version: 8.0.1738-1.2
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 -I. -I/<>/src/modules/Gz 
> -I/<>/build/linux-6.1.0-13-cloud-amd64-x86_64 
> -I/<>/src -Wdate-time -D_FORTIFY_SOURCE=2 -DDEBIAN 
> -I/usr/local/include -DHAVE_CONFIG_H -Werror=implicit-function-declaration 
> -Wformat -Werror=format-security -ggdb -m64 -mrdrnd -O2 
> -ffile-prefix-map=/<>=. -fstack-protector-strong 
> -fstack-clash-protection -fcf-protection -fvisibility=hidden -pipe 
> -fvar-tracking-assignments -funswitch-loops -W -Wall -Wno-unused -Wcomment 
> -Wformat -Wformat-security -Wimplicit-function-declaration -Wmultichar 
> -Wunused-function -Wswitch -Wuninitialized -Wpointer-arith -Wchar-subscripts 
> -Wno-long-long -Wdeclaration-after-statement -fPIC -DDYNAMIC_MODULE -c 
> /<>/src/modules/Gz/zlibmod.c -o zlibmod.o -g -g
> /<>/src/modules/Gz/zlibmod.c: In function ‘gz_deflate_size’:
> /<>/src/modules/Gz/zlibmod.c:1235:5: error: implicit declaration 
> of function ‘pop_n_elems’ [-Werror=implicit-function-declaration]
>  1235 | pop_n_elems(args);
>   | ^~~
> /<>/src/modules/Gz/zlibmod.c:1239:5: error: implicit declaration 
> of function ‘push_int’ [-Werror=implicit-function-declaration]
>  1239 | push_int(
>   | ^~~~
> /<>/src/modules/Gz/zlibmod.c: At top level:
> /<>/src/modules/Gz/zlibmod.c:1247:13: warning: ‘gz_inflate_size’ 
> defined but not used [-Wunused-function]
>  1247 | static void gz_inflate_size( INT32 args )
>   | ^~~
> /<>/src/modules/Gz/zlibmod.c:1230:13: warning: ‘gz_deflate_size’ 
> defined but not used [-Wunused-function]
>  1230 | static void gz_deflate_size( INT32 args )
>   | ^~~
> cc1: some warnings being treated as errors
> Compilation command was:
> /<>/bin/smartlink gcc -I. -I/<>/src/modules/Gz 
> -I/<>/build/linux-6.1.0-13-cloud-amd64-x86_64 
> -I/<>/src   -Wdate-time -D_FORTIFY_SOURCE=2 -DDEBIAN 
> -I/usr/local/include -DHAVE_CONFIG_H  -g -g 
> -Werror=implicit-function-declaration -Wformat -Werror=format-security -ggdb 
> -m64  -mrdrnd -O2 -ffile-prefix-map=/<>=. 
> -fstack-protector-strong -fstack-clash-protection -fcf-protection 
> -fvisibility=hidden -pipe -fvar-tracking-assignments -funswitch-loops -W 
> -Wall -Wno-unused -Wcomment -Wformat -Wformat-security 
> -Wimplicit-function-declaration -Wmultichar -Wunused-function -Wswitch 
> -Wuninitialized -Wpointer-arith -Wchar-subscripts -Wno-long-long 
> -Wdeclaration-after-statement  -fPIC -DDYNAMIC_MODULE -c 
> /<>/src/modules/Gz/zlibmod.c -o zlibmod.o
> make[7]: *** [Makefile:168: zlibmod.o] Error 1


The full build log is available from:
http://qa-logs.debian.net/2024/03/13/pike8.0_8.0.1738-1.2_unstable.log

All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240313;users=lu...@debian.org
or:
https://udd.debian.org/bugs/?release=na=ign=7=7=only=ftbfs-20240313=lu...@debian.org=1=1=1=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.