NetBSD Problem Report #59448
From www@netbsd.org Thu May 29 03:24:34 2025
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 1BBC51A923C
for <gnats-bugs@gnats.NetBSD.org>; Thu, 29 May 2025 03:24:34 +0000 (UTC)
Message-Id: <20250529032432.D16AE1A923D@mollari.NetBSD.org>
Date: Thu, 29 May 2025 03:24:32 +0000 (UTC)
From: smallm@sdf.org
Reply-To: smallm@sdf.org
To: gnats-bugs@NetBSD.org
Subject: make replace of pkg_install fails in libfetch with -inet6 option
X-Send-Pr-Version: www-1.0
>Number: 59448
>Category: pkg
>Synopsis: make replace of pkg_install fails in libfetch with -inet6 option
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu May 29 03:25:00 +0000 2025
>Closed-Date: Thu May 29 15:07:25 +0000 2025
>Last-Modified: Thu May 29 15:10:01 +0000 2025
>Originator: Michael Small
>Release: pkgsrc-2025Q1 on 2025-05-03
>Organization:
>Environment:
NetBSD misty.Mauritania 10.1_STABLE NetBSD 10.1_STABLE (GENERIC) #0: Mon Jan 13 01:20:57 EST 2025 smallm@misty.Mauritania:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
A make replace of pkgtools/pkg_install at the start of a pkg_rolling-replace from pkgsrc-2024-Q4 to 2025-Q1 gave this error from a libfetch source file:
# compile libfetch/ftp.o
gcc -O2 -I/usr/include -DHAVE_NBCOMPAT_H=1 -I/usr/pkg/include -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wsystem-headers -Wno-traditional -Wa,--fatal-warnings -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wno-sign-compare -Wsign-compare -Wformat=2 -Wno-format-zero-length -Werror -fPIE -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -DDEF_UMASK=0022 -I/usr/pkgsrc/work/pkgtools/pkg_install/work/libfetch -I/usr/pkgsrc/work/pkgtools/pkg_install/work -I/usr/include -DHAVE_NBCOMPAT_H=1 -I/usr/pkg/include -I. -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -DWITH_SSL -DFTP_COMBINE_CWDS -c ftp.c -o ftp.o.o
ftp.c: In function 'ftp_transfer':
ftp.c:862:8: error: unused variable 'hname' [-Werror=unused-variable]
862 | char hname[INET6_ADDRSTRLEN];
| ^~~~~
cc1: all warnings being treated as errors
*** Error code 1
/etc/mk.conf on my machine has -inet6:
PKG_DEFAULT_OPTIONS= sasl tls zlib -cups -bluray -lua -wayland ghostscript \
vorbis theora libmpg123 -mad -pulseaudio oss -v4l2 xvid x264 \
-skey sun readline -iscsi -inet6 -bzip2 -libusb-1 -ldap \
imagemagick svg -llvm-target-aarch64 -llvm-target-amdgpu \
-llvm-target-bpf -llvm-target-mips \
-llvm-target-powerpc -llvm-target-sparc \
-llvm-target-systemz -gcc-fortran -gcc-objc++ -gcc-objc \
-gtk3-atk-bridge -exim-appendfile-maildir -exim-appendfile-mailstore \
-exim-appendfile-mbx -exim-content-scan -exim-lookup-dsearch \
-exim-old-demime -exim-tcp-wrappers -javascript -xinerama xaw3d -gtk3 \
-svg -dbus -acl -webrtc
If I make install from within net/libfetch directly, there's no error, but it seems not to run with a warnings as errors flag.
>How-To-Repeat:
Set the -inet6 option and make replace pkg_install.
>Fix:
--- net/libfetch/files/ftp.c.orig 2025-04-27 21:34:41.465046812 -0400
+++ net/libfetch/files/ftp.c 2025-05-16 23:18:07.221628027 -0400
@@ -859,8 +859,9 @@ retry_mode:
int low = CHECK_FLAG('l');
#endif
int d;
+#ifdef IPV6
char hname[INET6_ADDRSTRLEN];
-
+#endif
switch (u.ss.ss_family) {
case AF_INET6:
u.sin6.sin6_port = 0;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Thu, 29 May 2025 15:07:25 +0000
State-Changed-Why:
Committed, thanks!
From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/59448 CVS commit: pkgsrc/net/libfetch/files
Date: Thu, 29 May 2025 15:07:08 +0000
Module Name: pkgsrc
Committed By: wiz
Date: Thu May 29 15:07:08 UTC 2025
Modified Files:
pkgsrc/net/libfetch/files: ftp.c
Log Message:
libfetch: fix build with -Werror=unused-variable and inet6 turned off
From Michael Small in PR 59448.
To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 pkgsrc/net/libfetch/files/ftp.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.