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 737030 - Build error with clang on OSX
Build error with clang on OSX
Status: RESOLVED DUPLICATE of bug 747730
Product: GStreamer
Classification: Platform
Component: common
git master
Other Mac OS
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-09-20 16:39 UTC by Josep Torra Valles
Modified: 2015-06-10 11:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
config.log generated with latest ax_pthread.m4 (125.91 KB, application/octet-stream)
2014-09-21 09:29 UTC, Josep Torra Valles
Details

Description Josep Torra Valles 2014-09-20 16:39:51 UTC
I'm experiencing build errors in OSX like the following:

$ make V=1
/usr/bin/perl ./extract.pl testrtpool.c ../../../docs/manual/advanced-threads.xml
Extracting testrtpool.c block a  from ../../../docs/manual/advanced-threads.xml
Extracting testrtpool.c block b  from ../../../docs/manual/advanced-threads.xml
Extracting testrtpool.c block c  from ../../../docs/manual/advanced-threads.xml
Writing testrtpool.c block a
Writing testrtpool.c block b
Writing testrtpool.c block c
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
gcc -DHAVE_CONFIG_H -I. -I../../..    -I../../../libs -I../../.. -I../../../libs -I../../.. -D_REENTRANT -I/usr/local/Cellar/glib/2.40.0_1/include/glib-2.0 -I/usr/local/Cellar/glib/2.40.0_1/lib/glib-2.0/include -I/usr/local/opt/gettext/include  -DG_THREADS_MANDATORY -DG_DISABLE_DEPRECATED  -Wall -Wdeclaration-after-statement -Wvla -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wformat-nonliteral -Wformat-security -Wold-style-definition -Winit-self -Wmissing-include-dirs -Waddress -Waggregate-return -Wno-multichar -Wnested-externs  -g   -DGST_DISABLE_DEPRECATED -Werror -D_THREAD_SAFE -pthread -g -O2 -MT testrtpool-testrtpool.o -MD -MP -MF .deps/testrtpool-testrtpool.Tpo -c -o testrtpool-testrtpool.o `test -f 'testrtpool.c' || echo './'`testrtpool.c
mv -f .deps/testrtpool-testrtpool.Tpo .deps/testrtpool-testrtpool.Po
/bin/sh ../../../libtool  --tag=CC   --mode=link gcc -I../../../libs -I../../.. -I../../../libs -I../../.. -D_REENTRANT -I/usr/local/Cellar/glib/2.40.0_1/include/glib-2.0 -I/usr/local/Cellar/glib/2.40.0_1/lib/glib-2.0/include -I/usr/local/opt/gettext/include  -DG_THREADS_MANDATORY -DG_DISABLE_DEPRECATED  -Wall -Wdeclaration-after-statement -Wvla -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wformat-nonliteral -Wformat-security -Wold-style-definition -Winit-self -Wmissing-include-dirs -Waddress -Waggregate-return -Wno-multichar -Wnested-externs  -g   -DGST_DISABLE_DEPRECATED -Werror -D_THREAD_SAFE -pthread -g -O2   -o testrtpool testrtpool-testrtpool.o ../../../gst/libgstreamer-1.0.la -L/usr/local/Cellar/glib/2.40.0_1/lib -L/usr/local/opt/gettext/lib -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl     -ldl
libtool: link: gcc -I../../../libs -I../../.. -I../../../libs -I../../.. -D_REENTRANT -I/usr/local/Cellar/glib/2.40.0_1/include/glib-2.0 -I/usr/local/Cellar/glib/2.40.0_1/lib/glib-2.0/include -I/usr/local/opt/gettext/include -DG_THREADS_MANDATORY -DG_DISABLE_DEPRECATED -Wall -Wdeclaration-after-statement -Wvla -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wformat-nonliteral -Wformat-security -Wold-style-definition -Winit-self -Wmissing-include-dirs -Waddress -Waggregate-return -Wno-multichar -Wnested-externs -g -DGST_DISABLE_DEPRECATED -Werror -D_THREAD_SAFE -pthread -g -O2 -o .libs/testrtpool testrtpool-testrtpool.o  ../../../gst/.libs/libgstreamer-1.0.dylib -L/usr/local/Cellar/glib/2.40.0_1/lib -L/usr/local/opt/gettext/lib -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -ldl -pthread
clang: error: argument unused during compilation: '-pthread'
clang: error: argument unused during compilation: '-pthread'
make[1]: *** [testrtpool] Error 1
make: *** [all] Error 2

I've tried to fix myself but I couldn't come up with the right fix.

Seems that the root cause is at darwin case in http://cgit.freedesktop.org/gstreamer/gstreamer/tree/m4/ax_pthread.m4 which add '-pthread'.

Some related info at http://savannah.gnu.org/patch/?8186 and http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=history;f=m4/ax_pthread.m4

Maybe just our committed macro has to be updated.
Comment 1 Josep Torra Valles 2014-09-20 21:00:30 UTC
I've tried with the latest ax_pthread.m4 but the issue it's still not fixed with it.
Comment 2 Josep Torra Valles 2014-09-21 09:29:00 UTC
Created attachment 286725 [details]
config.log generated with latest ax_pthread.m4

This is the config log generated with the ax_pthread.mp4 updated with latest upstream revision.

I've tried commenting the darwin case at [1] and it has built without error so some relationship with that one.

[1] http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob;f=m4/ax_pthread.m4;h=d383ad5c6d6a5061370800bb1dc89b7a334c0638;hb=HEAD#l163
Comment 3 Tim-Philipp Müller 2015-06-10 11:47:22 UTC
This was updated btw:

commit 93d3ffc34c2f24b252243dbbccd604d63cbe6319
Author: Arun Raghavan <git@arunraghavan.net>
Date:   Wed Nov 26 21:38:29 2014 +0530

    m4: Add ax_pthread.m4
    
    We'll share this between gstreamer (which uses a slightly older version
    of ax_pthread.m4)  and gst-plugins-bad (which uses an even older
    acx_pthread.m4).


There's also bug #747954 . Is this the same as bug #747954 ?
Comment 4 Tim-Philipp Müller 2015-06-10 11:53:34 UTC
And there's yet another bug too :)

*** This bug has been marked as a duplicate of bug 747730 ***