From nobody@FreeBSD.org  Tue Dec 25 22:24:48 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BECD716A418
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 25 Dec 2007 22:24:48 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id A72FA13C469
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 25 Dec 2007 22:24:48 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id lBPMOFiO053748
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 25 Dec 2007 22:24:15 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id lBPMOE5t053746;
	Tue, 25 Dec 2007 22:24:14 GMT
	(envelope-from nobody)
Message-Id: <200712252224.lBPMOE5t053746@www.freebsd.org>
Date: Tue, 25 Dec 2007 22:24:14 GMT
From: Jos Garca Juanino <jjuanino@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] security/dirmngr does not build
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         119016
>Category:       ports
>Synopsis:       [patch] security/dirmngr does not build
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lofi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 25 22:30:02 UTC 2007
>Closed-Date:    Wed Jan 02 19:41:24 UTC 2008
>Last-Modified:  Wed Jan  2 19:50:01 UTC 2008
>Originator:     Jos Garca Juanino
>Release:        6.2-RELEASE-p9
>Organization:
>Environment:
FreeBSD sanabria.inad.es 6.2-RELEASE-p9 FreeBSD 6.2-RELEASE-p9 #1: Sun Dec  2 00:02:12 CET 2007     root@sanabria.inad.es:/export/FreeBSD/obj/export/FreeBSD/src/sys/MK2007Jun29  i386
>Description:
Building the last 1.0.1 security/dirmngr port I have got the following error (linking dirmngr executable):

./jnlib/libjnlib.a(utf8conv.o)(.text+0x689): In function `do_utf8_to_native':
: undefined reference to `libiconv_open'
./jnlib/libjnlib.a(utf8conv.o)(.text+0x6ee): In function `do_utf8_to_native':
: undefined reference to `libiconv'
./jnlib/libjnlib.a(utf8conv.o)(.text+0x70a): In function `do_utf8_to_native':
: undefined reference to `libiconv_close'
./jnlib/libjnlib.a(utf8conv.o)(.text+0x846): In function `native_to_utf8':
: undefined reference to `libiconv_open'
./jnlib/libjnlib.a(utf8conv.o)(.text+0x8c6): In function `native_to_utf8':
: undefined reference to `libiconv'
./jnlib/libjnlib.a(utf8conv.o)(.text+0x8db): In function `native_to_utf8':
: undefined reference to `libiconv_close'
./jnlib/libjnlib.a(utf8conv.o)(.text+0xc43): In function `set_native_charset':
: undefined reference to `libiconv_open'
./jnlib/libjnlib.a(utf8conv.o)(.text+0xc50): In function `set_native_charset':
: undefined reference to `libiconv_close'
./jnlib/libjnlib.a(utf8conv.o)(.text+0xc60): In function `set_native_charset':
: undefined reference to `libiconv_open'
./jnlib/libjnlib.a(utf8conv.o)(.text+0xc6d): In function `set_native_charset':
: undefined reference to `libiconv_close'
./jnlib/libjnlib.a(utf8conv.o)(.text+0x25): In function `jnlib_iconv_close':
: undefined reference to `libiconv_close'
./jnlib/libjnlib.a(utf8conv.o)(.text+0x35): In function `jnlib_iconv':
: undefined reference to `libiconv'
./jnlib/libjnlib.a(utf8conv.o)(.text+0x45): In function `jnlib_iconv_open':
: undefined reference to `libiconv_open'

The same ocurrs on 7.0-BETA4
>How-To-Repeat:
Build the last security/dirmngr port (version 1.0.1)
>Fix:
Apply the attached patch and build again the port:

# cd /usr/ports/security/dirmngr
# patch -p1 < patch_dirmngr.txt
# make

Patch attached with submission follows:

diff -uNr dirmngr.orig/Makefile dirmngr/Makefile
--- dirmngr.orig/Makefile	2007-12-25 22:47:08.643937278 +0100
+++ dirmngr/Makefile	2007-12-25 22:47:27.817827772 +0100
@@ -28,6 +28,7 @@
 INFO=		dirmngr
 MAN1=		dirmngr-client.1 dirmngr.1
 
+USE_AUTOTOOLS=  automake:110
 CONFIGURE_ENV+=	LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
 
 .if defined(WITHOUT_NLS)
