Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 136100 - linuxwacom fails to compile after upgrading to gcc 4.1.1
Summary: linuxwacom fails to compile after upgrading to gcc 4.1.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: X11 External Driver Maintainers
URL:
Whiteboard:
Keywords:
: 136347 138508 140900 (view as bug list)
Depends on:
Blocks: 137851
  Show dependency tree
 
Reported: 2006-06-08 11:40 UTC by James Georkas
Modified: 2006-08-25 20:00 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Workaround hacky solution (wacom.patch,461 bytes, patch)
2006-06-09 00:57 UTC, Pinky
Details | Diff
Polution removal patch to /usr/include/unistd.h (usr-include-unistd.h.patch,539 bytes, patch)
2006-06-22 06:17 UTC, Honza Macháček
Details | Diff
New pollution removal patch to /usr/include/unistd.h (usr-include-unistd.h.patch,1.13 KB, patch)
2006-06-22 06:48 UTC, Honza Macháček
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Georkas 2006-06-08 11:40:10 UTC
After upgrading from gcc 3.4 to 4.1.1 at the emerge -e world the linuxwacom fails to compile:
x86_64-pc-linux-gnu-gcc -march=k8 -O3 -mmmx -m3dnow -msse -msse2 -ffast-math -fomit-frame-pointer -frename-registers -fweb -I/usr/include/xorg -I/usr/include/X11 -D__amd64__  -fPIC -pipe -ansi \
                -pedantic -Wall -Wpointer-arith -fno-merge-constants \
                -I.   -Dlinux \
                -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE \
                -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE \
                -DSHAPE -DXINPUT -DXKB -DLBX -DXAPPGROUP -DXCSECURITY \
                -DTOGCUP -DXF86BIGFONT -DDPMSExtension -DPIXPRIV -DPANORAMIX \
                -DRENDER -DGCCUSESGAS -DAVOID_GLYPHBLT -DPIXPRIV \
                -DSINGLEDEPTH -DXFreeXDGA -DXvExtension -DXFree86LOADER \
                -DXFree86Server -DXF86VIDMODE -DXvMCExtension \
                -DSMART_SCHEDULE -DBUILDDEBUG -DXResExtension \
                -DX_BYTE_ORDER=X_LITTLE_ENDIAN -D_XSERVER64 \
                -DNDEBUG -DFUNCPROTO=15 \
                -DNARROWPROTO -DIN_MODULE -DXFree86Module -DLINUX_INPUT \
                -o xf86Wacom.o -c xf86Wacom.c
In file included from /usr/include/unistd.h:8,
                 from /usr/include/xorg/xisb.h:32,
                 from xf86Wacom.h:77,
                 from xf86Wacom.c:100:
/usr/include/gentoo-multilib/amd64/unistd.h:418: error: conflicting types for 'xf86usleep'
/usr/include/xorg/xf86_ansic.h:345: error: previous declaration of 'xf86usleep' was here
In file included from /usr/include/unistd.h:8,
                 from /usr/include/xorg/xisb.h:32,
                 from xf86Wacom.h:77,
                 from xf86Wacom.c:100:
/usr/include/gentoo-multilib/amd64/unistd.h:935:29: error: macro "getpagesize" passed 1 arguments, but takes just 0
make[3]: *** [xf86Wacom.o] Error 1
make[3]: Leaving directory `/var/tmp/portage/linuxwacom-0.7.2/work/linuxwacom-0.7.2/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/linuxwacom-0.7.2/work/linuxwacom-0.7.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/linuxwacom-0.7.2/work/linuxwacom-0.7.2'
make: *** [all] Error 2

!!! ERROR: x11-misc/linuxwacom-0.7.2 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  linuxwacom-0.7.2.ebuild, line 109:   Called die

!!! build failed.
!!! If you need support, post the topmost build error, and the call stack if relevant.


this is my emerge --info



Portage 2.1_rc4-r1 (default-linux/amd64/2005.1, gcc-4.1.1, glibc-2.4-r3, 2.6.16-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.16-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.12.0
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r1
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.16
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O3 -mmmx -m3dnow -msse -msse2 -ffast-math -fomit-frame-pointer -frename-registers -fweb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/fax /usr/lib64/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.ntua.gr/pub/linux/gentoo/ http://ftp.ntua.gr/pub/linux/gentoo/ ftp://ftp.uoi.gr/mirror/OS/gentoo/ http://ftp.uoi.gr/mirror/OS/gentoo/ http://ftp.physics.auth.gr/pub/mirrors/gentoo/ ftp://ftp.physics.auth.gr/pub/mirrors/gentoo/ "
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="amd64 64bit X a52 aac aalib adsl alsa amd applet arts avi berkdb bidi bitmap-fonts cairo cdparanoia cdr cli cpudetection crypt cups dbus directfb divx4linux dri dvd dvdread eds emboss encode esd faac faad fbcon ffmpeg foomaticdb fortran gif gnome gpm gstreamer gtk gtk2 hal imlib ipv6 isdnlog java jpeg kde libdvdread libfame liblzo lzw lzw-tiff mad moznoxft mp3 mpeg2 mplayer mysql ncurses nls nptl nptlonly nvidia oggvorbis opengl oss pam pcre pdflib perl png pppd python qt quicktime readline reflection sdl session spell spl ssl svg tcpd theora tiff transcode truetype truetype-fonts type1-fonts usb vorbis wxgtk1 wxwindows xml2 xorg xpm xprint xv xvid xvmc zlib elibc_glibc kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY



Any Ideas??
Comment 1 Malcolm Lashley (RETIRED) gentoo-dev 2006-06-08 12:13:56 UTC
James - compiles fine here with gcc-4.1.

Can you confirm which version of xorg-server you are using - I wonder if this is really an xorg-1.1 related bug. (I have xorg-1.0.2 still)

Cheers,
malc.
Comment 2 Pinky 2006-06-09 00:57:23 UTC
Created attachment 88747 [details, diff]
Workaround hacky solution

This solve problem for my, but I does not studi where in macro/preprocesors bug foud, so this is not solution withought more studi this bug!
Comment 3 James Georkas 2006-06-10 00:39:36 UTC
(In reply to comment #1)
> James - compiles fine here with gcc-4.1.
> 
> Can you confirm which version of xorg-server you are using - I wonder if this
> is really an xorg-1.1 related bug. (I have xorg-1.0.2 still)
> 
> Cheers,
> malc.
> 
Hello Malc,

this is the output I got on xorg -version

X Window System Version 7.1.0
Release Date: 22 May 2006
X Protocol Version 11, Revision 0, Release 7.1
Build Operating System: Linux 2.6.16-gentoo-r7 x86_64
Current Operating System: Linux blackpoint 2.6.16-gentoo-r7 #1 Thu May 18 22:33:59 Local time zone must be set--see zic manu x86_64
Build Date: 08 June 2006
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Module Loader present



emerge --search xorg-server 

gave me an output of xorg-1.1.0

do you think that it's not an gcc 4.1.1 issue???
Thainks again
Comment 4 Pinky 2006-06-10 22:05:02 UTC
bug 136347 look like a duplicate to this
Comment 5 Simon Stelling (RETIRED) gentoo-dev 2006-06-11 01:55:10 UTC
*** Bug 136347 has been marked as a duplicate of this bug. ***
Comment 6 Simon Stelling (RETIRED) gentoo-dev 2006-06-11 01:56:34 UTC
thanks for the hint about the duplicate. looks like this isn't amd64 but gcc-4.1 specific
Comment 7 Leonid Podolny 2006-06-11 08:23:14 UTC
Same problem here. Do you need any extra data?
Comment 8 Antonio Pezo 2006-06-11 10:06:09 UTC
It seems that i got same compile error with gcc-3.4.4 not gcc.4.1.1 ?!
Or am i missing something here?

# gcc -v
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/specs
Configured with: /var/tmp/portage/gcc-3.4.4-r1/work/gcc-3.4.4/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.4.4 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.4 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.4/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.4/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/g++-v3 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libgcj --enable-languages=c,c++,f77 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)
Comment 9 Malcolm Lashley (RETIRED) gentoo-dev 2006-06-11 11:43:32 UTC
Antonio - since you have the problem with gcc-3.4 - that would help support my earlier assumption that this is breakage caused by xorg-server-1.1 headerfile changes. Can you please post your xorg-server version to see if I am correct?

Cheers,
malc.
Comment 10 Antonio Pezo 2006-06-11 11:51:55 UTC
# Xorg -version

X Window System Version 7.1.0
Release Date: 22 May 2006
X Protocol Version 11, Revision 0, Release 7.1
Build Operating System: Linux 2.6.16-gentoo-r9 i686
Current Operating System: Linux power 2.6.16-gentoo-r9 #1 SMP Sat Jun 10 20:44:15 CEST 2006 i686
Comment 11 Leonid Podolny 2006-06-11 13:47:24 UTC
(In reply to comment #9)
> Antonio - since you have the problem with gcc-3.4 - that would help support my
> earlier assumption that this is breakage caused by xorg-server-1.1 headerfile
> changes. Can you please post your xorg-server version to see if I am correct?
> 
> Cheers,
> malc.
> 

X Window System Version 7.1.0
Release Date: 22 May 2006
X Protocol Version 11, Revision 0, Release 7.1
Build Operating System: Linux 2.6.16-gentoo-r7 i686
Current Operating System: Linux vyhuhol 2.6.16-gentoo-r7 #1 SMP Tue May 9 23:48:27 IDT 2006 i686
Build Date: 04 June 2006
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Module Loader present
Comment 12 Andreas Boeyer 2006-06-19 12:18:12 UTC
(In reply to comment #2)
> Created an attachment (id=88747) [edit]
> Workaround hacky solution
> 
> This solve problem for my, but I does not studi where in macro/preprocesors bug
> foud, so this is not solution withought more studi this bug!
> 

There is a workaround hack, but if I change the file and add it back to the .tar.bz2 file than the gentoo emerge complain the md5 check sum. How do I change the header file?
Comment 13 Honza Macháček 2006-06-22 06:17:03 UTC
Created attachment 89801 [details, diff]
Polution removal patch to /usr/include/unistd.h

Quick and dirty hack.

The cause looks like environmental polution from xorg headers. Preprocessor macros are evil.
Comment 14 Honza Macháček 2006-06-22 06:40:02 UTC
Comment on attachment 89801 [details, diff]
Polution removal patch to /usr/include/unistd.h

--- unistd.h    2006-06-22 13:04:10.000000000 +0000
+++ unistd.h    2006-06-22 13:25:15.000000000 +0000
@@ -186,6 +186,7 @@
 #include <bits/types.h>
 
 #ifndef        __ssize_t_defined
+#undef ssize_t
 typedef __ssize_t ssize_t;
 # define __ssize_t_defined
 #endif
@@ -322,12 +323,14 @@
 
    This function is a cancellation point and therefore not marked with
    __THROW.  */
+#undef read
 extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur;
 
 /* Write N bytes of BUF to FD.  Return the number written, or -1.
 
    This function is a cancellation point and therefore not marked with
    __THROW.  */
+#undef write
 extern ssize_t write (int __fd, __const void *__buf, size_t __n) __wur;
 
 #ifdef __USE_UNIX98
@@ -415,6 +418,7 @@
 
    This function is a cancellation point and therefore not marked with
    __THROW.  */
+#undef usleep
 extern int usleep (__useconds_t __useconds);
 #endif
 
@@ -932,6 +936,7 @@
 
 /* Return the number of bytes in a page.  This is the system's page size,
    which is not necessarily the same as the hardware page size.  */
+#undef getpagesize
 extern int getpagesize (void)  __THROW __attribute__ ((__const__));
Comment 15 Honza Macháček 2006-06-22 06:45:12 UTC
(In reply to comment #14)
> (From update of attachment 89801 [details, diff] [edit])

 I'm sorry I've failed to update my patch corretly.

 What I attached was the patch that had worked, until I upgraded xorg once more. Next time, there is more polution, more #undefs needed.

 I'll try to add my updated patch once again, hopefully more correctly.
Comment 16 Honza Macháček 2006-06-22 06:48:40 UTC
Created attachment 89808 [details, diff]
New pollution removal patch to /usr/include/unistd.h

Less quick and dirtier hack.

New xorg, more pollution.
Comment 17 Daniel Santos 2006-06-26 03:50:33 UTC
This occurs in amd64 gcc3.4.4 as well (gcc3.4.4-rc1). I guess I need to update gcc to use the patch :)
Comment 18 Mike Auty (RETIRED) gentoo-dev 2006-06-29 04:03:16 UTC
You guys might be interested in the xorg7.1 patch in bug 137851, it seems far less hacky than fixing /usr/include/unistd.h (which is a system file) for this one problem.

Unfortunately I haven't been able to try it out since I have both a wacom graphics tablet, and also an nvidia graphics card (so no xorg-7.1 for me)...  5:(
Comment 19 Jakub Moc (RETIRED) gentoo-dev 2006-06-29 10:51:25 UTC
*** Bug 138508 has been marked as a duplicate of this bug. ***
Comment 20 Guy 2006-07-02 19:52:20 UTC
(In reply to comment #18)
> You guys might be interested in the xorg7.1 patch in bug 137851, it seems far
> less hacky than fixing /usr/include/unistd.h (which is a system file) for this
> one problem.
> 
> Unfortunately I haven't been able to try it out since I have both a wacom
> graphics tablet, and also an nvidia graphics card (so no xorg-7.1 for me)... 
> 5:(
> 

For the time being, I'm not using either of the binary drivers for nvidia or ati. I've upgraded all my systems to xorg-7.1. The patch in bug 137851 works for both x86 and amd64.

These are the steps I followed:

Downloaded the linuxwacom-0.7.4-r3.ebuild file to /usr/local/portage/x11-misc/linuxwacom/
Downloaded the xorg-7.1.patch to /usr/local/portage/x11-misc/linuxwacom/files/
# ebuild /usr/local/portage/x11-misc/linuxwacom/linuxwacom-0.7.4-r3.ebuild digest

# emerge linuxwacom

The above assumes that you're already set up to use local portage overlays.

----

The summary should be changed to reflect that this a xorg-7.1/linuxwacom issue.
Comment 21 Jakub Moc (RETIRED) gentoo-dev 2006-07-18 04:53:24 UTC
*** Bug 140900 has been marked as a duplicate of this bug. ***
Comment 22 Martin von Gagern 2006-07-20 16:20:07 UTC
Should this bug here block a gcc-4 Tracker, bug 117482 or bug 140707?
Comment 23 Hanno Böck gentoo-dev 2006-08-25 20:00:04 UTC
fixed with linuxwacom update