Bug 1121229

Summary: GCC 9: intel-gpu-tools build fails
Product: [openSUSE] openSUSE Tumbleweed Reporter: Martin Liška <martin.liska>
Component: X.OrgAssignee: Stefan Dirsch <sndirsch>
Status: RESOLVED FIXED QA Contact: E-mail List <xorg-maintainer-bugs>
Severity: Normal    
Priority: P3 - Medium    
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=109257
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 1120754    

Description Martin Liška 2019-01-09 10:45:30 UTC
Build error:

/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I../include/drm-uapi -I..  -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wlogical-op -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fno-strict-aliasing -I/usr/include/libdrm -I/usr/include/libdrm    -I/usr/include/kmod  -g3 -Og -Wno-maybe-uninitialized    -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  -DIGT_SRCDIR=\""/home/abuild/rpmbuild/BUILD/igt-gpu-tools-1.23/tests"\" -DIGT_DATADIR=\""/usr/share/igt-gpu-tools"\" -D_GNU_SOURCE -DIGT_LOG_DOMAIN=\""igt-fb"\" -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -c -o igt_fb.lo igt_fb.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include/drm-uapi -I.. -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wlogical-op -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fno-strict-aliasing -I/usr/include/libdrm -I/usr/include/libdrm -I/usr/include/kmod -g3 -Og -Wno-maybe-uninitialized -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DIGT_SRCDIR=\"/home/abuild/rpmbuild/BUILD/igt-gpu-tools-1.23/tests\" -DIGT_DATADIR=\"/usr/share/igt-gpu-tools\" -D_GNU_SOURCE -DIGT_LOG_DOMAIN=\"igt-fb\" -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -c igt_fb.c  -fPIC -DPIC -o .libs/igt_fb.o
igt_fb.c: In function 'create_bo_for_fb':
igt_fb.c:413:16: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
  413 |     memset(ptr + offsets[0], full_range ? 0x00 : 0x10,
      |                ^
igt_fb.c:415:16: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
  415 |     memset(ptr + offsets[1], 0x80,
      |                ^
igt_fb.c: In function 'convert_rgb24_to_nv12':
igt_fb.c:1382:12: error: array subscript 2 is outside array bounds of 'struct igt_vec4[2]' [-Werror=array-bounds]
 1382 |  rgb->d[0] = rgb24[2];
      |  ~~~~~~~~~~^~~~~~~~~~
igt_fb.c:1549:20: note: while referencing 'rgb'
 1549 |    struct igt_vec4 rgb[2];
      |                    ^~~
igt_fb.c:1383:12: error: array subscript 2 is outside array bounds of 'struct igt_vec4[2]' [-Werror=array-bounds]
 1383 |  rgb->d[1] = rgb24[1];
      |  ~~~~~~~~~~^~~~~~~~~~
igt_fb.c:1549:20: note: while referencing 'rgb'
 1549 |    struct igt_vec4 rgb[2];
      |                    ^~~
igt_fb.c:1384:12: error: array subscript 2 is outside array bounds of 'struct igt_vec4[2]' [-Werror=array-bounds]
 1384 |  rgb->d[2] = rgb24[0];
      |  ~~~~~~~~~~^~~~~~~~~~
igt_fb.c:1549:20: note: while referencing 'rgb'
 1549 |    struct igt_vec4 rgb[2];
      |                    ^~~
igt_fb.c:1385:12: error: array subscript 2 is outside array bounds of 'struct igt_vec4[2]' [-Werror=array-bounds]
 1385 |  rgb->d[3] = 1.0f;
      |  ~~~~~~~~~~^~~~~~
igt_fb.c:1549:20: note: while referencing 'rgb'
 1549 |    struct igt_vec4 rgb[2];
      |                    ^~~

I'll report upstream bug.
Comment 1 Swamp Workflow Management 2019-01-11 13:40:07 UTC
This is an autogenerated message for OBS integration:
This bug (1121229) was mentioned in
https://build.opensuse.org/request/show/664625 Factory / intel-gpu-tools
Comment 2 Stefan Dirsch 2019-01-11 13:49:45 UTC
intel-gpu-tools.changes:
-------------------------------------------------------------------
Fri Jan 11 12:03:30 UTC 2019 - sndirsch@suse.com

- U_lib-fb-Fix-rgb24-to-nv12-conversion.patch
  * official upstream patch
  * supersedes gcc9-fix.patch
- u_lib-fb-Fix-rgb24-to-nv12-conversion-once-more.patch
  * supposed to fix patch right above (fdo#109257)

--> Closing fixed.