NetBSD Problem Report #58671

From www@netbsd.org  Thu Sep 12 22:08:16 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 9F5501A923B
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 12 Sep 2024 22:08:16 +0000 (UTC)
Message-Id: <20240912220815.5D3FD1A9243@mollari.NetBSD.org>
Date: Thu, 12 Sep 2024 22:08:15 +0000 (UTC)
From: david@gutteridge.ca
Reply-To: david@gutteridge.ca
To: gnats-bugs@NetBSD.org
Subject: pkgsrc unzip does not function correctly on some recent Linux distros
X-Send-Pr-Version: www-1.0

>Number:         58671
>Category:       pkg
>Synopsis:       pkgsrc unzip does not function correctly on some recent Linux distros
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    linux-pkg-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 12 22:10:00 +0000 2024
>Last-Modified:  Thu Sep 26 00:20:01 +0000 2024
>Originator:     David H. Gutteridge
>Release:        current
>Organization:
TNF
>Environment:
Linux arcusxiii.nonus-porta.net 6.10.3-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Aug  5 14:30:00 UTC 2024 x86_64 GNU/Linux
>Description:
While trying to build various packages on Fedora 40, I encountered this
error:

docbook-simple$ bmake
=> Bootstrap dependency digest>=20211023: found digest-20220214
WARNING: [license.mk] Every package should define a LICENSE.
=> Checksum BLAKE2s OK for docbook-simple-1.1.zip
=> Checksum SHA512 OK for docbook-simple-1.1.zip
===> Checking for vulnerabilities in docbook-simple-1.1nb4
===> Extracting for docbook-simple-1.1nb4
error:  incompatible zlib version (expected 1.2.11, found 1.3.1.zlib-ng)
  error:  not enough memory to inflate sdocbook-custom.dtd
error:  incompatible zlib version (expected 1.2.11, found 1.3.1.zlib-ng)
  error:  not enough memory to inflate sdocbook.dtd
error:  incompatible zlib version (expected 1.2.11, found 1.3.1.zlib-ng)
  error:  not enough memory to inflate sdocbookref-custom.dtd
error:  incompatible zlib version (expected 1.2.11, found 1.3.1.zlib-ng)
  error:  not enough memory to inflate sdocbookref.dtd
error:  incompatible zlib version (expected 1.2.11, found 1.3.1.zlib-ng)
  error:  not enough memory to inflate sdbcent.mod
error:  incompatible zlib version (expected 1.2.11, found 1.3.1.zlib-ng)
  error:  not enough memory to inflate sdbhier.mod
error:  incompatible zlib version (expected 1.2.11, found 1.3.1.zlib-ng)
  error:  not enough memory to inflate sdbpool.mod
error:  incompatible zlib version (expected 1.2.11, found 1.3.1.zlib-ng)
  error:  not enough memory to inflate sinclist.mod
error:  incompatible zlib version (expected 1.2.11, found 1.3.1.zlib-ng)
  error:  not enough memory to inflate sdocbook.css
*** Error code 6

Stop.
bmake[1]: stopped in /home/disciple/NetBSD/pkgsrc/textproc/docbook-simple
*** Error code 1

(The base system unzip that's provided of course works fine, and that's
one way to avoid this problem.)

This occurs with various packages, e.g., also textproc/iso8879.

Comparing the two unzip versions, they're linked differently:

$ ldd /usr/bin/zip
	linux-vdso.so.1 (0x00007f79c615d000)
	libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f79c6124000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f79c5f33000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f79c615f000)
$ ldd ~/pkg/bin/unzip
	linux-vdso.so.1 (0x00007fe6030f5000)
	libz.so.1 => /lib64/libz.so.1 (0x00007fe6030af000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fe602ebe000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fe6030f7000)

(But I don't have any insight to provide beyond that at present.)

>How-To-Repeat:
As above.
>Fix:
One workaround is simply to use the base system unzip as a tool.

>Release-Note:

>Audit-Trail:
From: "David H. Gutteridge" <gutteridge@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/58671 CVS commit: pkgsrc/mk/tools
Date: Thu, 12 Sep 2024 22:12:32 +0000

 Module Name:	pkgsrc
 Committed By:	gutteridge
 Date:		Thu Sep 12 22:12:32 UTC 2024

 Modified Files:
 	pkgsrc/mk/tools: tools.Linux.mk

 Log Message:
 tools.Linux.mk: add unzip

 Perhaps surprisingly, unzip was never included, though it is for some
 other OSes. Works around PR pkg/58671, where the resulting archivers/
 zip does not function correctly on Fedora 40.


 To generate a diff of this commit:
 cvs rdiff -u -r1.71 -r1.72 pkgsrc/mk/tools/tools.Linux.mk

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: pkg-manager->linux-pkg-people
Responsible-Changed-By: gutteridge@NetBSD.org
Responsible-Changed-When: Thu, 12 Sep 2024 22:18:54 +0000
Responsible-Changed-Why:
Linux pkgsrc problem.

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/58671: pkgsrc unzip does not function correctly on some
 recent Linux distros
Date: Thu, 26 Sep 2024 00:17:03 +0000

 On Thu, Sep 12, 2024 at 10:10:00PM +0000, david@gutteridge.ca wrote:
  > ===> Extracting for docbook-simple-1.1nb4
  > error:  incompatible zlib version (expected 1.2.11, found 1.3.1.zlib-ng)
  >   error:  not enough memory to inflate sdocbook-custom.dtd
  >
  > [...]
  >
  > $ ldd ~/pkg/bin/unzip
  > 	linux-vdso.so.1 (0x00007fe6030f5000)
  > 	libz.so.1 => /lib64/libz.so.1 (0x00007fe6030af000)
  > 	libc.so.6 => /lib64/libc.so.6 (0x00007fe602ebe000)
  > 	/lib64/ld-linux-x86-64.so.2 (0x00007fe6030f7000)

 So it's linked against native libz but this causes it to plotz?

 What does USE_BUILTIN.zlib get set to? And what zlib bits get put in
 work/.buildlink?

 The message makes me think it's perhaps compiling against one version
 and linking with another, or compiling and linking against one version
 and getting another at runtime.

 -- 
 David A. Holland
 dholland@netbsd.org

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.