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 795765 - [base] Compilation fails on GCC 8.0.1
[base] Compilation fails on GCC 8.0.1
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-05-02 21:47 UTC by U. Artie Eoff
Modified: 2018-11-03 12:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
video: Silence "restrict" issues with ORC code (4.70 KB, patch)
2018-05-04 08:37 UTC, Edward Hervey
committed Details | Review

Description U. Artie Eoff 2018-05-02 21:47:27 UTC
gstreamer (master) heads/master-0-g98200ddd8dfd 
gst-plugins-base (master) heads/master-0-gdbd9ff1cf510

With GCC 8.0.1 (default on recent Fedora 28 release), gst-plugins-base fails to compile:

video-chroma.c: In function 'video_chroma_up_v2_u16':
video-chroma.c:360:1: error: passing argument 1 to restrict-qualified parameter aliases with argument 3 [-Werror=restrict]
 MAKE_UPSAMPLE_V2 (u16, guint16);
 ^~~~~~~~~~~~~~~~
video-chroma.c:360:1: error: passing argument 2 to restrict-qualified parameter aliases with argument 4 [-Werror=restrict]
video-chroma.c: In function 'video_chroma_up_v2_u8':
video-chroma.c:361:1: error: passing argument 1 to restrict-qualified parameter aliases with argument 3 [-Werror=restrict]
 MAKE_UPSAMPLE_V2 (u8, guint8);
 ^~~~~~~~~~~~~~~~
video-chroma.c:361:1: error: passing argument 2 to restrict-qualified parameter aliases with argument 4 [-Werror=restrict]
video-chroma.c: In function 'video_chroma_down_h2_u8':
video-chroma.c:365:1: error: passing argument 1 to restrict-qualified parameter aliases with argument 2 [-Werror=restrict]
 MAKE_DOWNSAMPLE_H2_ORC (u8, guint8);
 ^~~~~~~~~~~~~~~~~~~~~~
video-chroma.c: In function 'video_chroma_down_v2_u16':
video-chroma.c:366:1: error: passing argument 1 to restrict-qualified parameter aliases with argument 2 [-Werror=restrict]
 MAKE_DOWNSAMPLE_V2 (u16, guint16);
 ^~~~~~~~~~~~~~~~~~
video-chroma.c: In function 'video_chroma_down_v2_u8':
video-chroma.c:367:1: error: passing argument 1 to restrict-qualified parameter aliases with argument 2 [-Werror=restrict]
 MAKE_DOWNSAMPLE_V2 (u8, guint8);
 ^~~~~~~~~~~~~~~~~~
video-chroma.c: In function 'video_chroma_down_v4_u16':
video-chroma.c:551:1: error: passing argument 1 to restrict-qualified parameter aliases with argument 2 [-Werror=restrict]
 MAKE_DOWNSAMPLE_V4 (u16, guint16);
 ^~~~~~~~~~~~~~~~~~
video-chroma.c: In function 'video_chroma_down_v4_u8':
video-chroma.c:552:1: error: passing argument 1 to restrict-qualified parameter aliases with argument 2 [-Werror=restrict]
 MAKE_DOWNSAMPLE_V4 (u8, guint8);
 ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[5]: *** [Makefile:998: libgstvideo_1.0_la-video-chroma.lo] Error 1

Can workaround with --disable-fatal-warnings.
Comment 1 Sebastian Dröge (slomo) 2018-05-03 05:36:54 UTC
This looks like a real problem, wrong usage of restrict.
Comment 2 Edward Hervey 2018-05-04 08:37:38 UTC
Created attachment 371657 [details] [review]
video: Silence "restrict" issues with ORC code

The problem is that even though the functions we are calling are
in-place transformation, orc automatically puts the restrict keyword
on all arguments. To silence that warning just create yet-another
variable containing the same value.
Comment 3 Sebastian Dröge (slomo) 2018-05-04 08:40:22 UTC
Comment on attachment 371657 [details] [review]
video: Silence "restrict" issues with ORC code

Get this is but leave the bug open. This only hides the warning for now because gcc is too stupid to see that this is equally broken
Comment 4 Edward Hervey 2018-05-05 08:32:14 UTC
Comment on attachment 371657 [details] [review]
video: Silence "restrict" issues with ORC code

I'll also backport it to 1.14

commit 1a1570bb1e388022e5f9819931c2edfa50440f25 (HEAD -> master, origin/master, origin/HEAD)
Author: Edward Hervey <edward@centricular.com>
Date:   Fri May 4 10:35:36 2018 +0200

    video: Silence "restrict" issues with ORC code
    
    The problem is that even though the functions we are calling are
    in-place transformation, orc automatically puts the restrict keyword
    on all arguments. To silence that warning just create yet-another
    variable containing the same value.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=795765
Comment 5 GStreamer system administrator 2018-11-03 12:06:50 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/449.