[Pkg-virtualbox-devel] Some comments about the build process

Hilko Bengen bengen at debian.org
Wed Dec 12 15:29:02 UTC 2007


Michael Meskes <meskes at debian.org> writes:

>> The BUILD_PLATFORM_* and BUILD_TARGET_* variables can be detected from
>> within debian/rules using dpkg-architecture(1) and a few make
>> functions. I implemented this for my own 1.4.0 packages and it worked
>> fine on both i386 and amd64.
>
> If this simplifies things I'm all for it. But without seeing the
> differences (keep in mind that I didn't do the initial packaging) it's
> hard to judge for me. Maybe Patrick and/or Daniel could comment.

The only meaningful thing that configure does is putting same makefile
variables into a file that gets included by the build system[1]. These
variables are pretty much self-explanatory to anyone who has used a C
compiler on Unix before and some of them don't even make sense
(/usr/local ... ). Plus, they are known beforehand on a Debian system.

"Show me the code", I know. :-) I will try to adapt it to the current
svn stuff and report back.

>> The official (non-free) VirtualBox packages put all the shared
>> libraries into /usr/lib that the binaries are linked against, making
>> mucking with LD_LIBRARY_PATH unnecessary. I recall trying to
>> accomplish this for my packages, but I think I never got anywhere...
> Frankly I'm not sure whether this is really a good idea. 

Let's see...

$ dpkg --contents virtualbox_1.5.2-25433_Debian_etch_i386.deb|grep '\.so$'
-rw-r--r-- root/root    380332 2007-10-18 10:15 ./usr/lib/VBoxRT.so
-rw-r--r-- root/root     22516 2007-10-18 10:15 ./usr/lib/VBoxSharedFolders.so
-rw-r--r-- root/root    154520 2007-10-18 10:15 ./usr/lib/VBoxVRDP.so
-rw-r--r-- root/root    542208 2007-10-18 10:15 ./usr/lib/VBoxDD.so
-rw-r--r-- root/root     47060 2007-10-18 10:15 ./usr/lib/VBoxXML.so
-rw-r--r-- root/root      7316 2007-10-18 10:15 ./usr/lib/virtualbox/components/VBoxSVCM.so
-rw-r--r-- root/root    554732 2007-10-18 10:15 ./usr/lib/virtualbox/components/VBoxC.so
-rw-r--r-- root/root    107704 2007-10-18 10:15 ./usr/lib/virtualbox/components/VBoxXPCOMIPCC.so
-rw-r--r-- root/root    161380 2007-10-18 10:15 ./usr/lib/VBoxDD2.so
-rw-r--r-- root/root     28092 2007-10-18 10:15 ./usr/lib/VBoxSharedClipboard.so
-rw-r--r-- root/root     83576 2007-10-18 10:15 ./usr/lib/VBoxDDU.so
-rw-r--r-- root/root    991904 2007-10-18 10:15 ./usr/lib/VBoxXPCOM.so
-rw-r--r-- root/root    946552 2007-10-18 10:15 ./usr/lib/VBoxVMM.so
-rw-r--r-- root/root    522520 2007-10-18 10:15 ./usr/lib/VBoxREM.so
-rw-r--r-- root/root      5656 2007-10-18 10:15 ./usr/lib/VRDPAuth.so
-rw-r--r-- root/root     28820 2007-10-18 10:15 ./usr/lib/VBoxKeyboard.so

I'm not really *sure* this is a good idea, either. Shouldn't the
filenames start with "lib"?

>> Finally, I think I might have found a way to cross-compile Windows
>> drivers on a Debian system. This would allow us to ship the .iso as
>> part of the package, but I haven't worked out the details yet.
> Would you mind telling us how?

Someone on IRC told me that he uses the mingw toolchain to
cross-compile drivers but that the header files for doing so may not
be complete (and compatible with the Windows DDK header files) for all
sorts of drivers. I'll try, but this is still a big "maybe".

Cheers,
-Hilko

[1] configure output determined a current unstable machine (i386):

VBOX_OSE                       := 1
VBOX_WITH_TESTSUITE            := 
VBOX_WITH_WIN32_ADDITIONS      := 
VBOX_WITH_LINUX_ADDITIONS      := 1

TOOL_GCC32_CC                  := gcc
TOOL_GCC32_AS                  := gcc
TOOL_GCC32_LD                  := gcc
TOOL_GXX32_CC                  := gcc
TOOL_GXX32_AS                  := gcc
TOOL_GCC32_CXX                 := g++
TOOL_GXX32_CXX                 := g++
TOOL_GXX32_LD                  := g++
VBOX_AS86                      := /usr/bin/as86
VBOX_BCC                       := /usr/bin/bcc -B /usr/bin/
VBOX_IASLCMD                   := /usr/bin/iasl
VBOX_XSLTPROC                  := /usr/bin/xsltproc
LIB_PTHREAD                    := pthread
SDK_VBOX_XALAN_LIBS            := xalan-c
SDK_VBOX_XALAN_LIBPATH         := /usr/local/lib
SDK_VBOX_XALAN_INCS            := /usr/local/include
SDK_VBOX_XERCES_LIBS           := xerces-c
SDK_VBOX_XERCES_LIBPATH        := /usr/local/lib
SDK_VBOX_XERCES_INCS           := /usr/local/include
VBOX_LIBIDL_CONFIG             := PKG_CONFIG_PATH=/usr/lib/pkgconfig /usr/bin/libIDL-config-2
SDK_VBOX_ZLIB_LIBS             := z
SDK_VBOX_ZLIB_INCS             := 
LIB_SDK_LIBSDL_SDL             := SDL
SDK_LIBSDL_LIBPATH             := /usr/lib
LIB_SDK_LIBSDL_SDLMAIN         := SDLmain
SDK_LIBSDL_INCS                := /usr/include/SDL
LIB_XCURSOR                    := Xcursor
QTDIR                          := /usr/share/qt3
VBOX_WITHOUT_LINUX_COMPILER_H  := 1



More information about the Pkg-virtualbox-devel mailing list