When trying to emerge app-cdr/kcdlabel, the compilations fails, perhaps because of problems with kernel includes. Reproducible: Always Steps to Reproduce: 1. emerge app-cdr/kcdlabel 2. 3. Actual Results: root # emerge app-cdr/kcdlabel Calculating dependencies ...done! >>> emerge (1 of 1) app-cdr/kcdlabel-2.12 to / >>> md5 src_uri ;-) kcdlabel-2.12-KDE3.tar.gz >>> Unpacking source... >>> Unpacking kcdlabel-2.12-KDE3.tar.gz to /var/tmp/portage/kcdlabel-2.12/work >>> Source unpacked. configure: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used. checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for a BSD-compatible install... /bin/install -c checking for -p flag to install... yes checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets ${MAKE}... yes checking for i686-pc-linux-gnu-strip... no checking for strip... strip checking for style of include used by make... GNU checking for i686-pc-linux-gnu-gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking dependency style of gcc... none checking how to run the C preprocessor... gcc -E checking for i686-pc-linux-gnu-g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... none checking whether g++ supports -Wundef... yes checking whether g++ supports -Wbad-function-cast... yes checking whether g++ supports -Wno-long-long... yes checking whether g++ supports -Wnon-virtual-dtor... yes checking whether g++ supports -fno-exceptions... yes checking whether g++ supports -fno-check-new... yes checking whether g++ supports -fexceptions... yes checking how to run the C++ preprocessor... g++ -E checking whether g++ supports -frepo... yes checking for ld used by GCC... /usr/i686-pc-linux-gnu/bin/ld checking if the linker (/usr/i686-pc-linux-gnu/bin/ld) is GNU ld... yes checking for /usr/i686-pc-linux-gnu/bin/ld option to reload object files... -r checking for BSD-compatible nm... nm checking for a sed that does not truncate output... checking whether ln -s works... yes checking how to recognise dependant libraries... pass_all checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking the maximum length of command line arguments... 32768 checking command to parse nm output from gcc object... ok checking for objdir... .libs checking for i686-pc-linux-gnu-ranlib... no checking for ranlib... ranlib checking for i686-pc-linux-gnu-strip... strip checking if gcc static flag works... no checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking whether the gcc linker (/usr/i686-pc-linux-gnu/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating libtool appending configuration tag "CXX" to libtool checking whether the g++ linker (/usr/i686-pc-linux-gnu/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... no checking if g++ supports -c -o file.o... no checking whether the g++ linker (/usr/i686-pc-linux-gnu/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so appending configuration tag "GCJ" to libtool checking if gcj supports -fno-rtti -fno-exceptions... (cached) no checking for gcj option to produce PIC... -fPIC checking if gcj PIC flag -fPIC works... no checking if gcj supports -c -o file.o... no checking whether the gcj linker (/usr/i686-pc-linux-gnu/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking for msgfmt... /usr/bin/msgfmt checking for gmsgfmt... /usr/bin/msgfmt checking for xgettext... /usr/bin/xgettext checking for main in -lutil... yes checking for main in -lcompat... no checking for crypt in -lcrypt... yes checking for socklen_t... socklen_t checking for dnet_ntoa in -ldnet... no checking for dnet_ntoa in -ldnet_stub... no checking for inet_ntoa... yes checking for connect... yes checking for remove... yes checking for shmat... yes checking crt_externs.h usability... no checking crt_externs.h presence... no checking for crt_externs.h... no checking for _NSGetEnviron... no checking for sys/types.h... (cached) yes checking for stdint.h... (cached) yes checking for poll in -lpoll... no checking CoreAudio/CoreAudio.h usability... no checking CoreAudio/CoreAudio.h presence... no checking for CoreAudio/CoreAudio.h... no checking for res_init... no checking for killpg in -lucb... no checking for int... yes checking size of int... 4 checking for long... yes checking size of long... 4 checking for char *... yes checking size of char *... 4 checking for char... yes checking size of char... 1 checking for dlopen in -ldl... yes checking for shl_unload in -ldld... no checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include checking for IceConnectionNumber in -lICE... yes checking for libXext... yes checking for Xinerama... yes checking for pthread_create in -lpthread... yes checking for extra includes... no checking for extra libs... no checking for libz... -lz checking for libpng... -lpng -lz -lm checking for libjpeg6b... no checking for libjpeg... -ljpeg checking for Qt... libraries /usr/qt/3/lib, headers /usr/qt/3/include using -mt checking if Qt compiles without flags... no checking for moc... /usr/qt/3/bin/moc checking for uic... /usr/qt/3/bin/uic checking whether uic supports -L ... yes checking whether uic supports -nounload ... yes checking if Qt needs -ljpeg... no checking for rpath... yes checking for KDE... libraries /usr/kde/3.1/lib, headers /usr/kde/3.1/include checking for KDE paths... defaults checking for dcopidl... /usr/kde/3.1/bin/dcopidl checking for dcopidl2cpp... /usr/kde/3.1/bin/dcopidl2cpp checking for mcopidl... /usr/kde/3.1/bin/mcopidl checking for artsc-config... /usr/kde/3.1/bin/artsc-config checking for kde-config... /usr/kde/3.1/bin/kde-config checking for meinproc... /usr/kde/3.1/bin/meinproc checking if doc should be compiled... yes checking if kcdlabel should be compiled... yes checking if po should be compiled... yes configure: creating ./config.status config.status: creating ./Makefile config.status: creating doc/Makefile config.status: creating doc/en/Makefile config.status: creating kcdlabel/Makefile config.status: creating kcdlabel/icons/Makefile config.status: creating po/Makefile config.status: creating config.h config.status: executing depfiles commands make all-recursive make[1]: Entering directory `/var/tmp/portage/kcdlabel-2.12/work/kcdlabel-2.12-KDE3' Making all in kcdlabel make[2]: Entering directory `/var/tmp/portage/kcdlabel-2.12/work/kcdlabel-2.12-KDE3/kcdlabel' Making all in icons make[3]: Entering directory `/var/tmp/portage/kcdlabel-2.12/work/kcdlabel-2.12-KDE3/kcdlabel/icons' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/var/tmp/portage/kcdlabel-2.12/work/kcdlabel-2.12-KDE3/kcdlabel/icons' make[3]: Entering directory `/var/tmp/portage/kcdlabel-2.12/work/kcdlabel-2.12-KDE3/kcdlabel' g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3.1/include -I/usr/qt/3/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wbad-function-cast -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -fno-exceptions -fno-check-new -c -o cddbinexactmatchdlgdata.o `test -f 'cddbinexactmatchdlgdata.cpp' || echo './'`cddbinexactmatchdlgdata.cpp g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3.1/include -I/usr/qt/3/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wbad-function-cast -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -fno-exceptions -fno-check-new -c -o cddbinexactmatchdlg.o `test -f 'cddbinexactmatchdlg.cpp' || echo './'`cddbinexactmatchdlg.cpp cc1plus: warning: "-Wbad-function-cast" is valid for C/ObjC but not for C++ cc1plus: warning: "-Wbad-function-cast" is valid for C/ObjC but not for C++ g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3.1/include -I/usr/qt/3/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wbad-function-cast -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -fno-exceptions -fno-check-new -c -o cddbmatchcddlgdata.o `test -f 'cddbmatchcddlgdata.cpp' || echo './'`cddbmatchcddlgdata.cpp cc1plus: warning: "-Wbad-function-cast" is valid for C/ObjC but not for C++ g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3.1/include -I/usr/qt/3/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wbad-function-cast -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -fno-exceptions -fno-check-new -c -o cddbmatchcddlg.o `test -f 'cddbmatchcddlg.cpp' || echo './'`cddbmatchcddlg.cpp cc1plus: warning: "-Wbad-function-cast" is valid for C/ObjC but not for C++ g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3.1/include -I/usr/qt/3/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wbad-function-cast -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -fno-exceptions -fno-check-new -c -o cddbaccessdialogdata.o `test -f 'cddbaccessdialogdata.cpp' || echo './'`cddbaccessdialogdata.cpp cc1plus: warning: "-Wbad-function-cast" is valid for C/ObjC but not for C++ g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/kde/3.1/include -I/usr/qt/3/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wbad-function-cast -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -DNDEBUG -DNO_DEBUG -O2 -march=athlon-xp -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -fno-exceptions -fno-check-new -c -o cddbaccessdialog.o `test -f 'cddbaccessdialog.cpp' || echo './'`cddbaccessdialog.cpp cc1plus: warning: "-Wbad-function-cast" is valid for C/ObjC but not for C++ In file included from /usr/include/linux/byteorder/little_endian.h:11, from /usr/include/asm/byteorder.h:65, from /usr/include/linux/cdrom.h:14, from audiocd.h:33, from cddbaccessdialog.h:31, from cddbaccessdialogdata.cpp:10: /usr/include/linux/byteorder/swab.h: In function `const __u32 __fswab24(unsigned int)': /usr/include/linux/byteorder/swab.h:174: error: ISO C++ forbids braced-groups within expressions /usr/include/linux/byteorder/swab.h:174: error: ISO C++ forbids braced-groups within expressions /usr/include/linux/byteorder/swab.h: In function `__u32 __swab24p(__u32*)': /usr/include/linux/byteorder/swab.h:178: error: ISO C++ forbids braced-groups within expressions /usr/include/linux/byteorder/swab.h:178: error: ISO C++ forbids braced-groups within expressions /usr/include/linux/byteorder/swab.h: In function `void __swab24s(__u32*)': /usr/include/linux/byteorder/swab.h:182: error: ISO C++ forbids braced-groups within expressions /usr/include/linux/byteorder/swab.h:182: error: ISO C++ forbids braced-groups within expressions In file included from /usr/include/linux/byteorder/little_endian.h:11, from /usr/include/asm/byteorder.h:65, from /usr/include/linux/cdrom.h:14, from audiocd.h:33, from cddbaccessdialog.h:31, from cddbaccessdialog.cpp:17: /usr/include/linux/byteorder/swab.h: In function `const __u32 __fswab24(unsigned int)': /usr/include/linux/byteorder/swab.h:174: error: ISO C++ forbids braced-groups within expressions /usr/include/linux/byteorder/swab.h:174: error: ISO C++ forbids braced-groups within expressions /usr/include/linux/byteorder/swab.h: In function `__u32 __swab24p(__u32*)': /usr/include/linux/byteorder/swab.h:178: error: ISO C++ forbids braced-groups within expressions /usr/include/linux/byteorder/swab.h:178: error: ISO C++ forbids braced-groups within expressions /usr/include/linux/byteorder/swab.h: In function `void __swab24s(__u32*)': /usr/include/linux/byteorder/swab.h:182: error: ISO C++ forbids braced-groups within expressions /usr/include/linux/byteorder/swab.h:182: error: ISO C++ forbids braced-groups within expressions make[3]: *** [cddbaccessdialogdata.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[3]: *** [cddbaccessdialog.o] Error 1 make[3]: Leaving directory `/var/tmp/portage/kcdlabel-2.12/work/kcdlabel-2.12-KDE3/kcdlabel' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/kcdlabel-2.12/work/kcdlabel-2.12-KDE3/kcdlabel' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/kcdlabel-2.12/work/kcdlabel-2.12-KDE3' make: *** [all] Error 2 !!! ERROR: app-cdr/kcdlabel-2.12 failed. !!! Function kde_src_compile, Line 137, Exitcode 2 !!! died running emake, kde_src_compile:make Kernel headers: 2.4.21 Kernel sources: vanilla 2.4.22 root # emerge info Portage 2.0.49-r18 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.22) ================================================================= System uname: 2.4.22 i686 AMD Athlon(tm) Gentoo Base System version 1.4.3.12 distcc 2.11.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /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/env.d" CXXFLAGS="-march=athlon-xp -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aalib acl alsa apm arts avi berkdb bonobo canna cdr cjk crypt cups curl dga directfb doc dvb dvd encode fbcon foomaticdb freewnn gdbm ggi gif gphoto2 gstreamer gtk guile imap imlib jack java joystick jpeg kde libg++ lirc mad maildir mbox mmx motif mozilla mpeg mysql nas ncurses nls oggvorbis opengl oss pdflib perl png prelude python qt quicktime readline samba scanner sdl slang slp spell sse ssl svga tcltk tcpd tetex tiff truetype unicode usb vim-with-x wmf x86 xinerama xml xml2 xmms xv zlib"
it's a problem in the linux-headers. make sure you've got the latest ones installed.
I just checked, I had the "latest unmasked" one: linux-headers-2.4.21-r1 I upgraded manually to linux-headers-2.4.22 and then to 2.4.23 I still had the same error... I noticed that I had the linux-headers-2.4.19-r1 protected. I unmerged them and reemerged to linux-headers-2.4.21-r1. Still no chance...
i get exactly the same errors. i'm also at Kernel headers: 2.4.21 Kernel sources: vanilla 2.4.22 # emerge info Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.22)
can confirm with linux-headers-2.6.3(-r1) as well. Also have other people around the office with the same problem. Perhaps we need to use *older* headers? As in it worked on some machine somewhere but the person who last tested it used old kernel headers? Or perhaps he used stuff in /usr/src/linux/include?
I'm installing a new gentoo, and I still have this bug. Anything new?
Still a problem for me. 2.6.5-r1 kernel and 2.6.5 headers.
I found that this issue is due to a conflict with ANSI C++ dialect, not actually a kernel headers issue. To get this package to build and install, I researched the g++ syntax and found that the command below worked: CXXFLAGS="$CXXFLAGS -fpermissive" emerge kcdlabel Please note that this could be integrated into the ebuild, which does not specify build-time flags. The ebuild maintainer should address this issue. Additional note - The addition of "-fpermissive" parameter to $CXXFLAGS does not suppress the following warning, which seems to be a problem in the kcdlabel author's C++ code that was causing the ebuild to fail, i.e. see below: cc1plus: warning: "-Wbad-function-cast" is valid for C/ObjC but not for C++ error: ISO C++ forbids braced-groups within expressions
To clarify my prior report, the error that was the actual cause of the failed build for kcdlabel was as follows: error: ISO C++ forbids braced-groups within expressions
There is an interesting discussion about this problem on http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=203303. Daniel Souza
The -fpermissive fix worked for me...
-fpermissive works for me too. Time for flag-o-matic, I think ...
Created attachment 34751 [details] adds the -fpermissive option to CXXFLAGS This updated ebuild adds -fpermissive to the CXXFLAGS
done :)