NetBSD Problem Report #56038

From www@netbsd.org  Thu Mar  4 22:27:32 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 2A2871A921F
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  4 Mar 2021 22:27:32 +0000 (UTC)
Message-Id: <20210304222730.D7D561A924E@mollari.NetBSD.org>
Date: Thu,  4 Mar 2021 22:27:30 +0000 (UTC)
From: mdehling@gmail.com
Reply-To: mdehling@gmail.com
To: gnats-bugs@NetBSD.org
Subject: databases/lmdb fails to compile on Solaris 10u7 w/ SunStudio 12u1
X-Send-Pr-Version: www-1.0

>Number:         56038
>Category:       pkg
>Synopsis:       databases/lmdb fails to compile on Solaris 10u7 w/ SunStudio 12u1
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 04 22:30:00 +0000 2021
>Closed-Date:    Mon May 06 01:01:45 +0000 2024
>Last-Modified:  Mon May 06 01:01:45 +0000 2024
>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:
Building databases/lmdb fails with a missing symbol fdatasync.
>How-To-Repeat:

>Fix:
On Solaris 10 fdatasync is defined in /usr/lib/64/librt.so.1, so simply adding -lrt to LDFLAGS.SunOS works.  This should work for older versions as well.

A quick google search seems to indicate that -lrt is not required in Solaris 11.

The following patch works for me, though I'm not convinced the test for OS_VERSION below is the right thing to do here.


--- Makefile.orig       Thu Mar  4 22:32:49 2021
+++ Makefile    Thu Mar  4 23:26:13 2021
@@ -27,6 +27,11 @@
 TEST_TARGET=           test

 .include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "SunOS" && ${OS_VERSION} != "5.11"
+LDFLAGS+=              -lrt
+.endif
+
 .if ${OPSYS} == "Darwin"
 MAKE_FLAGS+=   SOEXT=.dylib
 MAKE_FLAGS+=   SOLIBS=-install_name\ ${PREFIX}/lib/liblmdb.dylib

>Release-Note:

>Audit-Trail:
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/56038: databases/lmdb fails to compile on Solaris 10u7 w/
 SunStudio 12u1
Date: Fri, 5 Mar 2021 04:33:04 +0000

 On Thu, Mar 04, 2021 at 10:30:00PM +0000, mdehling@gmail.com wrote:
  > +.if ${OPSYS} == "SunOS" && ${OS_VERSION} != "5.11"
  > +LDFLAGS+=              -lrt
  > +.endif

 Since it probably doesn't work on Solaris 9 anyway (and with high
 probability nobody cares) wouldn't it make more sense to do

  +.if ${OPSYS} == "SunOS" && ${OS_VERSION} == "5.10"
  +LDFLAGS+=              -lrt
  +.endif

 ?

 -- 
 David A. Holland
 dholland@netbsd.org

From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/56038 CVS commit: pkgsrc/databases/lmdb
Date: Wed, 9 Jun 2021 02:37:09 +0000

 Module Name:	pkgsrc
 Committed By:	dholland
 Date:		Wed Jun  9 02:37:09 UTC 2021

 Modified Files:
 	pkgsrc/databases/lmdb: Makefile

 Log Message:
 databases/lmdb needs -lrt on Solaris 10. PR 56038 from Malte Dehling.


 To generate a diff of this commit:
 cvs rdiff -u -r1.18 -r1.19 pkgsrc/databases/lmdb/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->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 09 Jun 2021 03:15:56 +0000
State-Changed-Why:
committed comparable patch, please confirm that it works


State-Changed-From-To: feedback->closed
State-Changed-By: gutteridge@NetBSD.org
State-Changed-When: Mon, 06 May 2024 01:01:45 +0000
State-Changed-Why:
Submitter indicates this can be closed. Thanks for the PR.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.