alsa-driver build fails with gcc-3.3
gcc-3.3 -D__KERNEL__ -DMODULE=1 -I/usr/src/modules/alsa-driver/include -I/usr/src/kernel-headers-2.4.27-2-686/include -I/usr/src/kernel-headers-2.4.27-2-686/include -O2 -mpreferred-stack-boundary=2 -march=i686 -DLINUX -Wall -Wstrict-prototypes
-fomit-frame-pointer -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -DALSA_BUILD -nostdinc -iwithprefix include -DMODVERSIONS -include /usr/src/kernel-headers-2.4.27-2-686/include/linux/modversions.h -DKBUILD_BASENAME=memory -c -o
memory.o memory.c
In file included from memory.c:2:../alsa-kernel/core/memory.c:37: error: syntax error before '*' token../alsa-kernel/core/memory.c:38: warning: function declaration isn't a prototype../alsa-kernel/core/memory.c: In function `copy_to_user_fromio':../alsa-kernel/core/memory.c:40: error: `count' undeclared (first use in this function)../alsa-kernel/core/memory.c:40: error: (Each undeclared identifier is reported only once../alsa-kernel/core/memory.c:40: error: for each function it appears in.)../alsa-kernel/core/memory.c:40: error: `dst' undeclared (first use in this function)../alsa-kernel/core/memory.c:40: error: syntax error before "__force"../alsa-kernel/core/memory.c:40: error: syntax error before "__force"../alsa-kernel/core/memory.c: At top level:../alsa-kernel/core/memory.c:68: error: syntax error before '*' token../alsa-kernel/core/memory.c:69: warning: function declaration isn't a prototype../alsa-kernel/core/memory.c: In function `copy_from_user_toio':../alsa-kernel/core/memory.c:71: error: `count' undeclared (first use in this function)../alsa-kernel/core/memory.c:71: error: syntax error before "__force"../alsa-kernel/core/memory.c:71: error: `src' undeclared (first use in this function)../alsa-kernel/core/memory.c:71: error: syntax error before "__force"
make[4]: *** [memory.o] Error 1
make[4]: Leaving directory `/usr/src/modules/alsa-driver/acore'
make[3]: *** [compile] Error 1
make[3]: Leaving directory `/usr/src/modules/alsa-driver'
make[2]: *** [build-stamp] Error 2
make[2]: Leaving directory `/usr/src/modules/alsa-driver'
make[1]: *** [kdist_image] Error 2
make[1]: Leaving directory `/usr/src/modules/alsa-driver'
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
At Wed, 12 Oct 2005 16:12:49 +0200,
Quoted 6 lines · Thomas Hood
gcc-3.3 -D__KERNEL__ -DMODULE=1 -I/usr/src/modules/alsa-driver/include -I/usr/src/kernel-headers-2.4.27-2-686/include -I/usr/src/kernel-headers-2.4.27-2-686/include -O2 -mpreferred-stack-boundary=2 -march=i686 -DLINUX -Wall -Wstrict-prototypes
-fomit-frame-pointer -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -DALSA_BUILD -nostdinc -iwithprefix include -DMODVERSIONS -include/usr/src/kernel-headers-2.4.27-2-686/include/linux/modversions.h-DKBUILD_BASENAME=memory -c -o
memory.omemory.c
In file included from memory.c:2:../alsa-kernel/core/memory.c:37: error: syntax error before '*' token
It's not due to gcc-3.3 but 2.4 kernel.
Try the patch below.
Takashi
Index: alsa-driver/acore/memory.c
===================================================================
RCS file: /home/iwai/cvs/alsa/alsa-driver/acore/memory.c,v retrieving revision 1.2
acore/memory.c +24 -0
@@ -1,2 +1,26 @@#define __NO_VERSION__ +#include <linux/config.h> +#include <linux/version.h> +#if LINUX_VERSION_CODE <KERNEL_VERSION (2 ,6 ,12 ) +#include <linux/compiler.h> +#ifndef __iomem +#define __iomem +#endif +#ifndef __user +#define __user +#endif +#ifndef __kernel +#define __kernel +#endif +#ifndef __nocast +#define __nocast +#endif +#ifndef __force +#define __force +#endif +#ifndef __safe +#define __safe +#endif +#endif +#include "../alsa-kernel/core/memory.c"
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
Quoted 1 line · Takashi Iwai
It's not due to gcc-3.3 but 2.4 kernel.
Right.
Quoted 1 line
Try the patch below.
It fixed the build failure at memory.c. Thanks.
Signature · 7 lines
Thomas ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl