LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Got error in compiling kqemu with qemu (https://www.linuxquestions.org/questions/linux-software-2/got-error-in-compiling-kqemu-with-qemu-436911/)

depam 04-19-2006 08:02 PM

Got error in compiling kqemu with qemu
 
HI!

I am using Mepis 3.4.3. I downloaded kqemu and qemu 0.8. After compiling qemu, I typed modprobe kqemu and this is what is get:

FATAL: Error inserting kqemu (/lib/modules/2.6.15-1-586tsc/misc/kqemu.ko): Unknown symbol in module, or unknown parameter (see dmesg)

WHen I typed dmesg | tail -5, i get:

kqemu: Unknown symbol page_address
kqemu: Unknown symbol page_address
kqemu: Unknown symbol page_address
kqemu: Unknown symbol page_address

Anyone had the same problem and was able to solve it?

unSpawn 04-24-2006 09:21 AM

IIGC page_address() is in linux/mm.h, so that could mean you don't have a proper kernel source installed, or have multiple sources but not the proper one symlinked? Could try configure and supply the right path with --kernel-path=/some/path. Also if it won't work with a MEPIS-supplied kernel, try getting the latest stable from kernel.org and see if it compiles against that one.

depam 04-24-2006 08:39 PM

Hi! I get the following errors when I configure the qemu.

/usr/src/linux-headers-2.6.15-1-586tsc/scripts/Makefile.modpost:38: .config: No such file or directory
make[3]: *** No rule to make target `.config'. Stop.
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.15-1-586tsc'
make[1]: *** [kqemu.ko] Error 2
make[1]: Leaving directory `/root/qemu-0.8.0/kqemu'
make: *** [all] Error 2

I believe I have downloaded the correct source and headers..Any help?

unSpawn 04-25-2006 12:13 PM

I think you need to install the source for your kernel, that would be something like "linux-source-2.6.15-1-586tsc-something.deb". If there's none, get a pristine 2.6.x source from kernel.org. Unfortunately you will have to install that kernel to be sure all is synced that needs to be synced. If you manage to get hold of linux-source-2.6.15-1-586tsc make sure it's linked as the current kernel to /usr/src/linux. Then you probably will need to massage the source a bit running "make oldconfig" before you continue.

depam 04-26-2006 08:28 AM

unSpawn,

Here's what I did. I downloaded linux-headers-2.6.15-1-586tsc and extracted linux-source-2.6.15-1-586tsc. I did make oldconfig and still unsuccessful. I will try to compile a new kernel. Are you saying that kqemu and qemu is not compatible with the current Mepis 3.4.3's kernel? Have tried all the resources I got from the net but it didn't work on me.

unSpawn 04-26-2006 08:39 AM

I did make oldconfig and still unsuccessful.
Please, I know this is straining, but be verbose when you say "still unsuccessful". I'm kinda low on ESP today. If you need to post loglines/errors but you can't get them try this: "make oldconfig 2>&1|tee make_oldconfig.tee". This will show all output to your screen and logging them at the same time to the file named make_oldconfig.tee. Now you can copy and paste from there. The "anycommand 2>&1|tee logfile" works with about everything, so it'll come in handy later when you encounter ./configure or make errors.


I will try to compile a new kernel.
Let's see some errors first?


Are you saying that kqemu and qemu is not compatible with the current Mepis 3.4.3's kernel?
Qemu has no dependencies in the kernel as far as I know. Kqemu needs the kernel source for the current kernel. It *might* be that it needs a "slightly massaged source", "make oldconfig" builds kernel + modules which could take away problems Kqemu has now.

depam 04-27-2006 08:30 AM

Unspawn,

The make olconfig finished without any errors. When I try to type in ./configure, I got a good output and it seems kqemu and SDL is set to yes. After typing make in qemu directory, the following errors was displayed.

/usr/src/linux-headers-2.6.15-1-586tsc/scripts/Makefile.modpost:38: .config: No such file or directory
make[3]: *** No rule to make target `.config'. Stop.
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.15-1-586tsc'
make[1]: *** [kqemu.ko] Error 2
make[1]: Leaving directory `/root/qemu-0.8.0/kqemu'
make: *** [all] Error 2

unSpawn 04-27-2006 10:23 AM

Is there a kernel config file "/usr/src/linux-headers-2.6.15-1-586tsc/.config" ?

depam 04-27-2006 07:11 PM

Yes there is..This file was created after I issued the command make oldconfig.

unSpawn 04-28-2006 03:23 AM

OK. While I can't see why the kernel source lives in "/usr/src/linux-headers-2.6.15-1-586tsc" instead of "/usr/src/linux-2.6.15-1-586tsc" please try a "make" in the kernel source dir. The "Makefile.modpost" error should be gone then. When done try a "./configure" and "make" in your Qemu source dir again and please record full output of both commands.

depam 04-29-2006 09:22 PM

I don't know why Mepis 3.4.3's linux-header is linux-header-2.6.15-1tsc while the source is just linux-source-2.6.15-1. I don't know if it makes sense. I mean shouldn't be the header and the same be the same? I searched the synaptic but the linux-source-2.6.15tsc is not there. I've successfully installed VMWare Server by specifying the c headers to /lib/modules/2.6.15/build/include instead of /lib/modules/2.6.15tsc/build/include...I still can't install the kqemu module.

unSpawn 04-30-2006 06:43 AM

No, it's not that. The package "linux-headers" supplies kernel structures necessary for compiling userland applications. Package linux-source is the kernel source itself and necessary for say rebuilding your kernel or adding modules. What I can't "get" is that the Qemu build process somehow ends up using files in /usr/src/linux-headers-2.6.15-1-586tsc and can't find the ".config". As far as I know the only ".config" one would use is the one that governs building the kernel, living at /usr/src/linux-source-2.6.15tsc/.config ...

Is there a kernel config file "/usr/src/linux-headers-2.6.15-1-586tsc/.config" ?
Uh. That was a stupid question. Thinking about .config, I didn't tell you to copy over used or previous .config in the root of /usr/src/linux-source-2.6.15tsc before doing "make oldconfig". Sorry for that. Maybe you got one for the current kernel in /boot, or maybe you've got generic ones in a subdirectory of /usr/src/linux-source-2.6.15tsc or one from an older kernel source. If you want to try that again, cool. OTOH, if the .config *is* in the linux-source directory, and you're frustrated and fed up by now it doesn't work automagically and all that and you can't stomach trying the other option (making and installing a "clean" kernel source from kernel.org) just say so...

depam 05-01-2006 07:02 AM

Unspawn,

I typed in make oldconfig from the /usr/src/linux-source and the .config was automatically generated. After that, I did a "make" command and still ain't working. I also tried downloading a new kernel and rebuilding, adding it in my /boot. Still ain't working. I think I still need to install packages because the error tells me that SDL is not supported and I need to have it. Here's cool, I tried instaling kqemu and qemu in Ubuntu and without rebuilding the kernel, it worked fine. It was installed in a breeze. What I noticed is that qemu and kqemu still ain't that fast as the VMWare. I also tried installing VMWare in Ubuntu and worked fine. I', just having difficulty installing it Mepis. I tried installing VMWare in Mepis and after rebuilding the kernel, it worked perfectly.

But hey, I really appreciate all your patience in me. I know answering questions like this one isn't really easy for anyone out there. Someone might just ignore me but you really gave me hope. I will try again tomorrow and hope I to get it as you instructed. More power to you man and to all those who give patiently answer newbies like me. A big thanks.

unSpawn 05-01-2006 08:44 AM

I think I still need to install packages because the error tells me that SDL is not supported and I need to have it.
That's probably just the sdl-devel package you're missing.


What I noticed is that qemu and kqemu still ain't that fast as the VMWare.
Well, there's some trade-off's in each implementation I guess. I regularly run Qemu images in Linux and while it's not "fast" it's acceptable for me because most of the time I don't need to work GUI stuff. I do run GSX sometimes but that's on a SMP box, so I can't really compare. The most important difference to me is that Qemu is FOSS and VMware, in spite of what the offer, and with all the consequences (problems) is not. That's the main reason I like to help people run Qemu or choose something else according to specs like Xen, Vserver, UML or whatever other FOSS solutions are available. Besides, the more people choose FOSS options the bigger the movement gets and the harder VMware will need to try to make a business.


I really appreciate all your patience in me.
Thanks. This thread definately *is* an exercise in patience for me (not your fault, OK), and that's cool with me. My Pantheon know damn well I need the exercise ;-p

BTW, was there a reason you didn't want this thread in the LQ MEPIS forum?

depam 05-02-2006 07:33 AM

I've heard about Xen and someone told me that it can only virtualize Linux OS. One of my friends even told me of its near-native performance. Does qemu support most of the USB Devices (bluetooth, wireless USB, webcams, mobile phones). I don't know if VMWare can do those..I also think the suspend button in VMWare is cool though I haven't tried it in qemu (not sure if its supported). Hope you won't get tired on teaching people like me. Thanks.


All times are GMT -5. The time now is 03:22 PM.