LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-05-2008, 04:56 PM   #16
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141

Quote:
Originally Posted by radiodee1 View Post
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.
 
Old 10-05-2008, 05:01 PM   #17
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 675

Original Poster
Blog Entries: 11

Rep: Reputation: 36
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.
 
Old 10-05-2008, 05:37 PM   #18
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
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.
 
Old 10-05-2008, 05:48 PM   #19
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 675

Original Poster
Blog Entries: 11

Rep: Reputation: 36
Tomorrow I'm going to compile the kernel over again. For now I've got to go. Thanks for your help.
 
Old 10-05-2008, 05:56 PM   #20
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by radiodee1 View Post
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.
 
Old 10-06-2008, 01:11 AM   #21
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Here's a little more info. I got it to work using debian/rules. Here are the steps I used, but I won't promise that they are the minimal set.
Code:
debian/rules configure
source debian/env.sh
fakeroot debian/rules binary
cd ..
dpkg -i whateveritscalled.deb
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
 
Old 10-06-2008, 05:09 PM   #22
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 675

Original Poster
Blog Entries: 11

Rep: Reputation: 36
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. (??)
 
Old 10-06-2008, 05:26 PM   #23
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
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.
 
Old 10-06-2008, 05:29 PM   #24
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
OK, just for grins, remove "kernel_headers" from your kernel compile string. It's probably not it, but just remove it anyway.
 
Old 10-10-2008, 09:54 AM   #25
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 675

Original Poster
Blog Entries: 11

Rep: Reputation: 36
I actually got virtualbox-2.0.2 to compile by downloading kernel 2.6.27-rc9-git2 and compiling it with the following command:
Code:
DEB_HOST_ARCH=i386 make-kpkg --arch i386 --cross_compile - --rootcmd fakeroot --initrd --append-to-version mytest kernel_image kernel_headers
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
Thanks Quakeboy02 for your advice.

Last edited by radiodee1; 10-10-2008 at 09:59 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
modprobe pciehp hangs 2.6.26.rc8 danny_iphase Linux - Newbie 0 07-23-2008 09:54 AM
LXer: 2.6.25-rc8,"No Cute April 1st Shenanigans" LXer Syndicated Linux News 0 04-02-2008 07:30 PM
2.6.25-rc8, Ralink, and Booting marnold Slackware 1 04-02-2008 02:10 PM
LXer: 2.6.24-rc8,"A Final Shakedown" LXer Syndicated Linux News 0 01-16-2008 09:40 AM
Configure error on xine-lib-rc8 linux-rulz Linux - Software 12 12-24-2004 03:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 01:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration