An identical problem persists from xf86-input-mouse-1.8.1 to xf86-input-mouse-1.9.0. Patch is missing from the xf86-input-mouse.1.9.0.ebuild and the files directory that would resolve this error for xf86-input-mouse-1.9.0. Attachments to resolve this error are added to this bug report. <snip> >>> Compiling source in /var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0 ... >>> Working in BUILD_DIR: "/var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0_build" gmake gmake all-recursive gmake[1]: Entering directory `/var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0_build' Making all in include gmake[2]: Entering directory `/var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0_build/include' gmake[2]: Nothing to be done for `all'. gmake[2]: Leaving directory `/var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0_build/include' Making all in src gmake[2]: Entering directory `/var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0_build/src' /bin/sh ../libtool --tag=CC --mode=compile x86_64-gentoo-freebsd9.1-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I/var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0/src -I.. -I/var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0/include -fvisibility=hidden -I/usr/include/xorg -I/usr/include/pixman-1 -I/usr/include/X11/dri -I/usr/include/libdrm -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 -Wcast-qual -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -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 -O2 -pipe -mtune=generic -c -o mouse.lo /var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0/src/mouse.c libtool: compile: x86_64-gentoo-freebsd9.1-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I/var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0/src -I.. -I/var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0/include -fvisibility=hidden -I/usr/include/xorg -I/usr/include/pixman-1 -I/usr/include/X11/dri -I/usr/include/libdrm -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 -Wcast-qual -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -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 -O2 -pipe -mtune=generic -c /var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0/src/mouse.c -fPIC -DPIC -o .libs/mouse.o /bin/sh ../libtool --tag=CC --mode=compile x86_64-gentoo-freebsd9.1-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I/var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0/src -I.. -I/var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0/include -fvisibility=hidden -I/usr/include/xorg -I/usr/include/pixman-1 -I/usr/include/X11/dri -I/usr/include/libdrm -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 -Wcast-qual -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -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 -O2 -pipe -mtune=generic -c -o pnp.lo /var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0/src/pnp.c libtool: compile: x86_64-gentoo-freebsd9.1-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I/var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0/src -I.. -I/var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0/include -fvisibility=hidden -I/usr/include/xorg -I/usr/include/pixman-1 -I/usr/include/X11/dri -I/usr/include/libdrm -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 -Wcast-qual -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -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 -O2 -pipe -mtune=generic -c /var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0/src/pnp.c -fPIC -DPIC -o .libs/pnp.o /bin/sh ../libtool --tag=CC --mode=compile x86_64-gentoo-freebsd9.1-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I/var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0/src -I.. -I/var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0/include -fvisibility=hidden -I/usr/include/xorg -I/usr/include/pixman-1 -I/usr/include/X11/dri -I/usr/include/libdrm -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 -Wcast-qual -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -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 -O2 -pipe -mtune=generic -c -o bsd_mouse.lo /var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0/src/bsd_mouse.c libtool: compile: x86_64-gentoo-freebsd9.1-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I/var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0/src -I.. -I/var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0/include -fvisibility=hidden -I/usr/include/xorg -I/usr/include/pixman-1 -I/usr/include/X11/dri -I/usr/include/libdrm -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 -Wcast-qual -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -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 -O2 -pipe -mtune=generic -c /var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0/src/bsd_mouse.c -fPIC -DPIC -o .libs/bsd_mouse.o /var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0/src/bsd_mouse.c: In function 'CheckProtocol': /var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0/src/bsd_mouse.c:142:30: error: array subscript is above array bounds [-Werror=array-bounds] cc1: some warnings being treated as errors gmake[2]: *** [bsd_mouse.lo] Error 1 gmake[2]: Leaving directory `/var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0_build/src' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/var/tmp/portage/x11-drivers/xf86-input-mouse-1.9.0/work/xf86-input-mouse-1.9.0_build' gmake: *** [all] Error 2 Reproducible: Always Steps to Reproduce: 1. emerge x11-drivers/xf86-input-mouse-1.9.0
Created attachment 357728 [details] ebuild Manifest
Created attachment 357730 [details] xf86-input-mouse-1.9.0.ebuild
Created attachment 357732 [details, diff] xf86-input-mouse-1.9.0-gcc46-workaround.patch
Similar to bug # 435640 https://bugs.gentoo.org/show_bug.cgi?id=435640
The problem no longer exists with gcc-4.8, so is this patch still necessary?