NetBSD Problem Report #51127
From martin@duskware.de Mon May 9 19:47:22 2016
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 2D0A77A3DC
for <gnats-bugs@gnats.NetBSD.org>; Mon, 9 May 2016 19:47:22 +0000 (UTC)
Message-Id: <20160509194719.77985A8032@mail.duskware.de>
Date: Mon, 9 May 2016 21:47:19 +0200 (CEST)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: bootstrap fails on SunOS 5.6
X-Send-Pr-Version: 3.95
>Number: 51127
>Category: pkg
>Synopsis: bootstrap fails on SunOS 5.6
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: pkg-manager
>State: analyzed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon May 09 19:50:00 +0000 2016
>Closed-Date:
>Last-Modified: Mon Dec 11 01:30:06 +0000 2023
>Originator: Martin Husemann
>Release: NetBSD 7.99.29
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD night-owl.duskware.de 7.99.29 NetBSD 7.99.29 (NIGHT-OWL) #416: Mon May 9 09:11:13 CEST 2016 martin@night-owl.duskware.de:/usr/src/sys/arch/amd64/compile/NIGHT-OWL amd64
Architecture: x86_64
Machine: amd64
>Description:
Trying to bootstrap pkgsrc on an ancient sparc machine running SunOS 5.6
using pre-build gcc from http://jupiterrise.com/tgcware/ as compiler/toolchain
fails in libfetch due to socklen_t missing and "unsigned int" being
used instead by nbcompat.
On this system, the correct type would be "int".
>How-To-Repeat:
n/a
>Fix:
n/a
>Release-Note:
>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/51127: bootstrap fails on SunOS 5.6
Date: Mon, 9 May 2016 21:55:13 +0200
Here is a sketch for an enhanced autoconf test - using the derived
value and exporting the definition needs to be added.
Martin
Index: configure.ac
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/libnbcompat/files/configure.ac,v
retrieving revision 1.86
diff -u -r1.86 configure.ac
--- configure.ac 1 Sep 2015 23:17:51 -0000 1.86
+++ configure.ac 1 May 2016 10:41:13 -0000
@@ -345,6 +345,44 @@
AC_LIBOBJ(getaddrinfo)
fi
+dnl If we do not have socklen_t, figure out what to substitute for it
+old_CFLAGS="$CFLAGS"
+if test "x$ac_cv_type_socklen_t" = xno; then
+ AC_MSG_CHECKING(whether compiler understands -Wall -Werror)
+ CFLAGS="$CFLAGS -Wall -Werror"
+ AC_TRY_COMPILE([],[], [
+
+ AC_MSG_RESULT(yes)
+ AC_MSG_CHECKING(for type to use instead of socklen_t)
+ socklen_t_found="no"
+ socklen_surrogate=""
+ AC_DEFUN(AC_TRY_SOCKLEN, [
+ AC_TRY_COMPILE([#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#include <sys/socket.h>
+], [
+ $1 l;
+ getsockname(0, 0, &l);
+], [ socklen_t_found=yes ], [ socklen_t_found=no ])
+ if test "x[$]socklen_t_found" = "xyes"; then
+ socklen_surrogate="$1"
+ fi
+ ])
+ AC_TRY_SOCKLEN(int)
+ if test $socklen_t_found = "no"; then
+ AC_TRY_SOCKLEN(size_t)
+ if test $socklen_t_found = "no"; then
+ AC_TRY_SOCKLEN(unsigned int)
+ fi
+ fi
+ ], [ AC_MSG_RESULT(no) ])
+fi
+AC_DEFINE(SOCKLEN_SURROGATE, socklen_surrogate,
+ [Type to use as surrogate for socklen_t])
+AC_MSG_RESULT($socklen_surrogate)
+CFLAGS="$old_CFLAGS"
+
need_findenv=no
AC_CHECK_FUNCS([getenv setenv unsetenv], [:], [need_findenv=yes])
if test $need_findenv = yes; then
State-Changed-From-To: open->analyzed
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Mon, 11 Dec 2023 01:30:06 +0000
State-Changed-Why:
problem analyzed, candidate patch posted
>Unformatted:
(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-2023
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.