pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/43463: linking agains glib2 fails on Mac OS 10.4
>Number: 43463
>Category: pkg
>Synopsis: linking agains glib2 fails on Mac OS 10.4
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jun 12 17:05:00 +0000 2010
>Originator: Edgar Fuß
>Release: pkgsrc-2010Q1
>Organization:
Mathematisches Institut der Uni Bonn
>Environment:
System: Darwin XXX 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT
2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh powerpc
>Description:
Linking against glib2 (i.e. building gtk2+) on Mac OS 10.4 (Tiger)
fails due to an unresolved symbol _res_9_init.
>How-To-Repeat:
cd x11/gtk2; bmake build
>Fix:
Apply the following (slightliy adapted) upstream fix to config.in as a
patch, then rebuild configure using autoconf, merge with patch-aa/-ak:
--- configure.in.orig 2010-06-10 00:22:26.000000000 +0200
+++ configure.in 2010-06-10 00:20:29.000000000 +0200
@@ -1001,23 +1001,31 @@
if test $glib_native_win32 = no; then
AC_CHECK_FUNCS(strndup setresuid setreuid)
AC_CHECK_HEADERS(sys/prctl.h arpa/nameser_compat.h)
- AC_CHECK_FUNC(res_query, ,
- [AC_CHECK_LIB(resolv, res_query, [ LIBASYNCNS_LIBADD="-lresolv" ],
- [ save_libs="$LIBS"
- LIBS="-lresolv $LIBS"
- AC_MSG_CHECKING([for res_query in -lresolv (alternate version)])
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([[#include <resolv.h>]], [[res_query(0,0,0,0,0)]])],
- [ AC_MSG_RESULT(yes)
- LIBASYNCNS_LIBADD="-lresolv" ],
- [ AC_MSG_RESULT(no)
- AC_CHECK_LIB(bind, res_query,
- [ LIBASYNCNS_LIBADD="-lbind" ],
- [ AC_MSG_ERROR(res_query not found) ] ) ] )
- LIBS="$save_libs"
- ] )
- ]
- )
+
+ # We can't just use AC_CHECK_FUNC/AC_CHECK_LIB here. Bug 586150
+ AC_MSG_CHECKING([for res_query])
+ AC_TRY_LINK([#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>],
+ [res_query("test", 0, 0, (void *)0, 0);],
+ [AC_MSG_RESULT([yes])],
+ [save_libs="$LIBS"
+ LIBS="-lresolv $LIBS"
+ AC_TRY_LINK([#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>],
+ [res_query("test", 0, 0, (void *)0, 0);],
+ [AC_MSG_RESULT([in -lresolv])
+ LIBASYNCNS_LIBADD="-lresolv"],
+ [LIBS="-lbind $save_libs"
+ AC_TRY_LINK([#include <resolv.h>],
+ [res_query("test", 0, 0, (void *)0,
0);],
+ [AC_MSG_RESULT([in -lbind])
+ LIBASYNCNS_LIBADD="-lbind"],
+ [AC_MSG_ERROR(not found)])])
+ LIBS="$save_libs"])
AC_SUBST(LIBASYNCNS_LIBADD)
fi
--- gio-2.0.pc.in.orig 2010-06-10 00:22:55.000000000 +0200
+++ gio-2.0.pc.in 2010-06-10 00:20:23.000000000 +0200
@@ -10,4 +10,5 @@
Version: @VERSION@
Requires: glib-2.0,gobject-2.0,gmodule-no-export-2.0
Libs: -L${libdir} -lgio-2.0
+Libs.private: @LIBASYNCNS_LIBADD@
Cflags:
Home |
Main Index |
Thread Index |
Old Index