Subject: pkg/24684: devel/gettext-lib shouldn't be installed on glibc systems
To: None <gnats-bugs@gnats.netbsd.org>
From: None <reed@reedmedia.net>
List: netbsd-bugs
Date: 03/05/2004 19:16:18
>Number:         24684
>Category:       pkg
>Synopsis:       devel/gettext-lib shouldn't be installed on glibc systems
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 06 03:17:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.6.1_STABLE
>Organization:
http://bsd.reedmedia.net/
>Environment:
	
	
System: NetBSD rainier.reedmedia.net 1.6.1_STABLE NetBSD 1.6.1_STABLE (GENERIC) #0: Tue Aug 12 02:52:57 PDT 2003 reed@rainier.reedmedia.net:/usr/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
glibc provides the gettext(3) functions. In some cases it is wrong
to have gettext-lib also install libintl because sometimes linking
will be done with both and get errors like:

    multiple definition of `_nl_find_msg'
>How-To-Repeat:
	
>Fix:
At one time with buildlink2, I had something like:

.if defined(USE_GNU_GETTEXT) && ${USE_GNU_GETTEXT} == "NEVER"
.  if defined(GNU_CONFIGURE)
CONFIGURE_ENV+=       ac_cv_lib_intl=no
.  endif
...
where it wouldn't allow it.

With default PREFER_NATIVE?=yes gettext-lib is still needed by gettext.
gettext can be built with just glibc.

My gettext-lib has:

.if ${OPSYS} == "Linux"
# glibs provides own, for example errors may include:
# multiple definition of `_nl_find_msg'
# XXX check for functions?
PKG_FAIL_REASON= "gettext(3) functions are part of your GLIBC."

Maybe we could have a LINUX_ALLOW_GETTEXT_LIB setting.
But I still need the buildlink?.mk to not force it too.

I tried
BUILDLINK_IS_BUILTIN.gettext=YES in my mk.conf but that didn't help,
so I also added:
BUILDLINK_CHECK_BUILTIN.gettext=YES

Is there a way to get that to be automatic on glibc systems?
Maybe that should be in the defs.Linux.mk ??
>Release-Note:
>Audit-Trail:
>Unformatted: