NetBSD Problem Report #56035

From www@netbsd.org  Thu Mar  4 18:32:46 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 65F301A921F
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  4 Mar 2021 18:32:46 +0000 (UTC)
Message-Id: <20210304183245.1C6CC1A924E@mollari.NetBSD.org>
Date: Thu,  4 Mar 2021 18:32:45 +0000 (UTC)
From: mdehling@gmail.com
Reply-To: mdehling@gmail.com
To: gnats-bugs@NetBSD.org
Subject: pkgtools/p5-pkgsrc-Dewey on Solaris 10
X-Send-Pr-Version: www-1.0

>Number:         56035
>Category:       pkg
>Synopsis:       pkgtools/p5-pkgsrc-Dewey on Solaris 10
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 04 18:35:00 +0000 2021
>Closed-Date:    Sun Jul 04 18:43:35 +0000 2021
>Last-Modified:  Sun Jul 04 18:43:35 +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 Makefile (see pkg/56033) and bmake will fail with the following error:

ld: fatal: relocation error: R_SPARC_H44: file libnbcompat.a(err.o): symbol <errno>: relocations based on the ABS44 coding model can not be used in building shared object

>How-To-Repeat:

>Fix:
libnbcompat needs to be compiled with -KPIC or -xcode=pic32.  The following patch works for me:


--- Makefile.orig       Thu Mar  4 19:05:12 2021
+++ Makefile    Thu Mar  4 19:16:26 2021
@@ -13,10 +13,16 @@
 CPPFLAGS.NetBSD+=      -DHAVE_ERR_H
 CPPFLAGS.Linux+=       -fPIC

-USE_LANGUAGES=         c
+USE_LANGUAGES=         c99
 USE_FEATURES+=         err
 MAKE_ENV+=             LIBS=${LIBS:Q}

+.include "../../mk/compiler.mk"
+
+.if ${PKGSRC_COMPILER:Msunpro}
+CPPFLAGS+=             -xcode=pic32
+.endif
+
 PERL5_PACKLIST=                auto/pkgsrc/Dewey/.packlist

 PKG_INSTALL_FILESDIR=  ${PKGSRCDIR}/pkgtools/pkg_install/files

>Release-Note:

>Audit-Trail:

From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/56035 CVS commit: pkgsrc/pkgtools/p5-pkgsrc-Dewey
Date: Sun, 4 Jul 2021 17:43:27 +0000

 Module Name:	pkgsrc
 Committed By:	dholland
 Date:		Sun Jul  4 17:43:27 UTC 2021

 Modified Files:
 	pkgsrc/pkgtools/p5-pkgsrc-Dewey: Makefile

 Log Message:
 PR pkg/56035 from Malte Dehling: fix pkgtools/p5-pkgsrc-Dewey build on Solaris


 To generate a diff of this commit:
 cvs rdiff -u -r1.36 -r1.37 pkgsrc/pkgtools/p5-pkgsrc-Dewey/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 04 Jul 2021 18:43:35 +0000
State-Changed-Why:
committed, thanks


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