home ~ # emerge rhide Calculating dependencies ...done! >>> emerge (1 of 1) dev-util/rhide-1.5.20050823 to / ... i686-pc-linux-gnu-g++ -I../include -I//usr/include -O2 -march=pentium4 -mtune=pentium4 -fomit-frame-pointer -pipe -c ../classes/iopstrea.cc -o obj/iopstrea.o i686-pc-linux-gnu-g++ -I../include -I//usr/include -O2 -march=pentium4 -mtune=pentium4 -fomit-frame-pointer -pipe -c ../classes/ipstream.cc -o obj/ipstream.o i686-pc-linux-gnu-g++ -I../include -I//usr/include -O2 -march=pentium4 -mtune=pentium4 -fomit-frame-pointer -pipe -c ../classes/linux/linuxdis.cc -o obj/linuxdis.o i686-pc-linux-gnu-g++ -I../include -I//usr/include -O2 -march=pentium4 -mtune=pentium4 -fomit-frame-pointer -pipe -c ../classes/linux/linuxkey.cc -o obj/linuxkey.o i686-pc-linux-gnu-g++ -I../include -I//usr/include -O2 -march=pentium4 -mtune=pentium4 -fomit-frame-pointer -pipe -c ../classes/linux/linuxmouse.cc -o obj/linuxmouse.o i686-pc-linux-gnu-g++ -I../include -I//usr/include -O2 -march=pentium4 -mtune=pentium4 -fomit-frame-pointer -pipe -c ../classes/linux/linuxscr.cc -o obj/linuxscr.o In file included from /usr/include/linux/keyboard.h:20, from ../classes/linux/linuxmouse.cc:35: /usr/include/linux/wait.h: In function `int wait_on_bit(void*, int, int (*)(void*), unsigned int)': /usr/include/linux/wait.h:376: error: invalid conversion from `void*' to `const volatile long unsigned int*' /usr/include/linux/wait.h:376: error: initializing argument 2 of `int constant_test_bit(int, const volatile long unsigned int*)' /usr/include/linux/wait.h:376: error: invalid conversion from `void*' to `const volatile long unsigned int*' /usr/include/linux/wait.h:376: error: initializing argument 2 of `int variable_test_bit(int, const volatile long unsigned int*)' /usr/include/linux/wait.h: In function `int wait_on_bit_lock(void*, int, int (*)(void*), unsigned int)': /usr/include/linux/wait.h:400: error: invalid conversion from `void*' to `volatile long unsigned int*' /usr/include/linux/wait.h:400: error: initializing argument 2 of `int test_and_set_bit(int, volatile long unsigned int*)' make[1]: *** [obj/linuxmouse.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/var/tmp/portage/rhide-1.5.20050823/work/tvision/makes' make: *** [static-lib] Error 2 !!! ERROR: dev-util/rhide-1.5.20050823 failed. !!! Function src_compile, Line 126, Exitcode 2 !!! (no error message) !!! If you need support, post the topmost build error, NOT this status message. Reproducible: Always Steps to Reproduce: Portage 2.0.53 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r3, 2.6.14-gentoo-r3 i686) ================================================================= System uname: 2.6.14-gentoo-r3 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz Gentoo Base System version 1.6.13 dev-lang/python: 2.4.2 sys-apps/sandbox: 1.2.16 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-r1 sys-devel/binutils: 2.16.1-r1 sys-devel/libtool: 1.5.20-r1 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium4 -mtune=pentium4 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/splash /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-O2 -march=pentium4 -mtune=pentium4 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.ITDNet.net/gentoo" LANG="en_US.utf8" LC_ALL="en_US.utf8" LINGUAS="en" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage/obelix /usr/local/portage/axxo/axxo-overlay /usr/local/portage/axxo/obelix" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X aac acl alsa apache2 audiofile avi bash-completion berkdb bitmap-fonts bonobo bzip2 cdr crypt cups curl dbus directfb doc dts dvd dvdr dvdread eds emboss encode ethereal exif expat fam ffmpeg firefox flac foomaticdb gd gdbm gif glut gmp gnome gpm gstreamer gtk gtk2 gtkhtml guile hal idn imagemagick ithreads java javascript jpeg junit kde kdeenablefinal lcms ldap libg++ libwww mad mhash mikmod mmap mmx mng motif mp3 mpeg mysql ncurses nls nptl nsplugin nvidia ogg oggvorbis opengl pam pcre pdflib perl php pic plotutils png postgres pthreads python qt quicktime readline recode sdl session sharedmem slang snmp spell sse sse2 ssl svga symlink tcltk tcpd tetex threads tidy tiff truetype truetype-fonts type1-fonts udev unicode usb vcd vorbis win32codecs wmf xine xml2 xv xvid xvmc zlib linguas_en userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LDFLAGS
Getting the same issue on x86 (amd64 works fine), but not sure what exactly the issue is.
The problem seems to be that when static inline int wait_on_bit(void *word, int bit, int (*action)(void *), unsigned mode) { if (!test_bit(bit, (const volatile unsigned long *)word)) return 0; return out_of_line_wait_on_bit(word, bit, action, mode); } from wait.h is called it calls test_bit which calls something else and the call-chain ultimately ends up in: static inline int constant_test_bit(int nr, const volatile unsigned long *addr) { return ((1UL << (nr & 31)) & (addr[nr >> 5])) != 0; } from /usr/include/asm/bitops.h. The last expects const volatile unsigned long *addr but is passed void *word and gcc does not implicitly cast the value. After applying the following patch to wait.h rhide compiles fine. The patch: --- wait.h.orig 2005-12-07 16:51:07.000000000 +0200 +++ wait.h 2005-12-07 16:55:41.000000000 +0200 @@ -373,7 +373,7 @@ static inline int wait_on_bit(void *word, int bit, int (*action)(void *), unsigned mode) { - if (!test_bit(bit, word)) + if (!test_bit(bit, (const volatile unsigned long *)word)) return 0; return out_of_line_wait_on_bit(word, bit, action, mode); } @@ -397,7 +397,7 @@ static inline int wait_on_bit_lock(void *word, int bit, int (*action)(void *), unsigned mode) { - if (!test_and_set_bit(bit, word)) + if (!test_and_set_bit(bit, (volatile unsigned long *)word)) return 0; return out_of_line_wait_on_bit_lock(word, bit, action, mode); }
home ~ # equery b /usr/include/linux/wait.h [ Searching for file(s) /usr/include/linux/wait.h in *... ] sys-kernel/linux-headers-2.6.11-r3 (/usr/include/linux/wait.h) home ~ # cat /usr/portage/sys-kernel/linux-headers/metadata.xml | grep email <email>plasmaroo@gentoo.org</email> <email>kumba@gentoo.org</email> <email>x86-kernel@gentoo.org</email> home ~ # Perhaps the linux-headers maintainer(s) should be CC-ed ? It looks like their bug...
this fixes the problem #vi /usr/include/linux/wait.h :%s/bit, word/bit, (volatile long unsigned int *)word/ :wq
I'm not sure if this is related directly to this bug or not but I'm also having problems compiling the tvision-2.0.3 package with gcc 3.4. I followed the advice for editing /usr/include/linux/wait.h and this has fixed the problem. When will the linux headers be updated and available under portage? g++ -I../include -fPIC -O2 -march=i686 -pipe -c ../classes/linux/linuxkey.cc -o obj/linuxkey.lo In file included from /usr/include/linux/keyboard.h:14, from ../classes/linux/linuxmouse.cc:34: /usr/include/linux/wait.h: In function `int wait_on_bit(void*, int, int (*)(void*), unsigned int)': /usr/include/linux/wait.h:376: error: invalid conversion from `void*' to `const volatile long unsigned int*' /usr/include/linux/wait.h:376: error: initializing argument 2 of `int constant_test_bit(int, const volatile long unsigned int*)' /usr/include/linux/wait.h:376: error: invalid conversion from `void*' to `const volatile long unsigned int*' /usr/include/linux/wait.h:376: error: initializing argument 2 of `int variable_test_bit(int, const volatile long unsigned int*)' /usr/include/linux/wait.h: In function `int wait_on_bit_lock(void*, int, int (*)(void*), unsigned int)': /usr/include/linux/wait.h:400: error: invalid conversion from `void*' to `volatile long unsigned int*' /usr/include/linux/wait.h:400: error: initializing argument 2 of `int test_and_set_bit(int, volatile long unsigned int*)' make[1]: *** [obj/linuxmouse.o] Error 1 make[1]: Leaving directory `/var/tmp/portage/tvision-2.0.3/work/tvision/makes' make: *** [static-lib] Error 2 make: *** Waiting for unfinished jobs.... g++ -I../include -fPIC -O2 -march=i686 -pipe -c ../classes/linux/linuxmouse.cc -o obj/linuxmouse.lo g++ -I../include -fPIC -O2 -march=i686 -pipe -c ../classes/linux/linuxscr.cc -o obj/linuxscr.lo In file included from /usr/include/linux/keyboard.h:14, from ../classes/linux/linuxmouse.cc:34: /usr/include/linux/wait.h: In function `int wait_on_bit(void*, int, int (*)(void*), unsigned int)': /usr/include/linux/wait.h:376: error: invalid conversion from `void*' to `const volatile long unsigned int*' /usr/include/linux/wait.h:376: error: initializing argument 2 of `int constant_test_bit(int, const volatile long unsigned int*)' /usr/include/linux/wait.h:376: error: invalid conversion from `void*' to `const volatile long unsigned int*' /usr/include/linux/wait.h:376: error: initializing argument 2 of `int variable_test_bit(int, const volatile long unsigned int*)' /usr/include/linux/wait.h: In function `int wait_on_bit_lock(void*, int, int (*)(void*), unsigned int)': /usr/include/linux/wait.h:400: error: invalid conversion from `void*' to `volatile long unsigned int*' /usr/include/linux/wait.h:400: error: initializing argument 2 of `int test_and_set_bit(int, volatile long unsigned int*)' make[1]: *** [obj/linuxmouse.lo] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/var/tmp/portage/tvision-2.0.3/work/tvision/makes' make: *** [dynamic-lib] Error 2 !!! ERROR: dev-libs/tvision-2.0.3 failed. Call stack: ebuild.sh, line 1543: Called dyn_compile ebuild.sh, line 938: Called src_compile tvision-2.0.3.ebuild, line 29: Called die !!! (no error message) !!! If you need support, post the topmost build error, and the call stack if relevant. Portage 2.1.1_pre5-r3 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.17-gentoo-r4 i686) ================================================================= System uname: 2.6.17-gentoo-r4 i686 Intel(R) Xeon(TM) CPU 3.20GHz Gentoo Base System version 1.12.4 Last Sync: Sat, 26 Aug 2006 01:20:01 +0000 app-admin/eselect-compiler: [Not Present] dev-lang/python: 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 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-r3 sys-devel/gcc-config: 1.3.13-r3 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=i686 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O2 -march=i686 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://ftp.swin.edu.au/gentoo" LINGUAS="en+NZ.utf8" MAKEOPTS="-j2" 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.au.gentoo.org/gentoo-portage" USE="x86 alsa apache2 apm avi berkdb bitmap-fonts bzip2 cli crypt cups dlloader dri eds elibc_glibc emboss encode foomaticdb fortran gdbm gif gnome gpm gstreamer gtk2 imlib input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog ithreads jpeg kde kernel_linux libg++ libwww linguas_en+NZ.utf8 mad mikmod motif mp3 mpeg ncurses nls nptl nptlonly ogg opengl oss pam pcre pdflib perl png pppd python qt3 qt4 quicktime readline reflection sdl session spell spl ssl tcpd truetype truetype-fonts type1-fonts udev unicode userland_GNU video_cards_apm video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix video_cards_dummy video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i740 video_cards_i810 video_cards_imstt video_cards_mga video_cards_neomagic video_cards_nsc video_cards_nv video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx video_cards_tga video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa video_cards_vga video_cards_via video_cards_vmware video_cards_voodoo vorbis xml xmms xorg xv zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
This has been fixed a couple of months ago because of another bug report, but this one was never closed. :)
> I followed the advice for editing /usr/include/linux/wait.h and this has fixed > the problem. When will the linux headers be updated and available under > portage? linux-headers-2.6.11-r5 and higher should be fixed.
*** Bug 175590 has been marked as a duplicate of this bug. ***