[cups.bugs] [MOD] STR #3774: cups with dbus support fails to compile on solaris and HP-UX
Peter O'Gorman
pogma at thewrittenword.com
Thu Jan 13 09:18:57 PST 2011
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
With dbus enabled cups' configure script checks for
dbus_message_iter_init_append in libdbus-1, this check fails on solaris
and HP-UX with the native ld.
This is the problem:
AC_CHECK_LIB(dbus-1, dbus_message_iter_init_append,
AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_INIT_APPEND),,
`$PKGCONFIG --libs dbus-1`)
It causes autoconf to try to link a program with:
cc ..... -ldbus-1 -L/opt/TWWfsw/dbus12/lib -R/opt/TWWFsw/dbus12/lib
-ldbus-1
This does not work because the first -ldbus-1 is before the -L which gives
the path to libdbus-1, so the linker can not find it. While many linkers
will look for libdbus-1 in all the -L paths on the link line, this is not
the case for solaris and HP-UX, those will only look at the -L paths that
are seen before the -llib is encountered.
Because of this configure detects that libdbus-1 does not have
dbus_message_iter_init_append and later linking fails with undefined
symbols.
The attached patch fixes it for us. Instead of usinc AC_CHECK_LIB it
temporarily adds `pkg-config --libs dbus1` to LIBS and uses AC_CHECK_FUNC.
Link: http://www.cups.org/str.php?L3774
Version: 1.4.6
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cups.patch
URL: <https://lists.cups.org/pipermail/cups/attachments/20110113/3912add6/attachment.ksh>
More information about the cups
mailing list