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 786763 - ipcpipeline: tests and example don't build on macOS
ipcpipeline: tests and example don't build on macOS
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Mac OS
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-08-24 14:41 UTC by Philippe Normand
Modified: 2017-09-04 08:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build log (4.78 KB, text/plain)
2017-08-24 14:41 UTC, Philippe Normand
Details

Description Philippe Normand 2017-08-24 14:41:11 UTC
Created attachment 358350 [details]
build log

See attached build logs
Comment 1 George Kiagiadakis 2017-08-31 12:12:05 UTC
Hopefully fixed. These fcntl() calls are supposed to be portable, but I can only test on linux here. Please let me know if something is still not working.

Just for the record, the {0} initializer warnings is a compiler bug.

commit 4e239a6632ca648e3bf39b120e2d15822e5540e4
Author: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date:   Thu Aug 31 15:07:45 2017 +0300

    examples: ipcpipeline: do not use the linux-specific SOCK_NONBLOCK flag
    
    Use fcntl() instead to set O_NONBLOCK, which is portable.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=786763

commit 282b682caba2fc3d932591d7842cb953ad2357f8
Author: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date:   Thu Aug 31 14:57:34 2017 +0300

    tests: ipcpipeline: provide pipe2() on systems that don't have it
    
    https://bugzilla.gnome.org/show_bug.cgi?id=786763
Comment 2 Nicolas Dufresne (ndufresne) 2017-08-31 13:24:29 UTC
(In reply to George Kiagiadakis from comment #1) 
> Just for the record, the {0} initializer warnings is a compiler bug.

I'm not sure it make sense in this context, but I've seen code initializing the first member of the struct with proper type, and then just adding a comma, which was assumed more portable in the code I've seen.

  struct my_type mt = { NULL, };
Comment 3 Philippe Normand 2017-09-03 11:16:55 UTC
make -C tests/examples/ipcpipeline/
  CC       ipcpipeline1-ipcpipeline1.o
  CCLD     ipcpipeline1
  CC       ipc_play-ipc-play.o
ipc-play.c:972:42: error: use of undeclared identifier 'SOCK_NONBLOCK'
  if (socketpair (AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0, pipes)) {
                                         ^
1 error generated.
make: *** [ipc_play-ipc-play.o] Error 1
Comment 4 Philippe Normand 2017-09-03 11:19:26 UTC
Also, I wonder why ipcpipeline is in DIST_SUBDIRS but not in SUBDIRS in the Makefile.am. Is that intended?
Comment 5 George Kiagiadakis 2017-09-04 07:42:51 UTC
commit 91edec25dd2a50e44b970296e55e1570c3e0d33c
Author: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date:   Mon Sep 4 10:39:58 2017 +0300

    examples: ipcpipeline: get rid of yet another use of SOCK_NONBLOCK
    
    https://bugzilla.gnome.org/show_bug.cgi?id=786763
Comment 6 George Kiagiadakis 2017-09-04 07:45:17 UTC
(In reply to Philippe Normand from comment #4)
> Also, I wonder why ipcpipeline is in DIST_SUBDIRS but not in SUBDIRS in the
> Makefile.am. Is that intended?

No specific intention, I just followed the example of others. I'm not sure if there's a policy for SUBDIRS vs DIST_SUBDIRS usage?
Comment 7 Tim-Philipp Müller 2017-09-04 08:02:34 UTC
It is in SUBDIRS when enabled:

if USE_IPCPIPELINE
IPCPIPELINE_DIR=ipcpipeline
else
IPCPIPELINE_DIR=
endif

SUBDIRS = ... $(IPCPIPELINE_DIR) ...


(It's more efficient to prevent make descending into subdirs if the whole plugin is disabled)
Comment 8 George Kiagiadakis 2017-09-04 08:22:31 UTC
(In reply to Tim-Philipp Müller from comment #7)
> It is in SUBDIRS when enabled:
> 
> if USE_IPCPIPELINE
> IPCPIPELINE_DIR=ipcpipeline
> else
> IPCPIPELINE_DIR=
> endif
> 
> SUBDIRS = ... $(IPCPIPELINE_DIR) ...

I believe Philippe is talking about tests/examples/Makefile.am
Comment 9 George Kiagiadakis 2017-09-04 08:25:17 UTC
(In reply to George Kiagiadakis from comment #8)
> I believe Philippe is talking about tests/examples/Makefile.am

Oh! And looking at your reply, I just realized I should have done the same trick for tests/examples/Makefile.am

Will fix.