diff -uNr dirmngr.orig/files/patch-src_Makefile.am dirmngr/files/patch-src_Makefile.am
--- dirmngr.orig/files/patch-src_Makefile.am	1970-01-01 01:00:00.000000000 +0100
+++ dirmngr/files/patch-src_Makefile.am	2007-12-25 22:48:04.064193303 +0100
@@ -0,0 +1,24 @@
+--- src/Makefile.am.orig	Tue Dec 25 22:43:49 2007
++++ src/Makefile.am	Tue Dec 25 22:44:12 2007
+@@ -47,7 +47,7 @@
+ 	validate.c validate.h exechelp.h exechelp.c get-path.c
+ 
+ dirmngr_LDADD = ../jnlib/libjnlib.a $(LIBOBJS) $(LIBASSUAN_PTH_LIBS)  \
+-	$(LIBGCRYPT_LIBS) $(KSBA_LIBS) $(PTH_LIBS) $(LIBINTL)
++	$(LIBGCRYPT_LIBS) $(KSBA_LIBS) $(PTH_LIBS) $(LIBINTL) $(LIBICONV)
+ 
+ if HAVE_W32_SYSTEM
+ ldap_url = ldap-url.h ldap-url.c
+@@ -60,10 +60,10 @@
+ dirmngr_ldap_CFLAGS = $(GPG_ERROR_CFLAGS)
+ dirmngr_ldap_LDFLAGS =
+ dirmngr_ldap_LDADD = $(ldap_ldadd) ../jnlib/libjnlib.a $(LIBOBJS) \
+-		     $(GPG_ERROR_LIBS) $(LDAPLIBS) $(LIBINTL)
++		     $(GPG_ERROR_LIBS) $(LDAPLIBS) $(LIBINTL) $(LIBICONV)
+ 
+ dirmngr_client_SOURCES = dirmngr-client.c i18n.h util.h b64enc.c \
+                          get-path.c no-libgcrypt.c no-libgcrypt.h 
+ dirmngr_client_LDADD = ../jnlib/libjnlib.a $(LIBOBJS) $(LIBASSUAN_LIBS) \
+-	               $(GPG_ERROR_LIBS) $(LIBINTL)
++	               $(GPG_ERROR_LIBS) $(LIBINTL) $(LIBICONV)
+ 


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->lofi 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Dec 25 22:30:07 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=119016 

From: Michael Nottebrock <lofi@freebsd.org>
To: bug-followup@freebsd.org, jjuanino@gmail.com
Cc:  
Subject: Re: ports/119016: [patch] security/dirmngr does not build
Date: Wed, 26 Dec 2007 18:19:04 +0100

 Thanks for the report! Are you building with WITHOUT_NLS set?
 
 Also, please attach the output of ls /var/db/pkg and the contents of
 /usr/ports/security/dirmngr/work/dirmngr-1.0.1/config.log to this PR.

From: =?iso-8859-1?Q?Jos=E9_Garc=EDa?= Juanino <jjuanino@gmail.com>
To: Michael Nottebrock <lofi@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: ports/119016: [patch] security/dirmngr does not build
Date: Wed, 26 Dec 2007 22:06:40 +0100

 El mircoles 26 de diciembre a las 18:19:04 CET, Michael Nottebrock escribi:
 > Thanks for the report! Are you building with WITHOUT_NLS set?
 
 Yes.
 
 > Also, please attach the output of ls /var/db/pkg and the contents of
 > /usr/ports/security/dirmngr/work/dirmngr-1.0.1/config.log to this PR.
 
 http://www.telefonica.net/web2/gauss/pkglist.txt
 http://www.telefonica.net/web2/gauss/config.log
 
 Regards

