NetBSD Problem Report #56034

From www@netbsd.org  Thu Mar  4 17:01:17 2021
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))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 356DB1A921F
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  4 Mar 2021 17:01:17 +0000 (UTC)
Message-Id: <20210304170115.CE2BC1A924E@mollari.NetBSD.org>
Date: Thu,  4 Mar 2021 17:01:15 +0000 (UTC)
From: mdehling@gmail.com
Reply-To: mdehling@gmail.com
To: gnats-bugs@NetBSD.org
Subject: devel/pkgconf fails to compile on Solaris 10u7 w/ SunStudio 12u1
X-Send-Pr-Version: www-1.0

>Number:         56034
>Category:       pkg
>Synopsis:       devel/pkgconf fails to compile on Solaris 10u7 w/ SunStudio 12u1
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 04 17:05:01 +0000 2021
>Originator:     Malte Dehling
>Release:        pkgsrc-2020Q4
>Organization:
>Environment:
SunOS deuterium 5.10 Generic_139555-08 sun4u sparc sun4u
cc: Sun C 5.10 SunOS_sparc 2009/06/03

>Description:
Add USE_LANGUAGES=c99 to the Makefile (see pkg/56033), then try to compile.  This will fail with:

--- pkgconf ---
  CCLD     pkgconf
cc: Warning: Option -d=gnu99 passed to ld, if ld is invoked, ignored otherwise
ld: fatal: option -d has illegal argument `=gnu99'
ld: fatal: Flags processing errors
*** [pkgconf] Error code 1

>How-To-Repeat:

>Fix:
The problem is that the configure script detects that cc accepts -std=gnu99.  From config.log:

configure:3231: checking whether C compiler accepts -std=gnu99
configure:3250: cc -c -fast -Wall -Wextra -Wformat=2  -std=gnu99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE conftest.c >&5
cc: Warning: Option -d=gnu99 passed to ld, if ld is invoked, ignored otherwise
configure:3250: $? = 0
configure:3258: result: yes

I'm not sure what the best solution is.  A workaround is simply removing the relevant lines from the configure script.

NetBSD Home
NetBSD PR Database Search

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