Bug 121657 - Error while emerging app-editors/le-1.9.2
Bug#: 121657 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: plasmaroo@gentoo.org Reported By: finn@sendmail.cz
Component: Unspecified
URL: 
Summary: Error while emerging app-editors/le-1.9.2
Keywords:  
Status Whiteboard: 
Opened: 2006-02-05 05:50 0000
Description:   Opened: 2006-02-05 05:50 0000
if i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include
 -DPKGDATADIR=\"/usr/share/le\"   -march=athlon-xp -O3 -pipe
-fomit-frame-pointer -falign-functions=4 -fno-implement-inlines -Winline -Wall
-MT getstr.o -MD -MP -MF ".deps/getstr.Tpo" \
  -c -o getstr.o `test -f 'getstr.cc' || echo './'`getstr.cc; \
then mv ".deps/getstr.Tpo" ".deps/getstr.Po"; \
else rm -f ".deps/getstr.Tpo"; exit 1; \
fi
In file included from /usr/include/linux/keyboard.h:14,
                 from getch.cc:42:
/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[2]: *** [getch.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/le-1.9.2/work/le-1.9.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/le-1.9.2/work/le-1.9.2'
make: *** [all] Error 2

!!! ERROR: app-editors/le-1.9.2 failed.
!!! Function src_compile, Line 566, Exitcode 2
!!! emake failed
!!! If you need support, post the topmost build error, NOT this status message.

------------

finn ~ # emerge --info
Portage 2.0.54 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r2,
2.6.15-gentoo-r1 i686)
=================================================================
System uname: 2.6.15-gentoo-r1 i686 AMD Sempron(tm)   2200+
Gentoo Base System version 1.6.14
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[disabled]
dev-lang/python:     2.2.3-r5, 2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
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
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -falign-functions=4"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -falign-functions=4"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig candy distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="cs_CZ.UTF-8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X Xaw3d aalib acl acpi alsa apm arts audiofile avi bash-completion
berkdb bindist bitmap-fonts bzip2 cdr crypt cscope cups curl dvd eds emboss
encode esd ethereal exif expat fam fbcon ffmpeg flac foomaticdb fortran gb gd
gdbm ggi gif glut gnome gpm gstreamer gtk gtk2 gtkhtml guile idn imagemagick
imap imlib ipv6 java jpeg kde lcms ldap libcaca libg++ libgda libwww mad mhash
mikmod mmx mmxext mng motif mozilla mp3 mpeg mysql ncurses nls ogg oggvorbis
opengl oss pam pcre pdflib perl plotutils png python qt quicktime readline
samba scanner sdl slang snmp spell sse sse2 ssl tcltk tcpd tetex tiff truetype
truetype-fonts type1-fonts udev unicode usb vorbis wmf wxwindows x86 xine
xinerama xml xml2 xmms xosd xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, LINGUAS

finn ~ # eix linux-headers
* sys-kernel/linux-headers 
     Available versions:  *2.0.40 *2.2.26 2.4.21 2.4.21-r1 ~2.4.22 2.4.22-r1
*2.4.23 *2.4.23_p3 *2.4.25 *2.4.26 ~2.4.26-r1 2.6.8.1-r4 2.6.11-r2 ~2.6.11-r3
*2.6.11-r4 [M]2.6.15_rc6
     Installed:           2.6.11-r2
     Homepage:            http://www.kernel.org/ http://www.gentoo.org/
     Description:         Linux system headers

------- Comment #1 From Jakub Moc (RETIRED) 2006-02-05 06:02:44 0000 -------
Needs a maintainer and a version bump to actually compile...

------- Comment #2 From Harald van Dijk 2006-02-05 14:13:34 0000 -------
jakub, thanks for re-assigning :)

The problem is actually with linux-headers; <linux/wait.h> is not
C++-compatible. It relies on implicit conversions from void * to unsigned long
*. Simple test program:
#include <linux/wait.h>
int main() {}

:)

The obvious patch, modifying wait.h to make these conversions explicit, works
fine, but modifying the argument types may be a better way to go, I don't know.

------- Comment #3 From Harald van Dijk 2006-02-05 17:05:22 0000 -------
By the way, apparently g++ has a switch to make this a warning instead of an
error (-fpermissive), so I made le use this and it should compile now, but it
would still be great if this is not necessary.

------- Comment #4 From Tim Yamin (RETIRED) 2006-02-14 10:56:12 0000 -------
Created an attachment (id=79788) [details]
Patch

> The obvious patch, modifying wait.h to make these conversions explicit, works
> fine, but modifying the argument types may be a better way to go, I don't know.

Unfortunately that won't work since different archs have different function
prototypes for test_bit and test_and_set_bit. This is fixed in the 2.6.15
headers; attaching a patch for the 2.6.11 headers.

------- Comment #5 From Tim Yamin (RETIRED) 2006-04-19 15:35:04 0000 -------
Patch added to 2.6.11-r5 headers, reopen bug if you still get problems.