NetBSD Problem Report #54628
From www@netbsd.org Fri Oct 18 15:29:44 2019
Return-Path: <www@netbsd.org>
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 "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 725557A1EE
for <gnats-bugs@gnats.NetBSD.org>; Fri, 18 Oct 2019 15:29:44 +0000 (UTC)
Message-Id: <20191018152943.B49A27A26E@mollari.NetBSD.org>
Date: Fri, 18 Oct 2019 15:29:43 +0000 (UTC)
From: cryintothebluesky@gmail.com
Reply-To: cryintothebluesky@gmail.com
To: gnats-bugs@NetBSD.org
Subject: x11/libXdmcp fails to build on Solaris 11
X-Send-Pr-Version: www-1.0
>Number: 54628
>Category: pkg
>Synopsis: x11/libXdmcp fails to build on Solaris 11
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: gutteridge
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Oct 18 15:30:00 +0000 2019
>Closed-Date: Thu Mar 17 01:14:33 +0000 2022
>Last-Modified: Thu Mar 17 08:50:01 +0000 2022
>Originator: Sad Clouds
>Release:
>Organization:
>Environment:
SunOS pkgsrc 5.11 11.3 sun4v sparc SUNW,SPARC-Enterprise-T5220
>Description:
===> Building for libXdmcp-1.1.3
--- all ---
/opt/pkg/bin/bmake all-recursive
--- all-recursive ---
Making all in doc
Making all in .
--- Key.lo ---
CC Key.lo
Key.c: In function 'arc4random_buf':
Key.c:86:11: error: implicit declaration of function 'getentropy' [-Werror=implicit-function-declaration]
86 | ret = getentropy (auth, len);
| ^~~~~~~~~~
Key.c:86:11: warning: nested extern declaration of 'getentropy' [-Wnested-externs]
cc1: some warnings being treated as errors
*** [Key.lo] Error code 1
>How-To-Repeat:
>Fix:
Key.c file needs to include the following header for getentropy()
#include <sys/random.h>
>Release-Note:
>Audit-Trail:
From: Patrick Welche <prlw1@cam.ac.uk>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/54628: x11/libXdmcp fails to build on Solaris 11
Date: Fri, 18 Oct 2019 16:38:55 +0100
> 86 | ret = getentropy (auth, len);
> | ^~~~~~~~~~
> Key.c:86:11: warning: nested extern declaration of 'getentropy' [-Wnested-externs]
This says that configure has decided both that you have a getentropy()
function, AND that you don't have a arc4random_buf() function. Is
that really true?
From: Sad Clouds <cryintothebluesky@gmail.com>
To: gnats-bugs@netbsd.org
Cc: Patrick Welche <prlw1@cam.ac.uk>, pkg-manager@netbsd.org,
gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org, cryintothebluesky@gmail.com
Subject: Re: pkg/54628: x11/libXdmcp fails to build on Solaris 11
Date: Fri, 18 Oct 2019 18:04:24 +0100
On Fri, 18 Oct 2019 15:40:01 +0000 (UTC)
Patrick Welche <prlw1@cam.ac.uk> wrote:
> The following reply was made to PR pkg/54628; it has been noted by
> GNATS.
>
> From: Patrick Welche <prlw1@cam.ac.uk>
> To: gnats-bugs@netbsd.org
> Cc:
> Subject: Re: pkg/54628: x11/libXdmcp fails to build on Solaris 11
> Date: Fri, 18 Oct 2019 16:38:55 +0100
>
> > 86 | ret = getentropy (auth, len);
> > | ^~~~~~~~~~
> > Key.c:86:11: warning: nested extern declaration of
> > 'getentropy' [-Wnested-externs]
>
> This says that configure has decided both that you have a getentropy
> () function, AND that you don't have a arc4random_buf() function. Is
> that really true?
>
Seem to be the case on Solaris 11.3
configure:19499: checking for arc4random_buf
configure:19499: gcc -o conftest -O2 -D_FORTIFY_SOURCE=2 -I/opt/pkg/include -I/opt/pkg/include -L/opt/pkg/lib -Wl,-R/opt/pkg/lib conftest.c -lsocket >&5
Undefined first referenced
symbol in file
arc4random_buf /var/tmp//ccCMa4jI.o
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status
configure:19499: $? = 1
I believe on Solaris 11.4 arc4random_buf is available.
From: Sad Clouds <cryintothebluesky@gmail.com>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/54628: x11/libXdmcp fails to build on Solaris 11
Date: Thu, 13 Jan 2022 20:35:28 +0000
This bug has been open for several years now. Is there something
stopping people from fixing this for Solaris? Looks like the patch
should be relatively simple.
Responsible-Changed-From-To: pkg-manager->gutteridge
Responsible-Changed-By: gutteridge@NetBSD.org
Responsible-Changed-When: Fri, 14 Jan 2022 01:44:48 +0000
Responsible-Changed-Why:
Take. (Though I don't have the OS version to replicate this with.)
From: "David H. Gutteridge" <gutteridge@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54628 CVS commit: pkgsrc/x11/libXdmcp
Date: Fri, 14 Jan 2022 02:00:00 +0000
Module Name: pkgsrc
Committed By: gutteridge
Date: Fri Jan 14 02:00:00 UTC 2022
Modified Files:
pkgsrc/x11/libXdmcp: distinfo
Added Files:
pkgsrc/x11/libXdmcp/patches: patch-Key.c
Log Message:
libXdmcp: fix builds with Solaris 11.3
There are circumstances where getentropy() exists but arc4random_buf()
does not, as reported to be the case with Solaris 11.3 in PR pkg/54628,
report and analysis by Sad Clouds.
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 pkgsrc/x11/libXdmcp/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/x11/libXdmcp/patches/patch-Key.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: gutteridge@NetBSD.org
State-Changed-When: Fri, 14 Jan 2022 02:07:56 +0000
State-Changed-Why:
Please verify this fix (I cannot reproduce with OmniOS, it's too new).
From: Sad Clouds <cryintothebluesky@gmail.com>
To: gnats-bugs@netbsd.org
Cc: gutteridge@NetBSD.org, gutteridge@netbsd.org, pkgsrc-bugs@netbsd.org,
gnats-admin@netbsd.org
Subject: Re: pkg/54628 (x11/libXdmcp fails to build on Solaris 11)
Date: Fri, 14 Jan 2022 12:06:07 +0000
I think this patch may cause issues on other operating systems, since
getentropy() is normally defined in unistd.h
Can I propose to include sys/random.h only on Solaris:
#ifdef HAVE_GETENTROPY
#if defined(__sun) && defined(__SVR4)
#include <sys/random.h>
#endif
#endif
From: "David H. Gutteridge" <gutteridge@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54628 CVS commit: pkgsrc/x11/libXdmcp
Date: Fri, 14 Jan 2022 16:13:53 +0000
Module Name: pkgsrc
Committed By: gutteridge
Date: Fri Jan 14 16:13:53 UTC 2022
Modified Files:
pkgsrc/x11/libXdmcp: distinfo
Removed Files:
pkgsrc/x11/libXdmcp/patches: patch-Key.c
Log Message:
libXdmcp: revert Solaris 11.3 build fix
This requires further discussion in PR pkg/54628. This patch didn't
cause an issue for me in a Linux build environment that doesn't have
arc4random_buf() available, and doesn't need sys/random.h, but it could
cause issues elsewhere.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 pkgsrc/x11/libXdmcp/distinfo
cvs rdiff -u -r1.1 -r0 pkgsrc/x11/libXdmcp/patches/patch-Key.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: feedback->open
State-Changed-By: gutteridge@NetBSD.org
State-Changed-When: Thu, 20 Jan 2022 17:54:33 +0000
State-Changed-Why:
Feedback provided, adjustments pending.
From: "David H. Gutteridge" <gutteridge@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54628 CVS commit: pkgsrc/x11/libXdmcp
Date: Wed, 23 Feb 2022 03:10:26 +0000
Module Name: pkgsrc
Committed By: gutteridge
Date: Wed Feb 23 03:10:26 UTC 2022
Modified Files:
pkgsrc/x11/libXdmcp: distinfo
Added Files:
pkgsrc/x11/libXdmcp/patches: patch-Key.c
Log Message:
libXdmcp: fix builds with Solaris 11.3
There are circumstances where getentropy() exists but arc4random_buf()
does not, as reported to be the case with Solaris 11.3 in PR pkg/54628,
report and analysis by Sad Clouds. sys/random.h only needs to be
included on SunOS, in that case (second patch iteration).
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 pkgsrc/x11/libXdmcp/distinfo
cvs rdiff -u -r0 -r1.3 pkgsrc/x11/libXdmcp/patches/patch-Key.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: gutteridge@NetBSD.org
State-Changed-When: Wed, 23 Feb 2022 03:16:37 +0000
State-Changed-Why:
Please advise if this fixes things for you.
From: Alan Coopersmith <alan.coopersmith@oracle.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/54628 (x11/libXdmcp fails to build on Solaris 11)
Date: Wed, 23 Feb 2022 13:39:13 -0800
Fixed upstream:
https://gitlab.freedesktop.org/xorg/lib/libxdmcp/-/commit/4a71fdf6d34df67d3f1335590da6ae3050128fb2
--
-Alan Coopersmith- alan.coopersmith@oracle.com
Oracle Solaris Engineering - https://blogs.oracle.com/solaris
From: "David H. Gutteridge" <gutteridge@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54628 CVS commit: pkgsrc/x11/libXdmcp
Date: Thu, 17 Mar 2022 01:05:48 +0000
Module Name: pkgsrc
Committed By: gutteridge
Date: Thu Mar 17 01:05:48 UTC 2022
Modified Files:
pkgsrc/x11/libXdmcp: distinfo
pkgsrc/x11/libXdmcp/patches: patch-Key.c
Added Files:
pkgsrc/x11/libXdmcp/patches: patch-config.h.in patch-configure
Log Message:
libXdmcp: apply upstream version of SunOS compilation fix
Patch to match what the next release will do here, in part so we don't
run the risk of merging two versions of handling the same issue on next
update. Addresses PR pkg/54628. (Compile tested on Fedora Linux and
OmniOS, but as neither of these are affected by the issue to begin
with, and not having an environment where I can reproduce it, I can't
verify the fix myself.)
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 pkgsrc/x11/libXdmcp/distinfo
cvs rdiff -u -r1.3 -r1.4 pkgsrc/x11/libXdmcp/patches/patch-Key.c
cvs rdiff -u -r0 -r1.1 pkgsrc/x11/libXdmcp/patches/patch-config.h.in \
pkgsrc/x11/libXdmcp/patches/patch-configure
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: feedback->closed
State-Changed-By: gutteridge@NetBSD.org
State-Changed-When: Thu, 17 Mar 2022 01:14:33 +0000
State-Changed-Why:
Upstream's version of the fix was applied. If there are further concerns, please raise with them directly.
From: Sad Clouds <cryintothebluesky@gmail.com>
To: gnats-bugs@netbsd.org
Cc: gutteridge@NetBSD.org, gutteridge@netbsd.org, pkgsrc-bugs@netbsd.org,
gnats-admin@netbsd.org
Subject: Re: pkg/54628 (x11/libXdmcp fails to build on Solaris 11)
Date: Thu, 17 Mar 2022 08:45:20 +0000
Tested latest fixes for this package on Solaris 11.3 and can confirm the
issue has been fixed now.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.