Bug 61892 - Build failed in /usr/include/asm/byteorder.h (__u64)
Summary: Build failed in /usr/include/asm/byteorder.h (__u64)
Status: RESOLVED DUPLICATE of bug 51654
Alias: None
Product: kaudiocreator
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Gerd Fleischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-31 11:36 UTC by Alexandr Zaika
Modified: 2003-12-04 14:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Zaika 2003-07-31 11:36:10 UTC
Version:            (using KDE KDE 3.1.3)
Installed from:    Compiled From Sources
Compiler:          gcc 3.3 
OS:          Linux

<-------------------------------------------- Last log -------------------------------------------->
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include -I/usr/local/include -I/usr/local/GUI/kde-3.1.3/include -I/usr/local/GUI/qt3.x/include -I/usr/local/GUI/X11R6/include  -static -Wall -DDATADIR=\"/usr/local/GUI/kde-3.1.3/share/apps/kaudiocreator\" -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 -O2 -fno-exceptions -fno-check-new -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST  -MT cdconfigimp.o -MD -MP -MF ".deps/cdconfigimp.Tpo" \
  -c -o cdconfigimp.o `test -f 'cdconfigimp.cpp' || echo './'`cdconfigimp.cpp; \
then mv ".deps/cdconfigimp.Tpo" ".deps/cdconfigimp.Po"; \
else rm -f ".deps/cdconfigimp.Tpo"; exit 1; \
fi
In file included from /usr/include/linux/cdrom.h:14,
                 from cdconfigimp.cpp:79:
/usr/include/asm/byteorder.h:38: error: syntax error before `(' token
/usr/include/asm/byteorder.h:42: error: '__u64' is used as a type, but is not
   defined as a type.
/usr/include/asm/byteorder.h:43: error: parse error before `}' token
/usr/include/asm/byteorder.h:44: error: syntax error before `.' token
/usr/include/asm/byteorder.h:50: error: syntax error before `.' token
/usr/include/asm/byteorder.h:51: error: syntax error before `.' token
/usr/include/asm/byteorder.h:52: error: parse error before `:' token
<-------------------------------------------- Last log -------------------------------------------->

My Path:
FILE: cdconfigimp.cpp
Coode:
74 | extern "C"
75 | {
76 | /* This is in support for the Mega Hack, if cdparanoia ever is fixed, or we
77 |    use another ripping library we can remove this.  */
78 |
79 | #include <asm/types.h>
80 | #ifndef __u64
81 |     typedef unsigned long long __u64;
82 | #endif
83 |
84 | #include <linux/cdrom.h>
85 | #include <sys/ioctl.h>
Comment 1 Alexandr Zaika 2003-07-31 11:47:02 UTC
Such bug in kioslave, Patch: 
File: audiocd/audiocd.cpp 
Coode: 
55 | #define _LINUX_BYTEORDER_SWAB_H 
56 | #endif 
57 | 
58 | #include <asm/types.h> 
59 | #ifndef __u64 
60 |     typedef unsigned long long __u64; 
61 | #endif 
62 | 
63 | #include <linux/cdrom.h> 
 
Comment 2 Alexandr Zaika 2003-07-31 11:50:43 UTC
Such bug in kscd, Patch: 
File: libwm/plat_linux.c 
Coode: 
63 | #include <sys/time.h> 
64 | #include <sys/ioctl.h> 
65 | 
66 | #ifdef __cplusplus 
67 | extern "C" 
68 | { 
69 | #endif 
70 | 
71 | /* This is in support for the Mega Hack, if cdparanoia ever is fixed, or we 
72 |    use another ripping library we can remove this.  */ 
73 | 
74 | #include <asm/types.h> 
75 | #ifndef  __u64 
76 | typedef unsigned long long __u64; 
77 | #endif 
78 | 
79 | #include <sys/ioctl.h> 
81 | #include <linux/cdrom.h> 
82 | 
83 | #include "include/wm_cdda.h" 
84 | #include "include/wm_struct.h" 
85 | #include "include/wm_platform.h" 
86 | #include "include/wm_cdrom.h" 
87 | #include "include/wm_scsi.h" 
88 | #include "include/wm_helpers.h" 
 
Comment 3 Alexandr Zaika 2003-07-31 11:51:54 UTC
Such bug in mpeglib, Patch: 
File: lib/input/cdromAccess.cpp 
Coode: 
25 | #ifdef OS_Linux 
26 | 
27 |     #include <asm/types.h> 
28 |     #ifndef __u64 
29 |    typedef unsigned long long __u64; 
30 |     #endif 
31 | 
32 |   #include "cdromAccess_Linux.cpp" 
33 | #endif 
 
 
PS: My kernel version 2.4.21 
Comment 4 Thiago Macieira 2003-07-31 14:15:22 UTC
Fix your kernel. The problem lies therein. 
Comment 5 Thiago Macieira 2003-07-31 17:32:17 UTC

*** This bug has been marked as a duplicate of 51654 ***
Comment 6 Sergey Manucharyan 2003-12-04 14:01:10 UTC
The correct solution is to apply the patch suggested by Niki Guldbrand <niki@lunar-linux.org> to the kernel. After that everything works fine:
you don't need to alter any file from kde.

===========================================================================

--- old/include/asm-i386/byteorder.h    2003-06-13 16:51:38.000000000 +0200
+++ new/include/asm-i386/byteorder.h    2003-09-08 20:59:43.000000000 +0200
@@ -34,7 +34,7 @@
                return x;
 }
 
-
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
 static inline __u64 ___arch__swab64(__u64 val) 
 { 
        union { 
@@ -55,10 +55,11 @@
 } 
 
 #define __arch__swab64(x) ___arch__swab64(x)
+#define __BYTEORDER_HAS_U64__
+#endif
 #define __arch__swab32(x) ___arch__swab32(x)
 #define __arch__swab16(x) ___arch__swab16(x)
 
-#define __BYTEORDER_HAS_U64__
 
 #endif /* __GNUC__ */

==================================================