When attempting to update KDE from 3.1.4 to 3.1.5, the kde-base/kdemultimedia package fails with the following errors: In file included from /usr/include/linux/cdrom.h:14, from plat_linux.c:65: /usr/include/asm/byteorder.h:38: error: syntax error before "__u64" /usr/include/asm/byteorder.h: In function `___arch__swab64': /usr/include/asm/byteorder.h:52: error: syntax error before ':' token In file included from plat_linux.c:70: include/wm_cdrom.h: At top level: include/wm_cdrom.h:63: warning: declaration of `index' shadows a global declaration /usr/include/string.h:267: warning: shadowed declaration is here plat_linux.c:112: warning: no previous prototype for `gen_init' plat_linux.c: In function `gen_init': plat_linux.c:111: warning: unused parameter `d' plat_linux.c: In function `wmcd_open': plat_linux.c:128: warning: assignment discards qualifiers from pointer target type plat_linux.c:123: warning: unused variable `warned' plat_linux.c: In function `wmcd_reopen': plat_linux.c:184: warning: passing arg 2 of `wm_lib_message' discards qualifiers from pointer target type plat_linux.c:187: warning: passing arg 2 of `wm_lib_message' discards qualifiers from pointer target type plat_linux.c:192: warning: passing arg 2 of `wm_lib_message' discards qualifiers from pointer target type plat_linux.c: In function `wm_scsi': plat_linux.c:258: warning: passing arg 2 of `wm_lib_message' discards qualifiers from pointer target type plat_linux.c:264: warning: passing arg 2 of `wm_lib_message' discards qualifiers from pointer target type plat_linux.c:256: warning: unused variable `ret' plat_linux.c: At top level: plat_linux.c:337: warning: declaration of `index' shadows a global declaration /usr/include/string.h:267: warning: shadowed declaration is here plat_linux.c:338: warning: no previous prototype for `gen_get_drive_status' plat_linux.c:425: warning: no previous prototype for `gen_get_trackcount' plat_linux.c:440: warning: no previous prototype for `gen_get_trackinfo' plat_linux.c:462: warning: no previous prototype for `gen_get_cdlen' plat_linux.c:474: warning: no previous prototype for `gen_play' plat_linux.c:512: warning: no previous prototype for `gen_pause' plat_linux.c:521: warning: no previous prototype for `gen_resume' plat_linux.c:530: warning: no previous prototype for `gen_stop' plat_linux.c:540: warning: no previous prototype for `gen_eject' plat_linux.c: In function `gen_eject': plat_linux.c:549: warning: passing arg 2 of `wm_lib_message' discards qualifiers from pointer target type plat_linux.c:553: warning: passing arg 2 of `wm_lib_message' discards qualifiers from pointer target type plat_linux.c:575: warning: passing arg 2 of `wm_lib_message' discards qualifiers from pointer target type plat_linux.c:582: warning: passing arg 2 of `wm_lib_message' discards qualifiers from pointer target type plat_linux.c:594: warning: passing arg 2 of `wm_lib_message' discards qualifiers from pointer target type plat_linux.c: At top level: plat_linux.c:627: warning: no previous prototype for `gen_closetray' plat_linux.c: In function `gen_closetray': plat_linux.c:630: warning: passing arg 2 of `wm_lib_message' discards qualifiers from pointer target type plat_linux.c: At top level: plat_linux.c:675: warning: no previous prototype for `gen_set_volume' plat_linux.c:700: warning: no previous prototype for `gen_get_cdtext' plat_linux.c: In function `gen_get_cdtext': plat_linux.c:701: warning: implicit declaration of function `wm_scsi_get_cdtext' plat_linux.c: At top level: plat_linux.c:710: warning: no previous prototype for `gen_get_volume' plat_linux.c: In function `gen_get_volume': plat_linux.c:709: warning: unused parameter `d' plat_linux.c: At top level: plat_linux.c:28: warning: `plat_linux_id' defined but not used make[3]: *** [plat_linux.lo] Error 1 make[3]: Leaving directory `/var/tmp/portage/kdemultimedia-3.1.5/work/kdemultimedia-3.1.5/kscd/libwm' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/kdemultimedia-3.1.5/work/kdemultimedia-3.1.5/kscd' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/kdemultimedia-3.1.5/work/kdemultimedia-3.1.5' make: *** [all] Error 2 !!! ERROR: kde-base/kdemultimedia-3.1.5 failed. !!! Function kde_src_compile, Line 123, Exitcode 2 !!! died running emake, kde_src_compile:make As a side note, I did notice similar issues with 3.1.4-r1, but nothing with 3.1.5 and it seemed to be related to linux-headers 2.4.23. Currently I am running kernel 2.6.1. Reproducible: Always Steps to Reproduce: 1. emerge -u kdemultimedia 2. 3. Actual Results: Results are the errors mentioned above. Expected Results: Completed emerging successfully. Portage 2.0.50_pre16 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031222-r0, 2.6.1-gentoo) ================================================================= System uname: 2.6.1-gentoo i686 Intel(R) Pentium(R) 4 CPU 2.40GHz Gentoo Base System version 1.4.3.12 Autoconf: sys-devel/autoconf-2.59 Automake: sys-devel/automake-1.7.8 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=pentium4 -fomit-frame-pointer -funroll-loops -pipe" 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="-O3 -march=pentium4 -fomit-frame-pointer -funroll-loops -pipe" 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 acpi alsa apache2 apm arts avi berkdb bonobo cdr crypt cups curl dga directfb doc dvd encode esd ethereal fbcon foomaticdb gb gd gdbm ggi gif gnome gpm gtk gtk2 gtkhtml imap imlib innodb java jikes jpeg kde ldap libg++ libwww mad maildir mikmod mmx motif mozilla mpeg mysql ncurses nls odbc oggvorbis opengl oss pam pdflib perl png python qt quicktime readline samba sasl sdl slang spell sse ssl svga tcltk tcpd tetex tiff truetype usb wmf wxwindows x86 xml2 xmms xv zlib"
i have the same bug. i had a look into /usr/include/asm/byteorder.h and my guess (it's not more) would be, that the "inline" at that position is wrong. I'm under Linux 2.6.1 too, and wondered, why these include files aren't up to date? (the offending file clearly comes from my 2.4 version).
I took an idea from one of the other bugs on 3.1.4 and edited the ebuild as such: add "--disable-strict --disable-warnings" to your $myconf It's only a workaround since it pretty much just turns a blind eye to the problem, but it's enough to compile.
Very Familiar error. The problem lies in linux-headers-2.4.21. The patch at http://lfs.oregonstate.edu/patches/downloads/kdemultimedia/kdemultimedia-3.1.4-u64-long-1.patch should fix the problem. NOTE: I had to strip the first path entry ( kdemultimedia-3.1.4{,.orig}/ ) out in the patch to make gentoo's patch magic apply it properly. Then just threw it into files dir, renamed and added it to PATCHES in the ebuild. x86 (stable) is still on linux-headers-2.4.19 and thus will not see this error. NOTE: my 1Ghz p3 mobile really dislikes compiling c++, so i didn't actually wait till the compile finishes, but since i know the error, i'm fairly confident the build will succeed with this patch. --- kdemultimedia-3.1.5.ebuild.orig 2004-01-16 06:24:09.732884320 +0100 +++ kdemultimedia-3.1.5.ebuild 2004-01-16 06:10:48.000000000 +0100 @@ -40,7 +40,8 @@ PATCHES="$FILESDIR/$P-gentoo-timidity.diff $FILESDIR/$P-ln-sf.diff - $FILESDIR/$P-alpha.diff" + $FILESDIR/$P-alpha.diff + $FILESDIR/$P-u64-long-1.patch" # alsa 0.9 not supported #use alsa && myconf="$myconf --with-alsa --with-arts-alsa" && myaudio="$myaudio,alsa" || myconf="$myconf --without-alsa --disable-alsa"
i just tried your patch, and still get a compilation-error: 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 cdromAccess_Linux.cpp:20, from cdromAccess.cpp:26: /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[4]: *** [cdromAccess.lo] Error 1 make[4]: Leaving directory `/var/tmp/portage/kdemultimedia-3.1.5/work/kdemultimedia-3.1.5/mpeglib/lib/input' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/var/tmp/portage/kdemultimedia-3.1.5/work/kdemultimedia-3.1.5/mpeglib/lib' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/kdemultimedia-3.1.5/work/kdemultimedia-3.1.5/mpeglib' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/kdemultimedia-3.1.5/work/kdemultimedia-3.1.5' make: *** [all] Error 2 !!! ERROR: kde-base/kdemultimedia-3.1.5 failed. !!! Function kde_src_compile, Line 123, Exitcode 2 !!! died running emake, kde_src_compile:make
Yup got it too, but its another error so at least we are on the right way ;-) This supposedly has a fix in kde cvs, but if I grab the version from -HEAD even, i get the same error even though it is supposed to have a fix. Stuck for now :/ http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdemultimedia/mpeglib/lib/input/cdromAccess_Linux.cpp?rev=1.6&content-type=text/x-cvsweb-markup in the meanwhile, taking out -ansi -pedantic from the compiler flags this file compiles fine :/ its not a proper fix tho.
Created attachment 24014 [details] replacement for /usr/include/linux/byteorder/swab.h Potential fix is to patch the linux header files. Here is a replacement for /usr/include/linux/byteorder/swab.h /usr/include/asm/byteorder.h to follow
Created attachment 24015 [details] replacement for /usr/include/asm/byteorder.h Another file to replace, this time /usr/include/asm/byteorder.h
One method of fixing this is to patch the linux headers themselves. See attachments. byteorder.h looks like it is just plain wrong given the other code in there, and swab.h I made a C++-based fix for swab.h, as the code in there is correct for C, but not C++. I haven't posted this to anyone other than here, but if it works for others and others can review it, I'll send the changes in as a set of patches, as the files still exist that way in 2.6.
Kimball Thurston, Would it be possible for you to post the changed files for 2.6.x here. I am not a programmer and I don't no the first thing about comparing the 2.4.21+ and 2.6.x versions. So, if they're different, I don't know how to change them. I'm running kernel version 2.6.1. I do know enough to replace the files and re-compile my kernel. I also know how to run patch. So either way, I could test the.
I can't believe the typos I just committed. The gist is, if you put up the swab.h and byteorder.h files for 2.6.1, I can test them. Doh!
You don't have to recompile the kernel... just download the attachments to the bug, and overwrite the files in /usr/include/linux/byteorder and /usr/include/asm... I didn't change anything that needs a recompile of the kernel... Just syntax fixes for using those header files inside of C++. Good luck.
Thanks for the fixes - looks like quite a bit modified. But important thing for me is kdemultimedia builds now! Yay! With so many people using 2.6, it astonishes me this made it to arch.
Sorry for sounding stupid... Do I need to apply the replacement headers on machines where I install a prebuilt kdemultimedia package (built on a patched machine)? Suppose not, but just wanted to make sure, since I don't want to bork kde on my users hosts. /Andreas
I can confirm that chaning swab.h and byteorder.h let kdemultimedia build successfully (kernel 2.6.1-mm4).
Created attachment 24022 [details, diff] 3.1.5 compatibility with kernel header patch
Created attachment 24023 [details, diff] 3.1.5 compatibility patch
The above two patches I put on were submitted by the Debian maintainer on the kde packager list. If someone wants to try them and let me know if they fix the problem without having to patch the kernel headers, it would be most appreciated.
Does not seem to fix this for me. I added teh patches to PATCHES= in the ebuild, had to strip off teh leading pathname in the patches to have the portage patch magic apply them withut erroring out. I'm quite clueless as even taking the cdromAcess files from cvs -HEAD do not fix the issue on my system (the commit logs claims it has a fix for slab.h issue)
Cool i should investigate further before commenting, the patch to cdromAcess_linux.cpp had been silently rejected, i'll investigate and let my results known
Patching the kernel headers with the patches of Kimball Thurston works on my system. Kernel: 2.4.22-gentoo-r1 #2 SMP
the 10 kmidi patch and the 11 cdrom access patch don't apply. for me. however the cdromaccess patch is simple to do a manual edit for. The bad thing is it doesn't fix the syntax error in slab.h. The only to me acceptable workaround is to put the slab.h as attached to this bug in kdemultimedia-3.1.5/mpeglib/lib/input/linux/byteorder/swab.h
Oh damn, sorry, i managed to tab out of the comment window and press enter submitting prematurely. Putting the slab.h in that directory makes gcc include magic take this file over the slab/h under /usr/include. It is a hack, and quite a dirty one too, but it sure as h*** beats messing with files in /usr/include imho. The good news is, cdromAccess.cpp compiles with this hack.
replacing swab.h and byteorder.h into the /usr/include let me compile fine. Should I replace the new header files with the original now? Or newer files are 'better' ?
The workaround as shown by Ronald in #21 / #22 works perfectly here. I agree this is much better than to fiddle around with the installed headers. Thanks.
*** Bug 38504 has been marked as a duplicate of this bug. ***
As i understand it from these posts you are all using a 2.6 kernel im still running a 2.4 kernel and im having the same problem. i had a 2.6 kernel for a while but couldnt get some things to work properly so i went back to 2.4 Am i the only one with the same error and a 2.4 kernel ?? could it be that some of my packages are build on a 2.6 kernel if so, which ones ?
Not a problem of packages... it's a problem of headers. If you had 2.6.x installed in your system, then it's very probable that the headers are still there. Just do as all of us did: replace /usr/include/linux/byteorder/swab.h and /usr/include/asm/byteorder.h with the ones posted here. That'll do for you.
I'm guessing the common thing between us is running the ~x86 keyword. Currently the ~x86 keyword runs on 2.4.21 kernel headers in /usr/include/linux If i recall correctly the x86 profile runs on 2.4.19 headers and it may very well be they do not have incompatible headers. The running kernel (may it be 2.4.2x-whatever or 2.6.x-whatever) has in this case no business with the compilation problems. To make this package compile in the ~x86 profile I need to apply the patch I linked in comment #3 and the evil hack (tm) I explained in comments #21/#22
Actually, isn't the real problem that the 24bit operations in swab.h are never arch defined in x86 land, so they get "defined" in swab.h? In the 2.6 headers the 24bit ops are gone completely (since they're never used anywhere.)
I try the: replacement for /usr/include/linux/byteorder/swab.h replacement for /usr/include/asm/byteorder.h GOOD! this solution is good for my system gentoo-dev-sources + linux-header 2.4.21-r1
*** Bug 38818 has been marked as a duplicate of this bug. ***
caleb: cdromAccess_Linux.cpp is obsolete by the alpha patch (does #ifdef 0 around the typedef). patch for kmidi/config.h (after some tweaking with the headers to make it apply) does NOT fix the problem. remaining error: /bin/sh ../../../libtool --silent --mode=compile --tag=CXX 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 -Wundef -Wall -pedantic -W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -DNDEBUG -DNO_DEBUG -O2 -O1 -march=pentium2 -pipe -fno-exceptions -fno-check-new -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -c -o cdromAccess.lo `test -f 'cdromAccess.cpp' || echo './'`cdromAccess.cpp 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 cdromAccess_Linux.cpp:20, from cdromAccess.cpp:26: /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 removing '-pedantic' from the mpeglib/lib/input/Makefile fixes it instead. perhaps we should just do: for i in `find ${S} -name Makefile`; do sed -re 's/-pedantic/ /g' -i ${i} done;
as comment #2 noted, adding in: myconf="$myconf --disable-strict --disable-warnings" to the ebuild solves the remaining problem I had.
I commited my fix now, this should solve it for everybody (without the need for modifying any headers).
Now, i get this: checking for libjpeg6b... no checking for libjpeg... -ljpeg checking for Qt... configure: error: Qt (>= Qt 3.1.0) (library qt-mt) not found. Please check your installation! For more details about this problem, look at the end of config.log. Make sure that you have compiled Qt with thread support! died running ./configure, kde_src_compile:configure * * Your KDE program installation died while running the configure script * !!! ERROR: kde-base/kdemultimedia-3.1.5 failed. !!! Function configure_die, Line 181, Exitcode 0 !!! (no error message)
opengl-update xfree ?
The most recent ebuild/fix as per comment #34, still doesn't fix things. My ebuild shows the --disable-strict/warnings for $myconf, however the build still bombs out in the same place. Note that -pedantic still makes it into the compile flags, thus the failure. make[3]: Entering directory `/var/tmp/portage/kdemultimedia-3.1.5/work/kdemultimedia-3.1.5/kscd/libwm' [...] /bin/sh ../../libtool --silent --mode=compile gcc -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 -ansi -W -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -g3 -march=pentium3 -O2 -pipe -fomit-frame-pointer -c -o plat_linux.lo `test -f 'plat_linux.c' || echo './'`plat_linux.c In file included from /usr/include/linux/cdrom.h:14, from plat_linux.c:65: /usr/include/asm/byteorder.h:38: error: syntax error before "__u64" /usr/include/asm/byteorder.h: In function `___arch__swab64': /usr/include/asm/byteorder.h:52: error: syntax error before ':' token In file included from plat_linux.c:70: powerix / # ls -ld /usr/src/linux lrwxrwxrwx 1 root root 16 Jan 25 20:33 /usr/src/linux -> linux-2.6.2-rc1/ sys-kernel/linux-headers Latest version available: 2.4.21-r1 Latest version installed: 2.4.21-r1
Created attachment 25154 [details, diff] kdemultimedia-3.1.5 local kernel header patch The compile error was still occurring for me after addition of the --disable-strict flag to the ebuild, and fixing the incompatible headers so that the compile completes properly seems to me a good solution, though I am relunctant to patch the standard kernel headers to fix an application-specific problem. I've included a patch for the kdemultimedia-3.1.5.ebuild here to apply the header files posted by Kimball Thurston in comments #6/#7 to the directories suggested by Ronald Hummelink in comments #21/#22 at build time. Should fix the prob easily for anyone still experiencing it.