glib fails to build with gcc 4.8.2 on Lion #23393
Comments
The functions themselves seem harmless enough, unless I'm missing something: static char *
unescape_string (const gchar *escaped_string,
const gchar *escaped_string_end,
const gchar *illegal_characters)
{
const gchar *in;
gchar *out, *result;
gint character;
if (escaped_string == NULL)
return NULL;
if (escaped_string_end == NULL)
escaped_string_end = escaped_string + strlen (escaped_string);
result = g_malloc (escaped_string_end - escaped_string + 1);
out = result;
for (in = escaped_string; in < escaped_string_end; in++)
... |
The problem seems to be that on Mac sources for libgio is being compiled as objective-c sources (see gio/Makefile.am:504), but GNU GCC doesn't handle this well. When I dropped the "-xobjective-c" switch it works. I'll update upstream bug report with more details. |
Upstream had a similar suggestion:
|
Hilariously, when I apply the recommended patch, GCC appears to choke on a core OS header instead:
Which I can't really blame on GNOME. |
I see this happening in vim too:
Maybe it doesn't like the NS_AVAILABLE_MAC macros? (vim compiled fine on 10.4, including the ObjC parts.) |
glib also works fine on 10.4. |
Since this fixed something, and doesn't break anything, I went ahead and integrated the fix upstream suggested. |
Logs: https://gist.github.com/mistydemeo/2fc344d92d1d3dae7724
A couple of errors in gdummyfile.c:
This doesn't happen with any Apple compilers.
(Note that the logs are from Tiger, but the same thing happens on x86_64 Lion with GCC 4.8.2.)
Upstream bug report: https://bugzilla.gnome.org/show_bug.cgi?id=672777
The text was updated successfully, but these errors were encountered: