pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/29192: x11/gtk2 link fails on MacOS X 10.[12].x



>Number:         29192
>Category:       pkg
>Synopsis:       x11/gtk2 link fails on MacOS X 10.[12].x
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 02 00:16:00 +0000 2005
>Originator:     John D. Baker
>Release:        MacOS X 10.2.8
>Organization:
>Environment:
Darwin ed.local. 6.8 Darwin Kernel Version 6.8: Wed Sep 10 15:20:55 PDT
2003; root:xnu/xnu-344.49.obj~2/RELEASE_PPC  Power Macintosh powerpc

>Description:
Building x11/gkt2 (2.6.1) fails on MacOS X 10.[12].x as follows:

[...]
/bin/sh ../../libtool --mode=link gcc -pipe  -O2 -I/usr/pkg/include 
-D_REENTRANT -I/usr/include -I/usr/pkg/include/freetype2 -Wall  -L/usr/pkg/lib 
-L/usr/lib -L/usr/X11R6/lib -o test-mime  test-mime.o libxdgmime.la -lintl 
-liconv -lpthread 
gcc -pipe -O2 -I/Volumes/NetBSD/pkgsrc/x11/gtk2/work/.buildlink/include 
-D_REENTRANT 
-I/Volumes/NetBSD/pkgsrc/x11/gtk2/work/.buildlink/include/freetype2 -Wall -o 
test-mime test-mime.o  -L/Volumes/NetBSD/pkgsrc/x11/gtk2/work/.buildlink/lib 
-L/Volumes/NetBSD/pkgsrc/x11/gtk2/work/.x11-buildlink/lib ./.libs/libxdgmime.a 
/Volumes/NetBSD/pkgsrc/x11/gtk2/work/.buildlink/lib/libintl.dylib -lc 
/Volumes/NetBSD/pkgsrc/x11/gtk2/work/.buildlink/lib/libiconv.dylib -lpthread
ld: Undefined symbols:
_getc_unlocked
gnumake[4]: *** [test-mime] Error 1
gnumake[3]: *** [all-recursive] Error 1
gnumake[2]: *** [all] Error 2
gnumake[1]: *** [all-recursive] Error 1
gnumake: *** [all] Error 2
*** Error code 2

Stop.
bmake: stopped in /usr/pkgsrc/x11/gtk2
[...]

>How-To-Repeat:
bootstrap pkgsrc on MacOS X 10.[12].x
cd .../pkgsrc//x11/gtk2
bmake

>Fix:
MacOS X 10.[12].x do not have "getc_unlocked()".  The gtk+-2.6.1 source
generally handles such situations with appropriate conditionally-
compiled code fragments substituting ordinary "getc()" based on the
value of "HAVE_FLOCKFILE" which is undefined for MacOS X 10.[12].x,
but the file:

    "work/gtk+-2.6.1/gtk/xdgmime/xdgmimemagic.c"

contains no such provisions.  This should be reported to the gtk
project developers.

Workaround:
cd .../pkgsrc/x11/gtk2
bmake configure

patch "work/gtk+-2.6.1/gtk/xdgmime/xdgmimemagic.c" as follows:

--- work/gtk+-2.6.1/gtk/xdgmime/xdgmimemagic.c.orig     Tue Feb  1 14:15:56 2005
+++ work/gtk+-2.6.1/gtk/xdgmime/xdgmimemagic.c  Tue Feb  1 14:29:27 2005
@@ -173,3 +173,7 @@
     {
+#ifdef HAVE_FLOCKFILE
       c = getc_unlocked (magic_file);
+#else
+      c = getc (magic_file);
+#endif
       if (c == EOF)
@@ -208,4 +212,7 @@
     {
+#ifdef HAVE_FLOCKFILE
       c = getc_unlocked (magic_file);
-
+#else
+      c = getc (magic_file);
+#endif
       if (c == EOF)
@@ -252,3 +259,7 @@
 
+#ifdef HAVE_FLOCKFILE
   c = getc_unlocked (magic_file);
+#else
+  c = getc (magic_file);
+#endif
   if (c == EOF)
@@ -264,3 +275,7 @@
 
+#ifdef HAVE_FLOCKFILE
   c = getc_unlocked (magic_file);
+#else
+  c = getc (magic_file);
+#endif
   if (c == EOF)
@@ -297,3 +312,7 @@
     {
+#ifdef HAVE_FLOCKFILE
       c = getc_unlocked (magic_file);
+#else
+      c = getc (magic_file);
+#endif
       if (c == EOF)
@@ -322,3 +341,7 @@
   /* Sniff the buffer to make sure it's a valid line */
+#ifdef HAVE_FLOCKFILE
   c = getc_unlocked (magic_file);
+#else
+  c = getc (magic_file);
+#endif
   if (c == EOF)
@@ -343,3 +366,7 @@
        return XDG_MIME_MAGIC_ERROR;
+#ifdef HAVE_FLOCKFILE
       c = getc_unlocked (magic_file);
+#else
+      c = getc (magic_file);
+#endif
       if (c == EOF)
@@ -364,3 +391,7 @@
     }
+#ifdef HAVE_FLOCKFILE
   c = getc_unlocked (magic_file);
+#else
+  c = getc (magic_file);
+#endif
   if (c == EOF)
@@ -378,3 +409,7 @@
   matchlet->value_length = 0;
+#ifdef HAVE_FLOCKFILE
   c = getc_unlocked (magic_file);
+#else
+  c = getc (magic_file);
+#endif
   if (c == EOF)
@@ -387,3 +422,7 @@
 
+#ifdef HAVE_FLOCKFILE
   c = getc_unlocked (magic_file);
+#else
+  c = getc (magic_file);
+#endif
   if (c == EOF)
@@ -413,3 +452,7 @@
 
+#ifdef HAVE_FLOCKFILE
   c = getc_unlocked (magic_file);
+#else
+  c = getc (magic_file);
+#endif
   if (c == '&')
@@ -432,3 +475,7 @@
        }
+#ifdef HAVE_FLOCKFILE
       c = getc_unlocked (magic_file);
+#else
+      c = getc (magic_file);
+#endif
     }
@@ -451,3 +498,7 @@
        }
+#ifdef HAVE_FLOCKFILE
       c = getc_unlocked (magic_file);
+#else
+      c = getc (magic_file);
+#endif
     }
@@ -467,3 +518,7 @@
        }
+#ifdef HAVE_FLOCKFILE
       c = getc_unlocked (magic_file);
+#else
+      c = getc (magic_file);
+#endif
     }





Home | Main Index | Thread Index | Old Index