Subject: buildlink2/3 and gettext-lib
To: None <>
From: Greg Troxel <>
List: tech-pkg
Date: 03/04/2004 12:19:38
I am continuing to have problems with gettext-lib.  I think there are
two separate issues:

1) This construction seems not to work (failing to include libiconv
   buildlink when buildink chose to use pkgsrc gettext), so I changed
   the NO to YES and that helps a lot of packages compile.

		${ECHO} "YES";						\
	else								\
		${ECHO} "NO";						\
.  endif

2) devel/libgtop would not build, with a complaint that
   libintl_dgettext could not be found.  There was no -lintl on the
   link line.  This is arugably a gnome-libs bug as the gnome-config
   program doesn't show -lintl, even those is
   linked against /usr/pkg/lib/libintl.

   I found that libgtop was using bl2, and gnome-libs used bl3.  The
   default behavior of the gettext-lib bl2 file is apparently not to
   require pkgsrc libintl, and to use the in-tree version.  The bl3
   file has


   which I think means not to try the in-tree gettext.

   I modified devel/libgtop to use bl3, and the build almost worked,
   losing because libintl could not be found in the bl lib dir.  I
   linked it and iconv in by hand and got a successful build.

My thoughts on the overall problem are that a given package may really
successfully use only one libintl, and it and all dependent libraries
have to make the same in-tree vs pkgsrc choice.  This is awkward
because bl3 files can get included from multiple places, and the first
inclusion might not make the right choice.  (But I could well be
failing to understand something here...)  In my (very fuzzy!) view,
the right choice is to choose pkgsrc gettext if the package itself
says it needs it, or if any dependent package says it needs it.

Perhaps an easy way out is to have everything in pkgsrc always use
pkgsrc gettext, and never try not to use it.  That way there would be
no in-tree vs pkgsrc conflict, and the bl files would never mis-decide
about using which one and pulling in iconv.

Am I really the only one having near-constant issues with gettext-lib