NetBSD Problem Report #54607

From palle@netbsd.org  Mon Oct  7 17:37:42 2019
Return-Path: <palle@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 24B5B7A17C
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  7 Oct 2019 17:37:42 +0000 (UTC)
Message-Id: <20191007173740.930097A252@mollari.NetBSD.org>
Date: Mon,  7 Oct 2019 17:37:40 +0000 (UTC)
From: palle@netbsd.org
Reply-To: palle@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: lang/g95 fails to compile on Solaris 11
X-Send-Pr-Version: 3.95

>Number:         54607
>Category:       pkg
>Synopsis:       lang/g95 fails to compile on Solaris 11
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    solaris-pkg-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 07 17:40:00 +0000 2019
>Last-Modified:  Sat Feb 29 10:58:59 +0000 2020
>Originator:     Palle Lyckegaard
>Release:        Solaris 11.3
>Organization:
NetBSD
>Environment:
SunOS gcc-solaris11 5.11 11.3 sun4u sparc SUNW,SPARC-Enterprise
>Description:
Trying to get ham/gnuradio-core to build on Solaris 11, but one of the sub-dependencies (lang/g95) fails.
The issue is caused by a grep -A, but the -A option is specific to the GNU grep command.
>How-To-Repeat:
Build lang/g95 on a Solaris 11 system (tried on 11.3)
>Fix:
Use ggrep (GNU grep) on Solaris 11 instead.

Patch below:

Index: lang/g95/Makefile                                                                                                                                                                                           
===================================================================
RCS file: /cvsroot/pkgsrc/lang/g95/Makefile,v                                                                                                                                                                      
retrieving revision 1.32                                                                                                                                                                                           
diff -u -r1.32 Makefile                                                                                                                                                                                            
--- lang/g95/Makefile   11 Aug 2019 13:21:19 -0000      1.32                                                                                                                                                       
+++ lang/g95/Makefile   7 Oct 2019 04:26:41 -0000                                                                                                                                                                  
@@ -53,7 +53,7 @@
 .  endif                                                                                                                                                                                                          
 .endif                                                                                                                                                                                                            

-LIBGCC_SPEC=   ${CC} -dumpspecs 2> /dev/null | grep -A 1 '^\*libgcc:$$' | tail -1                                                                                                                                 
+LIBGCC_SPEC=   ${CC} -dumpspecs 2> /dev/null | ${GREP} -A 1 '^\*libgcc:$$' | tail -1                                                                                                                              

 post-extract:                                                                                                                                                                                                     
        ${MKDIR} ${GCC_G95_DIR}                                                                                                                                                                                    
Index: lang/g95/PLIST.SunOS                                                                                                                                                                                        
===================================================================
RCS file: /cvsroot/pkgsrc/lang/g95/PLIST.SunOS,v                                                                                                                                                                   
retrieving revision 1.2                                                                                                                                                                                            
diff -u -r1.2 PLIST.SunOS                                                                                                                                                                                          
--- lang/g95/PLIST.SunOS        20 May 2013 05:47:34 -0000      1.2                                                                                                                                                
+++ lang/g95/PLIST.SunOS        7 Oct 2019 04:26:41 -0000                                                                                                                                                          
@@ -2,3 +2,7 @@
 lib/gcc-lib/${MACHINE_GNU_PLATFORM}/4.1.2/crtbegin.o                                                                                                                                                              
 lib/gcc-lib/${MACHINE_GNU_PLATFORM}/4.1.2/crtend.o                                                                                                                                                                
 lib/gcc-lib/${MACHINE_GNU_PLATFORM}/4.1.2/gmon.o                                                                                                                                                                  
+lib/gcc-lib/${MACHINE_GNU_PLATFORM}/4.1.2/crt1.o                                                                                                                                                                  
+lib/gcc-lib/${MACHINE_GNU_PLATFORM}/4.1.2/crti.o                                                                                                                                                                  
+lib/gcc-lib/${MACHINE_GNU_PLATFORM}/4.1.2/crtn.o                                                                                                                                                                  
+lib/gcc-lib/${MACHINE_GNU_PLATFORM}/4.1.2/gcrt1.o 
Index: mk/tools/tools.SunOS.mk                                                                                                                                                                                     
===================================================================
RCS file: /cvsroot/pkgsrc/mk/tools/tools.SunOS.mk,v                                                                                                                                                                
retrieving revision 1.50                                                                                                                                                                                           
diff -u -r1.50 tools.SunOS.mk                                                                                                                                                                                      
--- mk/tools/tools.SunOS.mk     10 May 2016 08:54:49 -0000      1.50                                                                                                                                               
+++ mk/tools/tools.SunOS.mk     7 Oct 2019 04:27:07 -0000                                                                                                                                                          
@@ -55,7 +55,11 @@
 .endif                                                                                                                                                                                                            
 TOOLS_PLATFORM.dirname?=       /usr/bin/dirname                                                                                                                                                                   
 TOOLS_PLATFORM.echo?=          echo                    # shell builtin                                                                                                                                            
-.if exists(/usr/gnu/bin/grep)                                                                                                                                                                                     
+.if exists(/usr/bin/ggrep)                                                                                                                                                                                        
+TOOLS_PLATFORM.grep?=          /usr/bin/ggrep                                                                                                                                                                     
+TOOLS_PLATFORM.egrep?=         /usr/bin/ggrep -E                                                                                                                                                                  
+TOOLS_PLATFORM.fgrep?=         /usr/bin/ggrep -F                                                                                                                                                                  
+.elif exists(/usr/gnu/bin/grep)                                                                                                                                                                                   
 TOOLS_PLATFORM.grep?=          /usr/gnu/bin/grep                                                                                                                                                                  
 TOOLS_PLATFORM.egrep?=         /usr/gnu/bin/grep -E                                                                                                                                                               
 TOOLS_PLATFORM.fgrep?=         /usr/gnu/bin/grep -F          


>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Sat, 29 Feb 2020 10:58:59 +0000
Responsible-Changed-Why:
Solaris problem.
(And IMHO, g95 is super crufty and not portable, but whatever.)


>Unformatted:

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.