From: =?iso-8859-1?Q?Jos=E9_Garc=EDa?= Juanino <jjuanino@gmail.com>
To: Michael Nottebrock <lofi@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: ports/119016: [patch] security/dirmngr does not build
Date: Sun, 30 Dec 2007 18:49:20 +0100

 El mircoles 26 de diciembre a las 22:06:40 CET, Jos Garca Juanino escribi:
 > El mircoles 26 de diciembre a las 18:19:04 CET, Michael Nottebrock escribi:
 > > Thanks for the report! Are you building with WITHOUT_NLS set?
 > 
 > Yes.
 > 
 > > Also, please attach the output of ls /var/db/pkg and the contents of
 > > /usr/ports/security/dirmngr/work/dirmngr-1.0.1/config.log to this PR.
 > 
 > http://www.telefonica.net/web2/gauss/pkglist.txt
 > http://www.telefonica.net/web2/gauss/config.log
 
 I have investigated this tricky problem, and my conclusion is that the
 port is asumming that at least one of the security/libgcrypt,
 security/libksbao or security/libgpg-error port is built without
 WITHOUT_NLS knob. In my computer I have WITHOUT_NLS in make.conf, thus
 I get the following:
 
 # ldd /usr/local/lib/libgcrypt.so \
   /usr/local/lib/libksba.so \
   /usr/local/lib/libgpg-error.so 
 
 /usr/local/lib/libgcrypt.so:
         libgpg-error.so.0 => /usr/local/lib/libgpg-error.so.0 (0x281c0000)
 /usr/local/lib/libksba.so:
         libgpg-error.so.0 => /usr/local/lib/libgpg-error.so.0 (0x281a1000)
 /usr/local/lib/libgpg-error.so:
 
 As you can see, no libiconv.so.3 appears.
 
 I you build some of those ports with WITHOUT_NLS=1, you will get as ldd
 output something similar to:
 
 /usr/local/lib/libgcrypt.so:
         libgpg-error.so.0 => /usr/local/lib/libgpg-error.so.0 (0x800b4f000)
         libc.so.7 => /lib/libc.so.7 (0x800633000)
         libintl.so.8 => /usr/local/lib/libintl.so.8 (0x800c52000)
         libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x800d5b000)
 /usr/local/lib/libksba.so:
         libgpg-error.so.0 => /usr/local/lib/libgpg-error.so.0 (0x800b3b000)
         libc.so.7 => /lib/libc.so.7 (0x800633000)
         libintl.so.8 => /usr/local/lib/libintl.so.8 (0x800c3e000)
         libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x800d47000)
 /usr/local/lib/libgpg-error.so:
         libintl.so.8 => /usr/local/lib/libintl.so.8 (0x800b03000)
         libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x800c0c000)
         libc.so.7 => /lib/libc.so.7 (0x800633000)
 
 
 When dirmngr executable is linked, it only links with
 /usr/local/lib/libgcrypt.so, /usr/local/lib/libksba.so and
 /usr/local/lib/libgpg-error.so (not against /usr/local/lib/libiconv.so).
 In my computer, none of them is dinamically linked with libiconv.so,
 therefore it cannot find the libiconv simbols and the linker fails. The
 exact command is:
 
 cc -I../jnlib -I/usr/local/include  -I/usr/local/include
 -I/usr/local/include -I/usr/local/include -I/usr/local/include
 -I/usr/local/include/pth -O2 -fno-strict-aliasing -pipe -march=k8 -Wall
 -Wno-pointer-sign  -L/usr/local/lib -L/usr/local/lib -o dirmngr
 dirmngr.o server.o crlcache.o crlfetch.o certcache.o cdblib.o ldap.o
 http.o misc.o ocsp.o estream.o estream-printf.o validate.o exechelp.o
 get-path.o ../jnlib/libjnlib.a  -L/usr/local/lib -lassuan-pth
 -L/usr/local/lib -lgcrypt -L/usr/local/lib -lgpg-error -L/usr/local/lib
 -lksba -lgpg-error -L/usr/local/lib/pth -lpth
 
 Please try the following in order to reproduce the problem:
 
 # portupgrade -f -M WITHOUT_NLS=1 \
 libgcrypt-1.2.4_1 \
 libgpg-error-1.5 \
 libksba-1.0.2 \
 libgpg-error-1.5
 
 # cd /usr/ports/security/dirmngr && make -DWITHOUT_NLS
 
 
 I think we have only 2 solutions:
 
     1) Do not allow the WITHOUT_NLS knob in Makefile of dirmngr port.
     2) Commit my patch to ensure that libiconv.so is explicited linked,
        at least when WITHOUT_NLS is set.
 
 Thank you very much for your patience, and excuse mi poor english.
 
 Best regards
State-Changed-From-To: open->closed 
State-Changed-By: lofi 
State-Changed-When: Wed Jan 2 19:41:11 UTC 2008 
State-Changed-Why:  
Fixed, thanks for reporting! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=119016 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/119016: commit references a PR
Date: Wed,  2 Jan 2008 19:40:42 +0000 (UTC)

 lofi        2008-01-02 19:40:38 UTC
 
   FreeBSD ports repository
 
   Modified files:
     security/dirmngr     Makefile 
   Added files:
     security/dirmngr/files patch-src-Makefile.in 
   Log:
   Fix build in WITHOUT_NLS case.
   
   PR:             ports/119016
   Submitted by:   Jos Garca Juanino <jjuanino@gmail.com>
   
   Revision  Changes    Path
   1.31      +1 -0      ports/security/dirmngr/Makefile
   1.1       +27 -0     ports/security/dirmngr/files/patch-src-Makefile.in (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
