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 794493 - Ubuntu Trusty Build failure due to __has_builtin
Ubuntu Trusty Build failure due to __has_builtin
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal blocker
: 1.14.0
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-03-19 17:08 UTC by jayeshece08
Modified: 2018-03-19 18:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description jayeshece08 2018-03-19 17:08:51 UTC
On Ubuntu trusty gst-plugins-good is failing to build which is caused by :
https://github.com/GStreamer/gst-plugins-good/commit/c21765e88eb38714b509927388e8d90032744f69 

#if defined(__has_builtin) && __has_builtin(__builtin_ctzll)


Snip of failure:
10:38:04,287 INFO  - libtool: link: gcc -shared -fPIC -DPIC .libs/libgstmultifile_la-gstmultifilesink.o .libs/libgstmultifile_la-gstmultifilesrc.o .libs/libgstmultifile_la-gstmultifile.o .libs/libgstmultifile_la-gstsplitfilesrc.o .libs/libgstmultifile_la-gstsplitmuxsink.o .libs/libgstmultifile_la-gstsplitmuxpartreader.o .libs/libgstmultifile_la-gstsplitmuxsrc.o .libs/libgstmultifile_la-gstsplitutils.o .libs/libgstmultifile_la-patternspec.o -Wl,-rpath -Wl,/opt/media/install/lib -Wl,-rpath -Wl,/opt/media/install/lib -L/opt/media/install/lib /opt/media/install/lib/libgstvideo-1.0.so /opt/media/install/lib/libgstbase-1.0.so /opt/media/install/lib/libgstreamer-1.0.so -lgio-2.0 -lgobject-2.0 -lglib-2.0 -pthread -pthread -pthread -pthread -Wl,-Bsymbolic-functions -pthread -Wl,-soname -Wl,libgstmultifile.so -o .libs/libgstmultifile.so
10:38:04,289 INFO  - mv -f .deps/libgstrtp_la-gstrtpjpegdepay.Tpo .deps/libgstrtp_la-gstrtpjpegdepay.Plo
10:38:04,289 INFO  - mv -f .deps/libgstrtp_la-gstrtpmp4vpay.Tpo .deps/libgstrtp_la-gstrtpmp4vpay.Plo
10:38:04,290 INFO  - mv -f .deps/libgstrtp_la-gstrtpmp4gdepay.Tpo .deps/libgstrtp_la-gstrtpmp4gdepay.Plo
10:38:04,291 INFO  - gstrtpulpfecdec.c:281:44: error: missing binary operator before token "("
10:38:04,291 INFO  - #if defined(__has_builtin) && __has_builtin(__builtin_ctzll)
10:38:04,291 INFO  - ^
10:38:04,291 INFO  - mv -f .deps/libgstrtp_la-gstrtph264depay.Tpo .deps/libgstrtp_la-gstrtph264depay.Plo
10:38:04,293 INFO  - libtool: link: gcc -shared -fPIC -DPIC .libs/libgstaudiofx_la-audiofx.o .libs/libgstaudiofx_la-audiopanorama.o .libs/libgstaudiofx_la-audioinvert.o .libs/libgstaudiofx_la-audioamplify.o .libs/libgstaudiofx_la-audiodynamic.o .libs/libgstaudiofx_la-audiokaraoke.o .libs/libgstaudiofx_la-audiofxbaseiirfilter.o .libs/libgstaudiofx_la-audiocheblimit.o .libs/libgstaudiofx_la-audiochebband.o .libs/libgstaudiofx_la-audioiirfilter.o .libs/libgstaudiofx_la-audiofxbasefirfilter.o .libs/libgstaudiofx_la-audiowsincband.o .libs/libgstaudiofx_la-audiowsinclimit.o .libs/libgstaudiofx_la-audiofirfilter.o .libs/libgstaudiofx_la-audioecho.o .libs/libgstaudiofx_la-gstscaletempo.o .libs/libgstaudiofx_la-tmp-orc.o -Wl,-rpath -Wl,/opt/media/install/lib -Wl,-rpath -Wl,/opt/media/install/lib -L/opt/media/install/lib /opt/media/install/lib/libgstbase-1.0.so /opt/media/install/lib/libgstreamer-1.0.so -lgobject-2.0 -lglib-2.0 /opt/media/install/lib/libgstaudio-1.0.so /opt/media/install/lib/libgstfft-1.0.so -lorc-0.4 -lm -pthread ...
10:38:04,293 INFO  - libtool: link: ( cd ".libs" && rm -f "libgstvideobox.la" && ln -s "../libgstvideobox.la" "libgstvideobox.la" )
10:38:04,298 INFO  - make[4]: Leaving directory `/opt/media/build/gst-plugins-good/gst/videobox'
10:38:04,298 INFO  - make[3]: Leaving directory `/opt/media/build/gst-plugins-good/gst/videobox'
10:38:04,299 INFO  - mv -f .deps/libgstrtp_la-gstrtpspeexpay.Tpo .deps/libgstrtp_la-gstrtpspeexpay.Plo
10:38:04,300 INFO  - make[3]: *** [libgstrtp_la-gstrtpulpfecdec.lo] Error 1
10:38:04,300 INFO  - make[3]: *** Waiting for unfinished jobs....

As per my understanding __has_builtin is a non-standard thing for GCC included in Ubuntu Trusty.
Comment 1 Tim-Philipp Müller 2018-03-19 18:03:31 UTC
Thanks for the bug report. Does it work if you remove the first #if block, so that it becomes just

#if defined(__GNUC__) && __GNUC__ >= 4
#define rtp_ulpfec_ctz64 __builtin_ctzll
#else
...
#endif

?
Comment 2 U. Artie Eoff 2018-03-19 18:15:50 UTC
(In reply to Tim-Philipp Müller from comment #1)
> Thanks for the bug report. Does it work if you remove the first #if block,
> so that it becomes just
> 
> #if defined(__GNUC__) && __GNUC__ >= 4
> #define rtp_ulpfec_ctz64 __builtin_ctzll
> #else
> ...
> #endif
> 
> ?

Yes.
Comment 3 Tim-Philipp Müller 2018-03-19 18:42:29 UTC
This should fix it then:

commit 56577236f8b0ca0735c1d58e92073e6d810d14db
Author: Tim-Philipp Müller <tim@centricular.com>
Date:   Mon Mar 19 18:39:08 2018 +0000

    rtpulpfecdec: fix build with older gcc
    
    As on Ubuntu Trusty.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=794493