From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Sep 6 09:10:02 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70DD4106566B for ; Tue, 6 Sep 2011 09:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 43D318FC15 for ; Tue, 6 Sep 2011 09:10:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p869A2s1022153 for ; Tue, 6 Sep 2011 09:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p869A2Yl022152; Tue, 6 Sep 2011 09:10:02 GMT (envelope-from gnats) Resent-Date: Tue, 6 Sep 2011 09:10:02 GMT Resent-Message-Id: <201109060910.p869A2Yl022152@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alexey Dokuchaev Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08E831065673 for ; Tue, 6 Sep 2011 09:03:18 +0000 (UTC) (envelope-from danfe@regency.nsu.ru) Received: from mx.nsu.ru (r2b9.nsu.ru [212.192.164.39]) by mx1.freebsd.org (Postfix) with ESMTP id A4BC28FC0A for ; Tue, 6 Sep 2011 09:03:17 +0000 (UTC) Received: from regency.nsu.ru ([193.124.210.26]) by mx.nsu.ru with esmtp (Exim 4.69) (envelope-from ) id 1R0qnD-0006x4-Vu for FreeBSD-gnats-submit@freebsd.org; Tue, 06 Sep 2011 15:14:04 +0700 Received: from regency.nsu.ru (localhost [127.0.0.1]) by regency.nsu.ru (8.14.2/8.14.2) with ESMTP id p868EoVV006789 for ; Tue, 6 Sep 2011 15:14:50 +0700 (NOVST) (envelope-from danfe@regency.nsu.ru) Received: (from danfe@localhost) by regency.nsu.ru (8.14.2/8.14.2/Submit) id p868Ei0S006696; Tue, 6 Sep 2011 15:14:45 +0700 (NOVST) (envelope-from danfe) Message-Id: <201109060814.p868Ei0S006696@regency.nsu.ru> Date: Tue, 6 Sep 2011 15:14:45 +0700 (NOVST) From: Alexey Dokuchaev To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/160508: Some libgphoto2 libraries insufficiently linked (missing libintl) X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexey Dokuchaev List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2011 09:10:02 -0000 >Number: 160508 >Category: ports >Synopsis: Some libgphoto2 libraries insufficiently linked (missing libintl) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 06 09:10:01 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Alexey Dokuchaev >Release: FreeBSD 8.2-STABLE i386 >Organization: >Environment: System: FreeBSD daria.lawndale.high 8.2-STABLE FreeBSD 8.2-STABLE #5: Mon May 9 10:42:21 CST 2011 root@:/usr/obj/usr/src/sys/DARIA i386 >Description: `graphics/libgphoto2' port installs libraries to work with various digital cameras. It can also be built with NLS (enabled by default). While main library (/usr/local/lib/libgphoto2.so) correctly embeds explicit reference to libintl.so.9, other libraries (e.g. /usr/local/lib/libgphoto2_port.so and /usr/local/lib/libgphoto2_port/0.8.0/*.so driver support libs) do not. I believe this happens because of the `gnome-libtool' script (while system libtool script behaves alike). On FreeBSD, gettext-related functions are not in libc, but in libintl, and INTLLIBS detected by configure script(s) as follows: /usr/local/lib/libintl.so -L/usr/local/lib /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib Now, consider this part from the build log of `libgphoto2_port/ptpip' driver: /bin/sh /home/danfe/fbsd/ports/graphics/libgphoto2/work/gnome-libtool --tag=CC --mode=link cc -O2 -pipe -march=pentium4m -fno-strict-aliasing -O2 -pipe -march=pentium4m -fno-strict-aliasing -module -no-undefined -avoid-version -export-dynamic -export-symbols ../iolib.sym -o ptpip.la -rpath /usr/local/lib/libgphoto2_port/0.8.0 ptpip_la-ptpip.lo ../libgphoto2_port/libgphoto2_port.la /usr/local/lib/libintl.so -L/usr/local/lib /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib -lpthread *** As you can see, reference to libintl.so passed in... *** gnome-libtool: link: cc -shared -fPIC -DPIC .libs/ptpip_la-ptpip.o -Wl,-rpath -Wl,/home/danfe/fbsd/ports/graphics/libgphoto2/work/libgphoto2-2.4.11/libgphoto2_port/libgphoto2_port/.libs -Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib ../libgphoto2_port/.libs/libgphoto2_port.so -L/usr/local/lib /usr/local/lib/libltdl.so -lpthread -O2 -march=pentium4m -O2 -march=pentium4m -Wl,-rpath -Wl,/usr/local/lib -Wl,-soname -Wl,ptpip.so -Wl,-retain-symbols-file -Wl,../iolib.sym -o .libs/ptpip.so *** ...but judging from this libtool output, resulting shared object is not being linked to libintl. *** Apparently, this bug is usually unnoticed because it does not happen on GNU/Linux where glibc already includes gettext symbols. However, the bug exposes itself on FreeBSD, when using Python binding for libgphoto2, called piggyphoto, available here: http://magiclantern.wikia.com/wiki/Remote_control_with_PTP_and_Python >How-To-Repeat: Checkout the source code for piggyphoto from the Git repository (git clone git://github.com/alexdu/piggyphoto.git) and try to do the following: $ python autodetect.py libgphoto2 version: 2.4.11 cc (C compiler used) no ltdl (for portable loading of camlibs) EXIF (for special handling of EXIF files) detected cameras: /libexec/ld-elf.so.1: /usr/local/lib/libgphoto2_port/0.8.0/ptpip.so: Undefined symbol "libintl_dgettext" >Fix: >Release-Note: >Audit-Trail: >Unformatted: