DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Yeah, you're describing the kmk way, without the 'debian/rules' file. yep, I sourced 'env.sh'. I tried it both ways, both using 'debian/rules' and with kmk. I either get hung up on 'alloc.o' or on 'crc32.o'. Once I actually got the binaries in debian form, and those are the ones I tried to install. Can I use a version of virtualbox that I've compiled for a different kernel? I've got a couple of those.
I don't know where the binding to the kernel is. I suspect it's only in vboxdrv.ko, but I don't know. For sure, that will need to be for the running kernel. One thing is that I think a bad build can damage the thing beyond repair. The clean doesn't seem to work right. At one point before I got it working, I just re-downloaded the whole thing and started over.
This is a snippet from the beginning of debian/rules:
Code:
# Ubuntu dapper: gcc-4.0 does not work with recompiler, use gcc-3.4 instead
configure: debian/configure-stamp
debian/configure-stamp:
dh_testdir
cd $(vboxroot) && ./configure --odir=$(current)/debian --disable-qt3 $(if \
$(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) $(if \
$(filter _Ubuntu_dapper,$(debrel)),--with-gcc=gcc-3.4 --with-g++=g++-3.4,) $(if \
$(shell test $(gccvmaj) -eq 4 -a $(gccvmin) -gt 2 -o $(gccvmaj) -gt 4 && echo "yes"),--with-gcc-compat=/usr/bin/gcc-3.4,) $(if \
$(filter _xandros4.1 _ucs1.3,$(debrel)),--disable-sdl-ttf,) $(if \
$(HEADLESS),--build-headless,) $(if $(DEBUG),--build-debug,)
touch debian/configure-stamp
I couldn't figure a way to pass the --with-gcc-compat= flag, so I wrote it into debian/rules. I actually got it to compile once. Now I cannot get it to do so. I think the command to execute is just 'fakeroot debian/rules binary' . That's what I typed. When I install that package I'm asked to recompile the kernel module by typing '/etc/init.d/vboxdrv setup' as root. I did that too and I came up with a message about...
Code:
/usr/src/linux-headers-2.6.27-rc8-d1/arch/x86/Makefile_32.cpu: No such file or directory
I think that's everything, but if there's a question that I can answer that would be great.
OK, I'm trying it the Debian way this time. I'm starting with a clean bzip and running "fakeroot debian/rules binary". However, I did change the rules file to compat 4.1 instead of 4.2. So far I'm not seeing a problem. When/if this completes, I'll do it all over again with 4.2, as I've just downloaded that version of gcc. I'll let you know what I get.
Tomorrow I'm going to compile the kernel over again. For now I've got to go. Thanks for your help.
I doubt it's the kernel. It's probably some dependency issue. I did get a failure when I first tried to compile with fakeroot, and added the "devscripts" package. That brought a bunch of other stuff in with it, and it's been compiling with no problems, since.
It placed a menu item at the top, and that runs with no obvious errors at least in the frontend. I'm copying over an image, and if it fails on that I'll let you know.
Added:
Oh, and I did turn hardening off in debian/LocalConfig.kmk, but I doubt that had any impact. I can redo it with that back on if it makes any difference.
Last edited by Quakeboy02; 10-06-2008 at 01:13 AM.
Reason: Added
Welll, I built the kernel over again, and VirtualBox-2.0.2 still won't compile. I did get it to compile under a stock 2.6.26 kernel so I want to try out rebuilding the 2.6.27 one or two more times. I'm on an amd64 machine, but I'm running an i686 kernel, so I'm going to try to set options like '--arch=' and the like. It may do no good. Still the message that really gets to me is from when I try to build the vboxdrv from the deb package, or by typing '/etc/init.d/vboxdrv setup'. It always says I'm missing some file called 'Makefile_32.cpu' from the headers directories. This leads me to think that there's something wrong with my headers. Maybe there's another explanation. (??)
Often in cases like this, you're doing something that seems trivial to you, but you're not telling me. You don't need to do anything special to get kernel headers. Those exist from the fact that you have compiled your own kernel. If you are doing something special to get kernel headers, then that's likely the source of your problem. I can't see you compiling your kernel, so I don't know what steps you actually take, but we went over that, and your compile string looked good. Assuming that all you do is "dpkg -i xxxxxx.deb" and nothing else, then I don't know what's happening to break it. You aren't doing anything manually to /lib/modules/`uname -r` are you? If so, run "sudo rm -r /lib/modules/`uname -r`" then rerun the "sudo dpkg -i xxxxxx.deb" and then reboot. This will clean up /lib/modules and repopulate it properly. I'm kinda running out of ideas here.
I don't know if the elaborate command made the difference, or if it was the more up-to-date kernel source, but it worked. I have an amd64 processor, but I use a i686 kernel. I thought that there was some confusion on the part of 'make-kpkg' about what kind of kernel to build, but I could be wrong, it could be the newer kernel source. Anyway with virtualbox I edited debian/rules as I show below so that '--with-gcc-compat=/usr/bin/gcc-3.4' gets passed to 'configure'.
Code:
# Ubuntu dapper: gcc-4.0 does not work with recompiler, use gcc-3.4 instead
configure: debian/configure-stamp
debian/configure-stamp:
dh_testdir
cd $(vboxroot) && ./configure --odir=$(current)/debian --disable-qt3 $(if \
$(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) $(if \
$(filter _Ubuntu_dapper,$(debrel)),--with-gcc=gcc-3.4 --with-g++=g++-3.4,) $(if \
$(shell test $(gccvmaj) -eq 4 -a $(gccvmin) -gt 2 -o $(gccvmaj) -gt 4 && echo "yes"),--with-gcc-compat=/usr/bin/gcc-3.4,) $(if \
$(filter _xandros4.1 _ucs1.3,$(debrel)),--disable-sdl-ttf,) $(if \
$(HEADLESS),--build-headless,) $(if $(DEBUG),--build-debug,)
touch debian/configure-stamp
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.