Bug 68828 - mpeglib/lib/input/cdromAccess_Linux.cpp does not compile under Linux 2.4.22
Summary: mpeglib/lib/input/cdromAccess_Linux.cpp does not compile under Linux 2.4.22
Status: RESOLVED DUPLICATE of bug 64418
Alias: None
Product: mpeglib
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Martin Vogt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-23 03:26 UTC by alfons.hoogervorst
Modified: 2003-11-23 05:32 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
prevent linux' swab.h to be included (477 bytes, patch)
2003-11-23 03:27 UTC, alfons.hoogervorst
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alfons.hoogervorst 2003-11-23 03:26:05 UTC
Version:           kdemultimedia/mpeglib (KDE_3_1_BRANCH) (using KDE KDE 3.1.4)
Installed from:    Compiled From Sources
Compiler:          g++ 3.3.1 
OS:          Linux

I can't recall whether I saw this earlier:

---8<---
if /bin/sh ../../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I/opt/kde3/include -I/opt3/qt-copy/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 -w -O3 -pipe -march=pentium4 -mcpu=pentium4 -fforce-addr -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -fomit-frame-pointer -malign-functions=4 -fstrict-aliasing -Wl,-z,combreloc -fno-exceptions -fno-check-new -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST  -MT cdromAccess.lo -MD -MP -MF ".deps/cdromAccess.Tpo" \
  -c -o cdromAccess.lo `test -f 'cdromAccess.cpp' || echo './'`cdromAccess.cpp; \
then mv ".deps/cdromAccess.Tpo" ".deps/cdromAccess.Plo"; \
else rm -f ".deps/cdromAccess.Tpo"; exit 1; \
fi
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:18,
                 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: *** [cdromAccess.lo] Error 1
--->8---

There are probably some statements, expanded by the preprocessor, that are simply not valid C++. I fixed it by simply preventing swab.h to be included. See attached patch.
Comment 1 alfons.hoogervorst 2003-11-23 03:27:12 UTC
Created attachment 3356 [details]
prevent linux' swab.h to be included
Comment 2 Thiago Macieira 2003-11-23 05:32:18 UTC
This is no KDE bug: it's a kernel bug.

*** This bug has been marked as a duplicate of 64418 ***