From owner-freebsd-ports Thu Dec 16 16:10: 5 1999 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 02A6614BD3 for ; Thu, 16 Dec 1999 16:10:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id QAA50259; Thu, 16 Dec 1999 16:10:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id E80D315667; Thu, 16 Dec 1999 16:00:38 -0800 (PST) Message-Id: <19991217000038.E80D315667@hub.freebsd.org> Date: Thu, 16 Dec 1999 16:00:38 -0800 (PST) From: rguyom@mail.dotcom.fr To: freebsd-gnats-submit@freebsd.org X-Send-Pr-Version: www-1.0 Subject: ports/15525: macro AM_GNU_GETTEXT will not make use of libintl Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 15525 >Category: ports >Synopsis: macro AM_GNU_GETTEXT will not make use of libintl >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Dec 16 16:10:01 PST 1999 >Closed-Date: >Last-Modified: >Originator: Remi Guyomarch >Release: 3.4-RC >Organization: >Environment: FreeBSD diabolic-cow.mail.dotcom.fr 3.4-RC FreeBSD 3.4-RC #2: Wed Dec 15 06:24:51 CET 1999 root@diabolic-cow.mail.dotcom.fr:/usr/src/sys/compile/DIABOLIC-COW i386 >Description: The gettext port is buggy. The macro AM_GNU_GETTEXT in /usr/local/share/aclocal/gettext.m4 try to find where all the gettext stuff is located (in libc, in libintl, nowhere, etc...) But if it finds a suitable libintl, it forgets to set the INTLLIBS variable. I think this is why, for example, you can find a patch to add -lintl to CFLAGS in the gtk12 port. This is also why you can find a "--with-included-gettext" in the gnupg port. >How-To-Repeat: I will use the gnupg port as an example, but the problem is *not* in gnupg, it's really in gettext. Compile and install the gettext port. Compile and install the gnupg port. Patch /usr/local/share/aclocal/gettext.m4 with my patch. Then 'make patch' in the gnupg port and configure & compile by hand with : CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure gmake Then launch ldd on the two binaries : $ ldd `which gpg` g10/gpg /usr/local/bin/gpg: libz.so.2 => /usr/lib/libz.so.2 (0x280d8000) libc.so.3 => /usr/lib/libc.so.3 (0x280e5000) g10/gpg: libz.so.2 => /usr/lib/libz.so.2 (0x280c8000) libc.so.3 => /usr/lib/libc.so.3 (0x280d5000) libgdbm.so.2 => /usr/local/lib/libgdbm.so.2 (0x28161000) libintl.so.1 => /usr/local/lib/libintl.so.1 (0x28167000) GnuPG is now linked with libintl.so. The link with libgdbm is a side effect of 1) specifying /usr/local/include & /usr/local/lib to configure. 2) having the gdbm port installed Then compare the size of the two binaries : (this is with "-O2 -m486" in /etc/make.conf) $ size `which gpg` g10/gpg text data bss dec hex filename 448981 9412 12276 470669 72e8d /usr/local/bin/gpg 413811 9420 7372 430603 6920b g10/gpg >Fix: Add this patch to /usr/ports/devel/gettext/patches/ : root@diabolic-cow /usr/ports/devel/gettext/work/gettext-0.10.35 diff -u m4/gettext.m4~ m4/gettext.m4 --- m4/gettext.m4~ Sun Nov 21 23:28:26 1999 +++ m4/gettext.m4 Thu Dec 16 23:20:01 1999 @@ -72,7 +72,11 @@ DATADIRNAME=lib]) INSTOBJEXT=.mo fi - fi + fi + + if test "$gt_cv_func_gettext_libintl" = "yes"; then + INTLLIBS='-lintl' + fi ]) if test "$CATOBJEXT" = "NONE"; then >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message