After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 739152 - gl/cocoa: build with GNUStep fails
gl/cocoa: build with GNUStep fails
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.4.5
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-10-24 22:36 UTC by Pietro Gagliardi (andlabs)
Modified: 2014-11-19 16:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
copy of linked build log (82.69 KB, application/octet-stream)
2014-10-24 22:37 UTC, Pietro Gagliardi (andlabs)
Details

Description Pietro Gagliardi (andlabs) 2014-10-24 22:36:03 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.
Comment 1 Pietro Gagliardi (andlabs) 2014-10-24 22:37:05 UTC
Created attachment 289301 [details]
copy of linked build log
Comment 2 Sebastian Dröge (slomo) 2014-10-25 10:15:32 UTC
This sounds like your GNUstep headers are somehow inconsistent or broken. Can you make sure that other GNUstep applications build fine, and then retry?
Comment 3 Pietro Gagliardi (andlabs) 2014-10-25 16:56:23 UTC
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.
Comment 4 Sebastian Dröge (slomo) 2014-10-26 11:13:00 UTC
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?
Comment 5 Pietro Gagliardi (andlabs) 2014-10-26 13:22:29 UTC
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.
Comment 6 Sebastian Dröge (slomo) 2014-10-26 13:30:48 UTC
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.
Comment 7 Sebastian Dröge (slomo) 2014-11-13 11:08:18 UTC
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