ports/160508: Some libgphoto2 libraries insufficiently linked (missing libintl)
Alexey Dokuchaev
danfe at regency.nsu.ru
Tue Sep 6 09:10:02 UTC 2011
>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:
More information about the freebsd-ports-bugs
mailing list