Skip to contentSkip to conversation

build problems with linux usb support?

Qemu-devel Troy Benjegerdes 3 participants 5 messages Mar 8, 2006 – Mar 23, 2006

lore
Share & tools
lore
#0 lore raw

I'm trying to build qemu from cvs on a Debian-amd64 system, and having errors like this:

gcc-3.4 -Wall -O2 -g -fno-strict-aliasing -I. -I/afs/scl.ameslab.gov/user/troy/src/qemu-cvs/target-i386 -I/afs/scl.ameslab.gov/user/troy/src/qemu-cvs -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/afs/scl.ameslab.gov/user/troy/src/qemu-cvs/fpu -DHAS_AUDIO -I/afs/scl.ameslab.gov/user/troy/src/qemu-cvs/slirp -c -o usb-linux.o /afs/scl.ameslab.gov/user/troy/src/qemu-cvs/usb-linux.c
In file included from /usr/include/asm-x86_64/div64.h:1,

                 from /usr/include/asm/div64.h:8,
                 from /usr/include/linux/jiffies.h:9,
                 from /usr/include/linux/sched.h:12,
                 from /usr/include/asm-x86_64/compat.h:8,
                 from /usr/include/asm/compat.h:8,
                 from /usr/include/linux/compat.h:15,
                 from /usr/include/linux/usbdevice_fs.h:35,
                 from

/afs/scl.ameslab.gov/user/troy/src/qemu-cvs/usb-linux.c:30:
/usr/include/asm-generic/div64.h:54:3: #error do_div() does not yet support the C64

The only think I can track down so far is that BITS_PER_LONG is only defined in /usr/include/asm-x86_64/types.h if __KERNEL__ is also set.

What other linux distros/headers work with the current qemu cvs usb code?

Thanks.

#1 lore raw

Hi,

Quoted 3 lines · Troy Benjegerdes

/afs/scl.ameslab.gov/user/troy/src/qemu-cvs/usb-linux.c:30:
/usr/include/asm-generic/div64.h:54:3: #error do_div() does not yet support the C64

You really try to make QEmu run on a C64? Wow!

;-) Sorry, could not resist,
Dscho

#2 lore raw
In reply to Troy Benjegerdes
Quoted 5 lines · Troy Benjegerdes

The only think I can track down so far is that BITS_PER_LONG is only defined in /usr/include/asm-x86_64/types.h if __KERNEL__ is also set.

What other linux distros/headers work with the current qemu cvs usb code?

I've just been disabling USB support by a local patch and hoping someone else fixed this :-)

Signature · 2 lines
Daniel Jacobowitz
CodeSourcery
#3 lore raw
Quoted 9 lines · Daniel Jacobowitz
Quoted 5 lines · Troy Benjegerdes

The only think I can track down so far is that BITS_PER_LONG is only defined in /usr/include/asm-x86_64/types.h if __KERNEL__ is also set.

What other linux distros/headers work with the current qemu cvs usb code?

I've just been disabling USB support by a local patch and hoping someone else fixed this :-)

Would you mind posting the 'disable usb' patch?

Right now I am resorting to gross things like building on a redhat box and installing the binaries on debian.

#4 lore raw
Quoted 8 lines · Troy Benjegerdes
Quoted 7 lines · Daniel Jacobowitz
Quoted 5 lines · Troy Benjegerdes

The only think I can track down so far is that BITS_PER_LONG is only defined in /usr/include/asm-x86_64/types.h if __KERNEL__ is also set.

What other linux distros/headers work with the current qemu cvs usb code?

Quoted 7 lines
Quoted 2 lines

I've just been disabling USB support by a local patch and hoping someone else fixed this :-)

Would you mind posting the 'disable usb' patch?

Right now I am resorting to gross things like building on a redhat box and installing the binaries on debian.

Trivial:

usb-linux.c 2005-11-26 19:32:59.000000000 -0500 renamed from usb-linux.c 2005-11-26 19:32:55.000000000 -0500 +1 -1
Index: qemu/usb-linux.c
===================================================================
@@ -23,7 +23,7 @@
  */
 #include "vl.h"
 
-#if defined(__linux__)
+#if 0 && defined(__linux__)
 #include <dirent.h>
 #include <sys/ioctl.h>
 #include <linux/usbdevice_fs.h>
Signature · 2 lines
Daniel Jacobowitz
CodeSourcery