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:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 18 15:30:00 +0000 2019
>Last-Modified:  Fri Oct 18 17:05:01 +0000 2019
>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>

>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.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.