NetBSD Problem Report #57619

From www@netbsd.org  Sun Sep 17 22:00:46 2023
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 12B2F1A9238
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 17 Sep 2023 22:00:46 +0000 (UTC)
Message-Id: <20230917220044.7F5851A9239@mollari.NetBSD.org>
Date: Sun, 17 Sep 2023 22:00:44 +0000 (UTC)
From: davshao@gmail.com
Reply-To: davshao@gmail.com
To: gnats-bugs@NetBSD.org
Subject: devel/gettext-lib extend hidden symbol _bindtextdomain patch to any FreeBSD-related OSes?
X-Send-Pr-Version: www-1.0

>Number:         57619
>Category:       pkg
>Synopsis:       devel/gettext-lib extend hidden symbol _bindtextdomain patch to any FreeBSD-related OSes?
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 17 22:05:00 +0000 2023
>Originator:     David Shao
>Release:        pkgsrc current
>Organization:
>Environment:
DragonFly xxxxx 6.5-DEVELOPMENT DragonFly v6.5.0.273.ge181f-DEVELOPMENT #0: Fri Sep  8 20:31:01 PDT 2023     xxxxxx@xxxxxx:/usr/obj/usr/src/sys/X86_64_GENERIC  x86_64
>Description:
Without extension of the patch

patch-gettext-runtime_intl_intl-compat.c

from __APPLE__ to FreeBSD or DragonFly, gettext-lib builds, but later
packages using it have a linking problem similar to

ld: warning: cannot export hidden symbol _bindtextdomain

The real question is does this patch need to be extended to all FreeBSD-related OSes such as MidnightBSD.  Are people building pkgsrc from source depending on previous also built packages on their OSes?


>How-To-Repeat:

>Fix:



--- devel/gettext-lib.orig/patches/patch-gettext-runtime_intl_intl-compat.c	2023-06-30 01:31:04.000000000 -0700
+++ devel/gettext-lib/patches/patch-gettext-runtime_intl_intl-compat.c	2023-07-01 06:40:32.000000000 -0700
@@ -4,14 +4,14 @@

 ld: warning: cannot export hidden symbol _bindtextdomain from .libs/intl-compat.o

---- gettext-runtime/intl/intl-compat.c.orig	2023-06-30 08:04:29.086186639 +0000
+--- gettext-runtime/intl/intl-compat.c.orig	2019-05-11 11:29:32.000000000 +0000
 +++ gettext-runtime/intl/intl-compat.c
 @@ -47,7 +47,7 @@
  /* When building a DLL, we must export some functions.  Note that because
     the functions are only defined for binary backward compatibility, we
     don't need to use __declspec(dllimport) in any case.  */
 -#if HAVE_VISIBILITY && BUILDING_DLL
-+#if HAVE_VISIBILITY && BUILDING_DLL || defined(__APPLE__)
++#if HAVE_VISIBILITY && BUILDING_DLL || defined(__APPLE__) || defined(__FreeBSD__) || defined(__DragonFly__)
  # define DLL_EXPORTED __attribute__((__visibility__("default")))
  #elif defined _MSC_VER && BUILDING_DLL
  # define DLL_EXPORTED __declspec(dllexport)

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-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.