Subject: pkg/20448: libiconv not built but needed
To: None <gnats-bugs@gnats.netbsd.org>
From: None <reed@reedmedia.net>
List: netbsd-bugs
Date: 02/20/2003 09:20:35
>Number:         20448
>Category:       pkg
>Synopsis:       libiconv not installed but needed
>Confidential:   yes
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 20 09:21:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.6
>Organization:
http://bsd.reedmedia.net/
>Environment:
	
	
System: NetBSD rainier.reedmedia.net 1.6 NetBSD 1.6 (JCR-20020927) #3: Sat Sep 28 13:40:20 PDT 2002 reed@rainier.reedmedia.net:/usr/src/sys/arch/i386/compile/JCR-20020927 i386
Architecture: i386
Machine: i386
>Description:
I noticed that converters/libiconv/buildlink2.mk only checks
for the include file.

For example, gtexinfo wouldn't build:
/usr/bin/ld: cannot find -liconv
>How-To-Repeat:
Try to build something that uses converters/libiconv/buildlink2.mk
but no actual library installed.
>Fix:
Please add a mk/bsd.pkg.defaults.mk option to force that
converters/libiconv is always required when using that buildlink2.mk.

And here is my workaround which should also be applied:

Index: buildlink2.mk
===================================================================
RCS file: /cvsroot/pkgsrc/converters/libiconv/buildlink2.mk,v
retrieving revision 1.3
diff -b -u -r1.3 buildlink2.mk
--- buildlink2.mk	2002/09/10 16:06:37	1.3
+++ buildlink2.mk	2003/02/20 17:09:00
@@ -11,7 +11,7 @@
 .if defined(USE_GNU_ICONV)
 _NEED_ICONV=		YES
 .else
-.  if exists(/usr/include/iconv.h)
+.  if exists(/usr/include/iconv.h) && exists(/usr/lib/libiconv.so)
 _NEED_ICONV=		NO
 .  else
 _NEED_ICONV=		YES
>Release-Note:
>Audit-Trail:
>Unformatted: