glib2-shlibs.info clang fix

Jack Howarth <[email protected]> Sun, 10 Jul 2011 17:47:33 -0400
Newsgroups gmane.os.apple.fink.gnome
Message-ID <[email protected]>
  The current glib2-shlibs.info in unstable fails to build under clang
due to errors of the form...

/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I..  -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION -DPCRE_STATIC -I/sw/include -DG_DISABLE_SINGLE_INCLUDES   -Os -Wall -c -o garray.lo garray.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION -DPCRE_STATIC -I/sw/include -DG_DISABLE_SINGLE_INCLUDES -Os -Wall -c garray.c  -fno-common -DPIC -o .libs/garray.o
In file included from garray.c:944:
./galiasdef.c:18:72: error: only weak aliases are supported on darwin
extern __typeof (g_array_append_vals) g_array_append_vals __attribute((alias("IA__g_array_append_vals"), visibility("default")));
                                                                       ^
./galiasdef.c:21:58: error: only weak aliases are supported on darwin
extern __typeof (g_array_free) g_array_free __attribute((alias("IA__g_array_free"), visibility("default")));
                                                         ^
./galiasdef.c:24:72: error: only weak aliases are supported on darwin
extern __typeof (g_array_insert_vals) g_array_insert_vals __attribute((alias("IA__g_array_insert_vals"), visibility("default")));

Only two solutions are possible. The first, patching glib/makegalias.pl and friends to emit
"weak, alias" rather than "alias" seems difficult to implement. The far simplier fix is to just
append --disable-visibility to ConfigureParams. Note that configure in glib reports...

  --disable-visibility    don't use ELF visibility attributes

The Mach-O object format doesn't support true alias in the object files ala ELF and 
the weak import that Geoff Keatting created is considered a partially functional hack.
So in the absence of any failures in glib, the --disable-visibility option seems wiser.
          Jack

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
fink-gnome-core mailing list
[email protected]
List archive:
http://news.gmane.org/gmane.os.apple.fink.gnome
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-gnome-core