Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 435640

Summary: xf86-input-mouse-1.8.1 build fails when using gcc 4.6
Product: Gentoo/Alt Reporter: Yuta SATOH <nigoro.dev>
Component: FreeBSDAssignee: Gentoo/BSD Team <bsd+disabled>
Status: RESOLVED FIXED    
Severity: normal CC: Jose.Torres, x11
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: FreeBSD   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch for x11-drivers/xf86-input-mouse-1.8.1

Description Yuta SATOH 2012-09-20 13:33:27 UTC
The following message is displayed and fails to compile.

<snip>
Making all in src
gmake[2]: Entering directory `/var/tmp/portage/x11-drivers/xf86-input-mouse-1.8.1/work/xf86-input-mouse-1.8.1_build/src'
  CC     mouse.lo
/var/tmp/portage/x11-drivers/xf86-input-mouse-1.8.1/work/xf86-input-mouse-1.8.1/src/mouse.c:156:9: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
/var/tmp/portage/x11-drivers/xf86-input-mouse-1.8.1/work/xf86-input-mouse-1.8.1/src/mouse.c: In function 'MousePreInit':
/var/tmp/portage/x11-drivers/xf86-input-mouse-1.8.1/work/xf86-input-mouse-1.8.1/src/mouse.c:923:22: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
  CC     pnp.lo
  CC     bsd_mouse.lo
/var/tmp/portage/x11-drivers/xf86-input-mouse-1.8.1/work/xf86-input-mouse-1.8.1/src/bsd_mouse.c: In function 'CheckProtocol':
/var/tmp/portage/x11-drivers/xf86-input-mouse-1.8.1/work/xf86-input-mouse-1.8.1/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.8.1/work/xf86-input-mouse-1.8.1_build/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/var/tmp/portage/x11-drivers/xf86-input-mouse-1.8.1/work/xf86-input-mouse-1.8.1_build'
gmake: *** [all] Error 2
 * ERROR: x11-drivers/xf86-input-mouse-1.8.1 failed (compile phase):
 *   emake failed


Reproducible: Always

Steps to Reproduce:
1. set gcc 4.6 by gcc-config 
2. . /etc/profile
3. emerge x11-drivers/xf86-input-mouse
Comment 1 Yuta SATOH 2012-09-20 13:36:20 UTC
Created attachment 324378 [details, diff]
patch for x11-drivers/xf86-input-mouse-1.8.1

Original patch is here.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=665390
Comment 2 Naohiro Aota gentoo-dev 2012-10-04 21:31:56 UTC
Patch added to the tree. Thanks.
Comment 3 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-10-05 21:16:15 UTC
Will this patch have to be carried indefinitely or is that problem fixed in later gcc?

If not, and if it is suitable for upstreaming, please send this to upstream for review.
Comment 4 Naohiro Aota gentoo-dev 2012-10-06 10:32:42 UTC
(In reply to comment #3)
> Will this patch have to be carried indefinitely or is that problem fixed in
> later gcc?

I've test with gcc-4.7.1 and it had no problem.