Subject: pkg/30090: [PATCH] security/gnome-keyring fails to link against all necessary libraries
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <idart@performancedesign.no>
List: pkgsrc-bugs
Date: 04/29/2005 09:13:00
>Number:         30090
>Category:       pkg
>Synopsis:       [PATCH] security/gnome-keyring fails to link against all necessary libraries
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 29 09:13:00 +0000 2005
>Originator:     Idar Tollefsen
>Release:        N/A
>Organization:
Performance Design
>Environment:
Darwin fulcrum.local 7.9.0 Darwin Kernel Version 7.9.0: Wed Mar 30 20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC  Power Macintosh powerpc
>Description:
When trying to build security/gnome-keyring I get the following:

/bin/sh ./libtool --mode=link gcc -pipe  -O2 -I/usr/local/include -I/usr/include -I/usr/local/include/freetype2  -L/usr/local/lib -L/usr/lib -L/usr/X11R6/lib -o gnome-keyring-ask  gnome-keyring-ask.o -L/usr/local/lib -lgtk-x11-2.0 -lintl
gcc -pipe -O2 -I/usr/local/pkgsrc/security/gnome-keyring/work/.buildlink/include -I/usr/local/pkgsrc/security/gnome-keyring/work/.buildlink/include/freetype2 -o gnome-keyring-ask gnome-keyring-ask.o  -L/usr/local/pkgsrc/security/gnome-keyring/work/.buildlink/lib -L/usr/local/pkgsrc/security/gnome-keyring/work/.x11-buildlink/lib /usr/local/pkgsrc/security/gnome-keyring/work/.buildlink/lib/libgtk-x11-2.0.dylib /usr/local/pkgsrc/security/gnome-keyring/work/.buildlink/lib/libintl.dylib /usr/lib/libiconv.dylib -lc
ld: gnome-keyring-ask.o illegal reference to symbol: _g_print defined in indirectly referenced dynamic library /usr/local/lib/libglib-2.0.0.dylib
ld: gnome-keyring-ask.o illegal reference to symbol: _g_signal_connect_data defined in indirectly referenced dynamic library /usr/local/lib/libgobject-2.0.0.dylib
*** Error code 1

>How-To-Repeat:
Try to configure and build security/gnome-keyring.
It's possible that this problem is Darwin/OS X specific.
If it is, try to configure and build security/gnome-keyring
on Darwin/OS X.



>Fix:
Add linking against gobject and glib by patching the configure script.

Here's a new patch (security/gnome-keyring/patches/patch-aa):
-------------------------------------------------------------

--- configure.orig	Fri Apr 29 10:15:00 2005
+++ configure	Fri Apr 29 10:23:00 2005
@@ -20591,23 +20591,23 @@
   else
      PKG_CONFIG_MIN_VERSION=0.9.0
      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
-        echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.3.1" >&5
-echo $ECHO_N "checking for gtk+-2.0 >= 2.3.1... $ECHO_C" >&6
+        echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.3.1  gobject-2.0 >= 2.3.1  glib-2.0 >= 2.3.1" >&5
+echo $ECHO_N "checking for gtk+-2.0 >= 2.3.1  gobject-2.0 >= 2.3.1  glib-2.0 >= 2.3.1... $ECHO_C" >&6
 
-        if $PKG_CONFIG --exists "gtk+-2.0 >= 2.3.1" ; then
+        if $PKG_CONFIG --exists "gtk+-2.0 >= 2.3.1  gobject-2.0 >= 2.3.1  glib-2.0 >= 2.3.1" ; then
             echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
             succeeded=yes
 
             echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
 echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6
-            GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.3.1"`
+            GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.3.1  gobject-2.0 >= 2.3.1  glib-2.0 >= 2.3.1"`
             echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
 echo "${ECHO_T}$GTK_CFLAGS" >&6
 
             echo "$as_me:$LINENO: checking GTK_LIBS" >&5
 echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6
-            GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.3.1"`
+            GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.3.1  gobject-2.0 >= 2.3.1  glib-2.0 >= 2.3.1"`
             echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
 echo "${ECHO_T}$GTK_LIBS" >&6
         else
@@ -20615,7 +20615,7 @@
             GTK_LIBS=""
             ## If we have a custom action on failure, don't print errors, but
             ## do set a variable so people can do so.
-            GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.3.1"`
+            GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.3.1  gobject-2.0 >= 2.3.1  glib-2.0 >= 2.3.1"`
             echo $GTK_PKG_ERRORS
         fi
 
@@ -20630,8 +20630,8 @@
   if test $succeeded = yes; then
      :
   else
-     { { echo "$as_me:$LINENO: error: Library requirements (gtk+-2.0 >= 2.3.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
-echo "$as_me: error: Library requirements (gtk+-2.0 >= 2.3.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
+     { { echo "$as_me:$LINENO: error: Library requirements (gtk+-2.0 >= 2.3.1  gobject-2.0 >= 2.3.1  glib-2.0 >= 2.3.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
+echo "$as_me: error: Library requirements (gtk+-2.0 >= 2.3.1  gobject-2.0 >= 2.3.1  glib-2.0 >= 2.3.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
    { (exit 1); exit 1; }; }
   fi