qemu-0.8.1 compile errors on x86_64 suse linux 10.1
At first I thought the problem was that I was using gcc-4, so I installed gcc-3.4.6, but I still get the same errors:
gcc-3.4 -Wall -O2 -g -fno-strict-aliasing -I. -I.. -I/tmp/qemu-0.8.1/target-i386
-I/tmp/qemu-0.8.1 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/tmp/qemu-0.8.1/fpu -DHAS_AUDIO -I/tmp/qemu-0.8.1/slirp -c -o usb-linux.o/tmp/qemu-0.8.1/usb-linux.c
In file included from /tmp/qemu-0.8.1/usb-linux.c:29:/usr/include/linux/usbdevice_fs.h:49: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:49: error: syntax error before '*' token /usr/include/linux/usbdevice_fs.h:56: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:56: error: syntax error before '*' token /usr/include/linux/usbdevice_fs.h:66: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:66: error: syntax error before '*' token /usr/include/linux/usbdevice_fs.h:100: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:100: error: syntax error before '*' token /usr/include/linux/usbdevice_fs.h:109: error: syntax error before '}' token /usr/include/linux/usbdevice_fs.h:116: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:116: error: syntax error before '*' token /tmp/qemu-0.8.1/usb-linux.c: In function `usb_host_handle_control':/tmp/qemu-0.8.1/usb-linux.c:91: error: invalid application of sizeof' to incomplete type usbdevfs_ctrltransfer' /tmp/qemu-0.8.1/usb-linux.c: In function `usb_host_handle_data':/tmp/qemu-0.8.1/usb-linux.c:110: error: storage size of 'bt' isn't known /tmp/qemu-0.8.1/usb-linux.c:121: error: invalid application of sizeof' to incomplete type usbdevfs_bulktransfer' /tmp/qemu-0.8.1/usb-linux.c:110: warning: unused variable bt' /tmp/qemu-0.8.1/usb-linux.c: In function usb_host_device_open':/tmp/qemu-0.8.1/usb-linux.c:185: error: storage size of 'ctrl' isn't known /tmp/qemu-0.8.1/usb-linux.c:188: error: invalid application of sizeof' to incomplete type usbdevfs_ioctl' /tmp/qemu-0.8.1/usb-linux.c:185: warning: unused variable `ctrl' make[1]: *** [usb-linux.o] Error 1
make[1]: Leaving directory `/tmp/x/i386-softmmu'
make: *** [all] Error 1
docbill@docbill003:/tmp/x> make
for d in i386-user arm-user armeb-user sparc-user ppc-user mips-user mipsel-user i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu mips-softmmu mipsel-softmmu arm-softmmu; do \
make -C $d all || exit 1 ; \
done
make[1]: Entering directory `/tmp/x/i386-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/i386-user'
make[1]: Entering directory `/tmp/x/arm-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/arm-user'
make[1]: Entering directory `/tmp/x/armeb-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/armeb-user'
make[1]: Entering directory `/tmp/x/sparc-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/sparc-user'
make[1]: Entering directory `/tmp/x/ppc-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/ppc-user'
make[1]: Entering directory `/tmp/x/mips-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/mips-user'
make[1]: Entering directory `/tmp/x/mipsel-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/mipsel-user'
make[1]: Entering directory `/tmp/x/i386-softmmu'
gcc-3.4 -Wall -O2 -g -fno-strict-aliasing -I. -I.. -I/tmp/qemu-0.8.1/target-i386
-I/tmp/qemu-0.8.1 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/tmp/qemu-0.8.1/fpu -DHAS_AUDIO -I/tmp/qemu-0.8.1/slirp -c -o usb-linux.o/tmp/qemu-0.8.1/usb-linux.c
In file included from /tmp/qemu-0.8.1/usb-linux.c:29:/usr/include/linux/usbdevice_fs.h:49: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:49: error: syntax error before '*' token /usr/include/linux/usbdevice_fs.h:56: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:56: error: syntax error before '*' token /usr/include/linux/usbdevice_fs.h:66: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:66: error: syntax error before '*' token /usr/include/linux/usbdevice_fs.h:100: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:100: error: syntax error before '*' token /usr/include/linux/usbdevice_fs.h:109: error: syntax error before '}' token /usr/include/linux/usbdevice_fs.h:116: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:116: error: syntax error before '*' token /tmp/qemu-0.8.1/usb-linux.c: In function `usb_host_handle_control':/tmp/qemu-0.8.1/usb-linux.c:91: error: invalid application of sizeof' to incomplete type usbdevfs_ctrltransfer' /tmp/qemu-0.8.1/usb-linux.c: In function `usb_host_handle_data':/tmp/qemu-0.8.1/usb-linux.c:110: error: storage size of 'bt' isn't known /tmp/qemu-0.8.1/usb-linux.c:121: error: invalid application of sizeof' to incomplete type usbdevfs_bulktransfer' /tmp/qemu-0.8.1/usb-linux.c:110: warning: unused variable bt' /tmp/qemu-0.8.1/usb-linux.c: In function usb_host_device_open':/tmp/qemu-0.8.1/usb-linux.c:185: error: storage size of 'ctrl' isn't known /tmp/qemu-0.8.1/usb-linux.c:188: error: invalid application of sizeof' to incomplete type usbdevfs_ioctl' /tmp/qemu-0.8.1/usb-linux.c:185: warning: unused variable `ctrl' make[1]: *** [usb-linux.o] Error 1
make[1]: Leaving directory `/tmp/x/i386-softmmu'
make: *** [all] Error 1
**
The issue is with your linux kernel headers.
Quoted 117 lines · Doctor Bill
At first I thought the problem was that I was using gcc-4, so I installed gcc-3.4.6, but I still get the same errors:
gcc-3.4 -Wall -O2 -g -fno-strict-aliasing -I. -I..
(quoted diff) +0
-3-I/tmp/qemu-0.8.1/target-i386 -I/tmp/qemu-0.8.1 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/tmp/qemu-0.8.1/fpu -DHAS_AUDIO -I/tmp/qemu-0.8.1/slirp -c -ousb-linux.o/tmp/qemu-
0.8.1/usb-linux.c
In file included from/tmp/qemu-0.8.1/usb-linux.c:29:/usr/include/linux/usbdevice_fs.h:49: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:49: error: syntax error before '*' token/usr/include/linux/usbdevice_fs.h:56: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:56: error: syntax error before '*' token/usr/include/linux/usbdevice_fs.h:66: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:66: error: syntax error before '*' token/usr/include/linux/usbdevice_fs.h:100: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:100: error: syntax error before '*' token/usr/include/linux/usbdevice_fs.h:109: error: syntax error before '}' token/usr/include/linux/usbdevice_fs.h:116: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:116: error: syntax error before '*' token/tmp/qemu-0.8.1/usb-linux.c: In function `usb_host_handle_control':/tmp/qemu-0.8.1/usb-linux.c:91: error: invalid application ofsizeof' to incomplete typeusbdevfs_ctrltransfer'/tmp/qemu-0.8.1/usb-linux.c: In function `usb_host_handle_data':/tmp/qemu-0.8.1/usb-linux.c:110: error: storage size of 'bt' isn't known/tmp/qemu-0.8.1/usb-linux.c:121: error: invalid application ofsizeof' to incomplete typeusbdevfs_bulktransfer'/tmp/qemu-0.8.1/usb-linux.c:110: warning: unused variablebt' /tmp/qemu-0.8.1/usb-linux.c: In functionusb_host_device_open':/tmp/qemu-0.8.1/usb-linux.c:185: error: storage size of 'ctrl' isn't known/tmp/qemu-0.8.1/usb-linux.c:188: error: invalid application ofsizeof' to incomplete typeusbdevfs_ioctl'/tmp/qemu-0.8.1/usb-linux.c:185: warning: unused variable `ctrl' make[1]: *** [usb-linux.o] Error 1
make[1]: Leaving directory `/tmp/x/i386-softmmu'
make: *** [all] Error 1
docbill@docbill003:/tmp/x> make
for d in i386-user arm-user armeb-user sparc-user ppc-user mips-user mipsel-user i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu mips-softmmu mipsel-softmmu arm-softmmu; do \
make -C $d all || exit 1 ; \
done
make[1]: Entering directory `/tmp/x/i386-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/i386-user'
make[1]: Entering directory `/tmp/x/arm-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/arm-user'
make[1]: Entering directory `/tmp/x/armeb-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/armeb-user'
make[1]: Entering directory `/tmp/x/sparc-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/sparc-user'
make[1]: Entering directory `/tmp/x/ppc-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/ppc-user'
make[1]: Entering directory `/tmp/x/mips-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/mips-user'
make[1]: Entering directory `/tmp/x/mipsel-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/mipsel-user'
make[1]: Entering directory `/tmp/x/i386-softmmu'
gcc-3.4 -Wall -O2 -g -fno-strict-aliasing -I. -I..(quoted diff) +0
-3-I/tmp/qemu-0.8.1/target-i386 -I/tmp/qemu-0.8.1 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/tmp/qemu-0.8.1/fpu -DHAS_AUDIO -I/tmp/qemu-0.8.1/slirp -c -ousb-linux.o/tmp/qemu-
0.8.1/usb-linux.c
In file included from/tmp/qemu-0.8.1/usb-linux.c:29:/usr/include/linux/usbdevice_fs.h:49: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:49: error: syntax error before '*' token/usr/include/linux/usbdevice_fs.h:56: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:56: error: syntax error before '*' token/usr/include/linux/usbdevice_fs.h:66: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:66: error: syntax error before '*' token/usr/include/linux/usbdevice_fs.h:100: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:100: error: syntax error before '*' token/usr/include/linux/usbdevice_fs.h:109: error: syntax error before '}' token/usr/include/linux/usbdevice_fs.h:116: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:116: error: syntax error before '*' token/tmp/qemu-0.8.1/usb-linux.c: In function `usb_host_handle_control':/tmp/qemu-0.8.1/usb-linux.c:91: error: invalid application ofsizeof' to incomplete typeusbdevfs_ctrltransfer'/tmp/qemu-0.8.1/usb-linux.c: In function `usb_host_handle_data':/tmp/qemu-0.8.1/usb-linux.c:110: error: storage size of 'bt' isn't known/tmp/qemu-0.8.1/usb-linux.c:121: error: invalid application ofsizeof' to incomplete typeusbdevfs_bulktransfer'/tmp/qemu-0.8.1/usb-linux.c:110: warning: unused variablebt' /tmp/qemu-0.8.1/usb-linux.c: In functionusb_host_device_open':/tmp/qemu-0.8.1/usb-linux.c:185: error: storage size of 'ctrl' isn't known/tmp/qemu-0.8.1/usb-linux.c:188: error: invalid application ofsizeof' to incomplete typeusbdevfs_ioctl'/tmp/qemu-0.8.1/usb-linux.c:185: warning: unused variable `ctrl' make[1]: *** [usb-linux.o] Error 1
make[1]: Leaving directory `/tmp/x/i386-softmmu'
make: *** [all] Error 1**
_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
Signature · 2 lines
Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection.
Good guess, SuSE makes many modifications to the standard kernel. However, the kernel source is not the problem. I downloaded fresh kernel source from www.kernel.org, and I still have the exact same error. Here are the relevant details:
QEMU version: qemu-0.8.1
Linux Kernel: 2.6.16.13
Operating System: SuSE 10.1
gcc version: 3.4.6
CPU: Amd Athlon(tm) Processor 3200+
Bill
Quoted 156 lines · Jim C. Brown
The issue is with your linux kernel headers.
Quoted 1 line · Doctor Bill
At first I thought the problem was that I was using gcc-4, so I
installed
Review
Quoted 5 lines
gcc-3.4.6, but I still get the same errors:
gcc-3.4 -Wall -O2 -g -fno-strict-aliasing -I. -I..
(quoted diff) +0
-2-I/tmp/qemu-0.8.1/target-i386 -I/tmp/qemu-0.8.1 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64-D_LARGEFILE_SOURCE
Quoted 7 lines
-I/tmp/qemu-0.8.1/fpu -DHAS_AUDIO -I/tmp/qemu-0.8.1/slirp -c -o usb-linux.o/tmp/qemu-
0.8.1/usb-linux.c
In file included from/tmp/qemu-0.8.1/usb-linux.c:29:/usr/include/linux/usbdevice_fs.h:49: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:49: error: syntax error before '*'token
Quoted 3 lines
/usr/include/linux/usbdevice_fs.h:56: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:56: error: syntax error before '*'token
Quoted 3 lines
/usr/include/linux/usbdevice_fs.h:66: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:66: error: syntax error before '*'token
Quoted 3 lines
/usr/include/linux/usbdevice_fs.h:100: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:100: error: syntax error before '*'token
Quoted 1 line
/usr/include/linux/usbdevice_fs.h:109: error: syntax error before '}'token
Quoted 3 lines
/usr/include/linux/usbdevice_fs.h:116: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:116: error: syntax error before '*'token
Quoted 2 lines
/tmp/qemu-0.8.1/usb-linux.c: In function `usb_host_handle_control':/tmp/qemu-0.8.1/usb-linux.c:91: error: invalid application of `sizeof'to
Quoted 4 lines
incomplete type
usbdevfs_ctrltransfer' /tmp/qemu-0.8.1/usb-linux.c: In functionusb_host_handle_data':/tmp/qemu-0.8.1/usb-linux.c:110: error: storage size of 'bt' isn't known/tmp/qemu-0.8.1/usb-linux.c:121: error: invalid application of `sizeof'to
Quoted 4 lines
incomplete type
usbdevfs_bulktransfer' /tmp/qemu-0.8.1/usb-linux.c:110: warning: unused variablebt'/tmp/qemu-0.8.1/usb-linux.c: In function `usb_host_device_open':/tmp/qemu-0.8.1/usb-linux.c:185: error: storage size of 'ctrl' isn'tknown
Quoted 1 line
/tmp/qemu-0.8.1/usb-linux.c:188: error: invalid application of `sizeof'to
Quoted 34 lines
incomplete type
usbdevfs_ioctl' /tmp/qemu-0.8.1/usb-linux.c:185: warning: unused variablectrl' make[1]: *** [usb-linux.o] Error 1
make[1]: Leaving directory `/tmp/x/i386-softmmu'
make: *** [all] Error 1
docbill@docbill003:/tmp/x> make
for d in i386-user arm-user armeb-user sparc-user ppc-user mips-user mipsel-user i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu mips-softmmu mipsel-softmmu arm-softmmu; do \
make -C $d all || exit 1 ; \
done
make[1]: Entering directory `/tmp/x/i386-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/i386-user'
make[1]: Entering directory `/tmp/x/arm-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/arm-user'
make[1]: Entering directory `/tmp/x/armeb-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/armeb-user'
make[1]: Entering directory `/tmp/x/sparc-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/sparc-user'
make[1]: Entering directory `/tmp/x/ppc-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/ppc-user'
make[1]: Entering directory `/tmp/x/mips-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/mips-user'
make[1]: Entering directory `/tmp/x/mipsel-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/mipsel-user'
make[1]: Entering directory `/tmp/x/i386-softmmu'
gcc-3.4 -Wall -O2 -g -fno-strict-aliasing -I. -I..Review
Quoted 2 lines
(quoted diff) +0
-2-I/tmp/qemu-0.8.1/target-i386 -I/tmp/qemu-0.8.1 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64-D_LARGEFILE_SOURCE
Quoted 7 lines
-I/tmp/qemu-0.8.1/fpu -DHAS_AUDIO -I/tmp/qemu-0.8.1/slirp -c -o usb-linux.o/tmp/qemu-
0.8.1/usb-linux.c
In file included from/tmp/qemu-0.8.1/usb-linux.c:29:/usr/include/linux/usbdevice_fs.h:49: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:49: error: syntax error before '*'token
Quoted 3 lines
/usr/include/linux/usbdevice_fs.h:56: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:56: error: syntax error before '*'token
Quoted 3 lines
/usr/include/linux/usbdevice_fs.h:66: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:66: error: syntax error before '*'token
Quoted 3 lines
/usr/include/linux/usbdevice_fs.h:100: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:100: error: syntax error before '*'token
Quoted 1 line
/usr/include/linux/usbdevice_fs.h:109: error: syntax error before '}'token
Quoted 3 lines
/usr/include/linux/usbdevice_fs.h:116: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:116: error: syntax error before '*'token
Quoted 2 lines
/tmp/qemu-0.8.1/usb-linux.c: In function `usb_host_handle_control':/tmp/qemu-0.8.1/usb-linux.c:91: error: invalid application of `sizeof'to
Quoted 4 lines
incomplete type
usbdevfs_ctrltransfer' /tmp/qemu-0.8.1/usb-linux.c: In functionusb_host_handle_data':/tmp/qemu-0.8.1/usb-linux.c:110: error: storage size of 'bt' isn't known/tmp/qemu-0.8.1/usb-linux.c:121: error: invalid application of `sizeof'to
Quoted 4 lines
incomplete type
usbdevfs_bulktransfer' /tmp/qemu-0.8.1/usb-linux.c:110: warning: unused variablebt'/tmp/qemu-0.8.1/usb-linux.c: In function `usb_host_device_open':/tmp/qemu-0.8.1/usb-linux.c:185: error: storage size of 'ctrl' isn'tknown
Quoted 1 line
/tmp/qemu-0.8.1/usb-linux.c:188: error: invalid application of `sizeof'to
Quoted 7 lines
incomplete type
usbdevfs_ioctl' /tmp/qemu-0.8.1/usb-linux.c:185: warning: unused variablectrl' make[1]: *** [usb-linux.o] Error 1
make[1]: Leaving directory `/tmp/x/i386-softmmu'
make: *** [all] Error 1Quoted 6 lines
**
_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel--
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection._______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
Quoted 6 lines · Bill C. Riemers
Good guess, SuSE makes many modifications to the standard kernel. However, the kernel source is not the problem. I downloaded fresh kernel source from
www.kernel.org, and I still have the exact same error. Here are the relevant details:
Quoted 7 lines
QEMU version: qemu-0.8.1
Linux Kernel: 2.6.16.13
Operating System: SuSE 10.1
gcc version: 3.4.6
CPU: Amd Athlon(tm) Processor 3200+Bill
Hi Bill,
NOTE: Jim, if I am totally misrepresenting your comment, my apologies :)
I think Jim is pointing to the linux kernel headers, and not necessarily the kernel source.
The linux kernel headers that are used to build your local glibc, and hence even if you use the virgin kernel source and load that particular kernel, you will have to rebuild your glibc against those kernel sources.
You will probably have to symlink the relevant directories so that when you build your glibc, it will pick up the virgin headers instead of the SuSE modified ones.
Once you have a clean system, running on a virgin kernel, running on a glibc compiled against the kernel headers of that virgin kernel, and then attempt to compile qemu with gcc 3.x, you will likely not run into any problems.
If you still have problems, perhaps you need to recompile said gcc with the virgin headers too.
Hope to help,
Damien
Quoted 171 lines · Jim C. Brown
Quoted 144 lines
The issue is with your linux kernel headers.
Quoted 1 line · Doctor Bill
At first I thought the problem was that I was using gcc-4, so I
installed
Review
Quoted 5 lines
gcc-3.4.6, but I still get the same errors:
gcc-3.4 -Wall -O2 -g -fno-strict-aliasing -I. -I..
(quoted diff) +0
-2-I/tmp/qemu-0.8.1/target-i386 -I/tmp/qemu-0.8.1 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64-D_LARGEFILE_SOURCE
Quoted 7 lines
-I/tmp/qemu-0.8.1/fpu -DHAS_AUDIO -I/tmp/qemu-0.8.1/slirp -c -o usb-linux.o/tmp/qemu-
0.8.1/usb-linux.c
In file included from/tmp/qemu-0.8.1/usb-linux.c:29:/usr/include/linux/usbdevice_fs.h:49: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:49: error: syntax error before '*'token
Quoted 3 lines
/usr/include/linux/usbdevice_fs.h:56: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:56: error: syntax error before '*'token
Quoted 3 lines
/usr/include/linux/usbdevice_fs.h:66: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:66: error: syntax error before '*'token
Quoted 1 line
/usr/include/linux/usbdevice_fs.h:100: error: variable or field`__user'
Quoted 2 lines
declared void
/usr/include/linux/usbdevice_fs.h:100: error: syntax error before '*'token
Quoted 1 line
/usr/include/linux/usbdevice_fs.h:109: error: syntax error before '}'token
Quoted 1 line
/usr/include/linux/usbdevice_fs.h:116: error: variable or field`__user'
Quoted 2 lines
declared void
/usr/include/linux/usbdevice_fs.h:116: error: syntax error before '*'token
Quoted 2 lines
/tmp/qemu-0.8.1/usb-linux.c: In function `usb_host_handle_control':/tmp/qemu-0.8.1/usb-linux.c:91: error: invalid application of `sizeof'to
Quoted 3 lines
incomplete type
usbdevfs_ctrltransfer' /tmp/qemu-0.8.1/usb-linux.c: In functionusb_host_handle_data':/tmp/qemu-0.8.1/usb-linux.c:110: error: storage size of 'bt' isn'tknown
Quoted 1 line
/tmp/qemu-0.8.1/usb-linux.c:121: error: invalid application of `sizeof'to
Quoted 4 lines
incomplete type
usbdevfs_bulktransfer' /tmp/qemu-0.8.1/usb-linux.c:110: warning: unused variablebt'/tmp/qemu-0.8.1/usb-linux.c: In function `usb_host_device_open':/tmp/qemu-0.8.1/usb-linux.c:185: error: storage size of 'ctrl' isn'tknown
Quoted 1 line
/tmp/qemu-0.8.1/usb-linux.c:188: error: invalid application of `sizeof'to
Quoted 34 lines
incomplete type
usbdevfs_ioctl' /tmp/qemu-0.8.1/usb-linux.c:185: warning: unused variablectrl' make[1]: *** [usb-linux.o] Error 1
make[1]: Leaving directory `/tmp/x/i386-softmmu'
make: *** [all] Error 1
docbill@docbill003:/tmp/x> make
for d in i386-user arm-user armeb-user sparc-user ppc-user mips-user mipsel-user i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu mips-softmmu mipsel-softmmu arm-softmmu; do \
make -C $d all || exit 1 ; \
done
make[1]: Entering directory `/tmp/x/i386-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/i386-user'
make[1]: Entering directory `/tmp/x/arm-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/arm-user'
make[1]: Entering directory `/tmp/x/armeb-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/armeb-user'
make[1]: Entering directory `/tmp/x/sparc-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/sparc-user'
make[1]: Entering directory `/tmp/x/ppc-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/ppc-user'
make[1]: Entering directory `/tmp/x/mips-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/mips-user'
make[1]: Entering directory `/tmp/x/mipsel-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/mipsel-user'
make[1]: Entering directory `/tmp/x/i386-softmmu'
gcc-3.4 -Wall -O2 -g -fno-strict-aliasing -I. -I..Review
Quoted 2 lines
(quoted diff) +0
-2-I/tmp/qemu-0.8.1/target-i386 -I/tmp/qemu-0.8.1 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64-D_LARGEFILE_SOURCE
Quoted 7 lines
-I/tmp/qemu-0.8.1/fpu -DHAS_AUDIO -I/tmp/qemu-0.8.1/slirp -c -o usb-linux.o/tmp/qemu-
0.8.1/usb-linux.c
In file included from/tmp/qemu-0.8.1/usb-linux.c:29:/usr/include/linux/usbdevice_fs.h:49: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:49: error: syntax error before '*'token
Quoted 3 lines
/usr/include/linux/usbdevice_fs.h:56: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:56: error: syntax error before '*'token
Quoted 3 lines
/usr/include/linux/usbdevice_fs.h:66: error: variable or field `__user' declared void/usr/include/linux/usbdevice_fs.h:66: error: syntax error before '*'token
Quoted 1 line
/usr/include/linux/usbdevice_fs.h:100: error: variable or field`__user'
Quoted 2 lines
declared void
/usr/include/linux/usbdevice_fs.h:100: error: syntax error before '*'token
Quoted 1 line
/usr/include/linux/usbdevice_fs.h:109: error: syntax error before '}'token
Quoted 1 line
/usr/include/linux/usbdevice_fs.h:116: error: variable or field`__user'
Quoted 2 lines
declared void
/usr/include/linux/usbdevice_fs.h:116: error: syntax error before '*'token
Quoted 2 lines
/tmp/qemu-0.8.1/usb-linux.c: In function `usb_host_handle_control':/tmp/qemu-0.8.1/usb-linux.c:91: error: invalid application of `sizeof'to
Quoted 3 lines
incomplete type
usbdevfs_ctrltransfer' /tmp/qemu-0.8.1/usb-linux.c: In functionusb_host_handle_data':/tmp/qemu-0.8.1/usb-linux.c:110: error: storage size of 'bt' isn'tknown
Quoted 1 line
/tmp/qemu-0.8.1/usb-linux.c:121: error: invalid application of `sizeof'to
Quoted 4 lines
incomplete type
usbdevfs_bulktransfer' /tmp/qemu-0.8.1/usb-linux.c:110: warning: unused variablebt'/tmp/qemu-0.8.1/usb-linux.c: In function `usb_host_device_open':/tmp/qemu-0.8.1/usb-linux.c:185: error: storage size of 'ctrl' isn'tknown
Quoted 1 line
/tmp/qemu-0.8.1/usb-linux.c:188: error: invalid application of `sizeof'to
Quoted 7 lines
incomplete type
usbdevfs_ioctl' /tmp/qemu-0.8.1/usb-linux.c:185: warning: unused variablectrl' make[1]: *** [usb-linux.o] Error 1
make[1]: Leaving directory `/tmp/x/i386-softmmu'
make: *** [all] Error 1Quoted 18 lines
Quoted 6 lines
**
_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-develSignature · 8 lines
Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection. _______________________________________________ Qemu-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/qemu-devel------------------------------------------------------------------------
_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
The following message was forwarded to me:
-------------------------
Hello all,
there's a problem compiling usb-linux.c on SuSE 10.1 with the standard kernel headers (kernel 2.6.16.13-4-default from uname -r).
I'm using gcc 3.4.6 and the problem is an include file is missing in usb-linux.c
The missing h-file is <linux/compiler.h>. That inclusion needs to be written before the inclusion of <linux/usbdevice_fs.h>
Adding this include file the compiler is happy and all is ok.
regards,
Fausto
-------------------------------------------------------
This solution works. So it looks like the problem is simply a missing
header include in qemu-0.8.1 version. It has nothing to do with
recompiling glibc, or downloading different kernel source, or any other such non-sense.
Bill
Quoted 237 lines · Damien Mascord
Quoted 1 line · Bill C. Riemers
Good guess, SuSE makes many modifications to the standard
kernel. However,
Quoted 5 lines
the kernel source is not the problem. I downloaded fresh kernel source from
www.kernel.org, and I still have the exact same error. Here are the relevant details:Quoted 7 lines
QEMU version: qemu-0.8.1
Linux Kernel: 2.6.16.13
Operating System: SuSE 10.1
gcc version: 3.4.6
CPU: Amd Athlon(tm) Processor 3200+Bill
Hi Bill,
NOTE: Jim, if I am totally misrepresenting your comment, my apologies :)
I think Jim is pointing to the linux kernel headers, and not necessarily the kernel source.
The linux kernel headers that are used to build your local glibc, and hence even if you use the virgin kernel source and load that particular kernel, you will have to rebuild your glibc against those kernel sources.
You will probably have to symlink the relevant directories so that when you build your glibc, it will pick up the virgin headers instead of the SuSE modified ones.
Once you have a clean system, running on a virgin kernel, running on a glibc compiled against the kernel headers of that virgin kernel, and then attempt to compile qemu with gcc 3.x, you will likely not run into any problems.
If you still have problems, perhaps you need to recompile said gcc with the virgin headers too.
Hope to help,
Damien
Quoted 13 lines · Jim C. Brown
Quoted 12 lines
The issue is with your linux kernel headers.
Quoted 1 line · Doctor Bill
At first I thought the problem was that I was using gcc-4, so I
installed
Review
Quoted 5 lines
gcc-3.4.6, but I still get the same errors:
gcc-3.4 -Wall -O2 -g -fno-strict-aliasing -I. -I..
(quoted diff) +0
-2-I/tmp/qemu-0.8.1/target-i386 -I/tmp/qemu-0.8.1 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64-D_LARGEFILE_SOURCE
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
-I/tmp/qemu-0.8.1/fpu -DHAS_AUDIO -I/tmp/qemu-0.8.1/slirp -c -o usb-linux.o/tmp/qemu-
0.8.1/usb-linux.c
In file included from/tmp/qemu-0.8.1/usb-linux.c:29:/usr/include/linux/usbdevice_fs.h:49: error: variable or field`__user'
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
declared void
/usr/include/linux/usbdevice_fs.h:49: error: syntax error before '*'token
Quoted 1 line
/usr/include/linux/usbdevice_fs.h:56: error: variable or field`__user'
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
declared void
/usr/include/linux/usbdevice_fs.h:56: error: syntax error before '*'token
Quoted 1 line
/usr/include/linux/usbdevice_fs.h:66: error: variable or field`__user'
Quoted 9 lines
Quoted 9 lines
Quoted 2 lines
declared void
/usr/include/linux/usbdevice_fs.h:66: error: syntax error before '*'token
Quoted 1 line
/usr/include/linux/usbdevice_fs.h:100: error: variable or field`__user'
Quoted 2 lines
declared void
/usr/include/linux/usbdevice_fs.h:100: error: syntax error before '*'token
Quoted 1 line
/usr/include/linux/usbdevice_fs.h:109: error: syntax error before '}'Quoted 8 lines
Quoted 8 lines
token
Quoted 1 line
/usr/include/linux/usbdevice_fs.h:116: error: variable or field`__user'
Quoted 2 lines
declared void
/usr/include/linux/usbdevice_fs.h:116: error: syntax error before '*'token
Quoted 2 lines
/tmp/qemu-0.8.1/usb-linux.c: In function `usb_host_handle_control':/tmp/qemu-0.8.1/usb-linux.c:91: error: invalid application of`sizeof'
Quoted 6 lines
Quoted 6 lines
to
Quoted 3 lines
incomplete type
usbdevfs_ctrltransfer' /tmp/qemu-0.8.1/usb-linux.c: In functionusb_host_handle_data':/tmp/qemu-0.8.1/usb-linux.c:110: error: storage size of 'bt' isn'tknown
Quoted 1 line
/tmp/qemu-0.8.1/usb-linux.c:121: error: invalid application of`sizeof'
Quoted 7 lines
Quoted 7 lines
to
Quoted 4 lines
incomplete type
usbdevfs_bulktransfer' /tmp/qemu-0.8.1/usb-linux.c:110: warning: unused variablebt'/tmp/qemu-0.8.1/usb-linux.c: In function `usb_host_device_open':/tmp/qemu-0.8.1/usb-linux.c:185: error: storage size of 'ctrl' isn'tknown
Quoted 1 line
/tmp/qemu-0.8.1/usb-linux.c:188: error: invalid application of`sizeof'
Quoted 38 lines
Quoted 38 lines
to
Quoted 34 lines
incomplete type
usbdevfs_ioctl' /tmp/qemu-0.8.1/usb-linux.c:185: warning: unused variablectrl' make[1]: *** [usb-linux.o] Error 1
make[1]: Leaving directory `/tmp/x/i386-softmmu'
make: *** [all] Error 1
docbill@docbill003:/tmp/x> make
for d in i386-user arm-user armeb-user sparc-user ppc-user mips-user mipsel-user i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu mips-softmmu mipsel-softmmu arm-softmmu; do \
make -C $d all || exit 1 ; \
done
make[1]: Entering directory `/tmp/x/i386-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/i386-user'
make[1]: Entering directory `/tmp/x/arm-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/arm-user'
make[1]: Entering directory `/tmp/x/armeb-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/armeb-user'
make[1]: Entering directory `/tmp/x/sparc-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/sparc-user'
make[1]: Entering directory `/tmp/x/ppc-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/ppc-user'
make[1]: Entering directory `/tmp/x/mips-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/mips-user'
make[1]: Entering directory `/tmp/x/mipsel-user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/x/mipsel-user'
make[1]: Entering directory `/tmp/x/i386-softmmu'
gcc-3.4 -Wall -O2 -g -fno-strict-aliasing -I. -I..Review
Quoted 2 lines
(quoted diff) +0
-2-I/tmp/qemu-0.8.1/target-i386 -I/tmp/qemu-0.8.1 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64-D_LARGEFILE_SOURCE
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
-I/tmp/qemu-0.8.1/fpu -DHAS_AUDIO -I/tmp/qemu-0.8.1/slirp -c -o usb-linux.o/tmp/qemu-
0.8.1/usb-linux.c
In file included from/tmp/qemu-0.8.1/usb-linux.c:29:/usr/include/linux/usbdevice_fs.h:49: error: variable or field`__user'
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
declared void
/usr/include/linux/usbdevice_fs.h:49: error: syntax error before '*'token
Quoted 1 line
/usr/include/linux/usbdevice_fs.h:56: error: variable or field`__user'
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
declared void
/usr/include/linux/usbdevice_fs.h:56: error: syntax error before '*'token
Quoted 1 line
/usr/include/linux/usbdevice_fs.h:66: error: variable or field`__user'
Quoted 9 lines
Quoted 9 lines
Quoted 2 lines
declared void
/usr/include/linux/usbdevice_fs.h:66: error: syntax error before '*'token
Quoted 1 line
/usr/include/linux/usbdevice_fs.h:100: error: variable or field`__user'
Quoted 2 lines
declared void
/usr/include/linux/usbdevice_fs.h:100: error: syntax error before '*'token
Quoted 1 line
/usr/include/linux/usbdevice_fs.h:109: error: syntax error before '}'Quoted 8 lines
Quoted 8 lines
token
Quoted 1 line
/usr/include/linux/usbdevice_fs.h:116: error: variable or field`__user'
Quoted 2 lines
declared void
/usr/include/linux/usbdevice_fs.h:116: error: syntax error before '*'token
Quoted 2 lines
/tmp/qemu-0.8.1/usb-linux.c: In function `usb_host_handle_control':/tmp/qemu-0.8.1/usb-linux.c:91: error: invalid application of`sizeof'
Quoted 6 lines
Quoted 6 lines
to
Quoted 3 lines
incomplete type
usbdevfs_ctrltransfer' /tmp/qemu-0.8.1/usb-linux.c: In functionusb_host_handle_data':/tmp/qemu-0.8.1/usb-linux.c:110: error: storage size of 'bt' isn'tknown
Quoted 1 line
/tmp/qemu-0.8.1/usb-linux.c:121: error: invalid application of`sizeof'
Quoted 7 lines
Quoted 7 lines
to
Quoted 4 lines
incomplete type
usbdevfs_bulktransfer' /tmp/qemu-0.8.1/usb-linux.c:110: warning: unused variablebt'/tmp/qemu-0.8.1/usb-linux.c: In function `usb_host_device_open':/tmp/qemu-0.8.1/usb-linux.c:185: error: storage size of 'ctrl' isn'tknown
Quoted 1 line
/tmp/qemu-0.8.1/usb-linux.c:188: error: invalid application of`sizeof'
Quoted 28 lines
Quoted 21 lines
to
Quoted 7 lines
incomplete type
usbdevfs_ioctl' /tmp/qemu-0.8.1/usb-linux.c:185: warning: unused variablectrl' make[1]: *** [usb-linux.o] Error 1
make[1]: Leaving directory `/tmp/x/i386-softmmu'
make: *** [all] Error 1Quoted 6 lines
**
_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel--
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.Quoted 5 lines
_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-develQuoted 6 lines
------------------------------------------------------------------------
_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
Quoted 20 lines · Bill C. Riemers
The following message was forwarded to me:
-------------------------
Hello all,there's a problem compiling
usb-linux.con SuSE 10.1 with the standard kernel headers (kernel 2.6.16.13-4-default from uname -r).I'm using gcc 3.4.6 and the problem is an include file is missing in
usb-linux.cThe missing h-file is <
linux/compiler.h>. That inclusion needs to be written before the inclusion of <linux/usbdevice_fs.h>Adding this include file the compiler is happy and all is ok.
regards,
Fausto
-------------------------------------------------------
Quoted 6 lines
This solution works. So it looks like the problem is simply a missing
header include in qemu-0.8.1 version. It has nothing to do with
recompiling glibc, or downloading different kernel source, or any other such non-sense.Bill
Hi Bill,
Luckily it was as simple as that, my apologies for blowing it out of proportion here.
Cheers,
Damien