GNOME Bugzilla – Bug 739152
gl/cocoa: build with GNUStep fails
Last modified: 2014-11-19 16:28:30 UTC
Build log: http://paste.fedoraproject.org/145036/14141901/ No idea what the correct course of action should be. running Kubuntu 14.10 (upgraded from 14.04); building all dependency components from master with jhbuild.
Created attachment 289301 [details] copy of linked build log
This sounds like your GNUstep headers are somehow inconsistent or broken. Can you make sure that other GNUstep applications build fine, and then retry?
Graphos builds fine... I wouldn't be surprised if it was a problem with my local setup, as things have started breaking mysteriously as of late, but I'll keep the issue open in any case.
Ah, the actual error is this one here: gstglcontext_cocoa.m: In function 'gst_gl_context_cocoa_create_context': gstglcontext_cocoa.m:220:3: error: unknown type name '__block' __block NSOpenGLContext *glContext = nil; ^ It sounds like GNUstep and gobjc do not support the __block type? Do you know how this should be handled when not using the Apple toolchain?
Yes, from what I can tell it's specifically a gcc issue; clang supports __block (and this has caused problems for people who have used __block as an identifier in the past; a cursory Google search shows both glibc and GNUstep itself as victims). https://gcc.gnu.org/ml/gcc/2009-09/msg00264.html is the only thing I could find regarding discussion of how to implement blocks in gcc; it mostly went nowhere, with some people wondering if FSF legal would complain if the Apple gcc implementation (wait, there is one?) could be patched into the official gcc directly. https://github.com/freebsd/freebsd/commit/9c8bbe68490d277cf64459b3390cf48e2a09ddf6?utm_source=anzwix it appears the FreeBSD version of gcc also includes blocks. As for what GStreamer should do, I have no idea.
So gcc has no support for blocks in ObjectiveC at all? I would consider just dropping support for GNUStep as the solution here then until they support this feature. It's part of the ObjectiveC language these days and just too useful.
commit 402e1a067ae817276c5f2c86bac1d7bdf157ccca Author: Sebastian Dröge <sebastian@centricular.com> Date: Thu Nov 13 12:01:25 2014 +0100 gl/cocoa: Don't override the application delegate Otherwise interesting things will happen in Cocoa applications, like infinite event loops that block the NSApplication loop forever. This was only needed for GNUStep and thus can safely be removed now. commit 13c8517570c3550b5c46a3cb0ff7f8b7888a4ddf Author: Sebastian Dröge <sebastian@centricular.com> Date: Thu Nov 13 11:58:07 2014 +0100 gl/cocoa: Remove GNUStep support Until gcc and GNUStep properly support Objective-C blocks and other "new" features of Objective-C we can't properly support them without making the code much more ugly. https://bugzilla.gnome.org/show_bug.cgi?id=739152