Hello,

Apologies for sending "rich text" of the same email previously. That
was an accident.
Here should be the plain text now.

Due to upstream issues, Virtualbox is not available on bookworm.
I have an urgent business use case, that required virtualbox to be installed
on Debian 12 bookworm, as soon as possible.

However, I am not able to compile virtual box on Debian 12 that easily,
due to the error:

"/usr/share/kBuild/footer-inherit-uses-tools.kmk:1012: *** kBuild:
Cannot find include file for the SDK 'LIBSDL2'!"

I have shown the details below. Any advice would be appreciated, thank you.

Regards.
Ian

------------------------------------------------------------------------------------------------
1) Show lsb_release
------------------------------------------------------------------------------------------------
$ lsb_release -d
No LSB modules are available.
Description: Debian GNU/Linux 12 (bookworm)

------------------------------------------------------------------------------------------------
2) Edit sources.list so that it points to sid
------------------------------------------------------------------------------------------------
deb-src http://deb.debian.org/debian sid ... ... ...

------------------------------------------------------------------------------------------------
3) When I do apt-get source virtualbox, I get the source in sid
------------------------------------------------------------------------------------------------
$ apt source virtualbox
Reading package lists... Done
NOTICE: 'virtualbox' packaging is maintained in the 'Git' version
control system at:
https://salsa.debian.org/pkg-virtualbox-team/virtualbox.git
Please use:
git clone https://salsa.debian.org/pkg-virtualbox-team/virtualbox.git
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 78.7 MB of source archives.
Get:1 http://deb.debian.org/debian sid/contrib virtualbox 7.0.8-dfsg-2
(dsc) [3,537 B]
Get:2 http://deb.debian.org/debian sid/contrib virtualbox 7.0.8-dfsg-2
(tar) [78.6 MB]
Get:3 http://deb.debian.org/debian sid/contrib virtualbox 7.0.8-dfsg-2
(diff) [78.9 kB]
Fetched 78.7 MB in 13s (5,927 kB/s)
dpkg-source: info: extracting virtualbox in virtualbox-7.0.8-dfsg
dpkg-source: info: unpacking virtualbox_7.0.8-dfsg.orig.tar.xz
dpkg-source: info: unpacking virtualbox_7.0.8-dfsg-2.debian.tar.xz
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying 01-build-arch.patch
dpkg-source: info: applying 02-gsoap-build-fix.patch
dpkg-source: info: applying 04-vboxdrv-references.patch
dpkg-source: info: applying 06-xsession.patch
dpkg-source: info: applying 07-vboxnetflt-reference.patch
dpkg-source: info: applying 12-make-module.patch
dpkg-source: info: applying 13-module-mismatch.patch
dpkg-source: info: applying 16-no-update.patch
dpkg-source: info: applying 23-remove-invalid-chars-check.patch
dpkg-source: info: applying 27-hide-host-cache-warning.patch
dpkg-source: info: applying 28-no-selinux-fedora.patch
dpkg-source: info: applying 32-disable-guest-version-check.patch
dpkg-source: info: applying 35-libvdeplug-soname.patch
dpkg-source: info: applying 36-fix-vnc-version-string.patch
dpkg-source: info: applying 37-do-not-run-if-not-in-vm.patch
dpkg-source: info: applying python3.11.patch
dpkg-source: info: applying add-lzma.patch

I assume that the patches should be fine for Debian 12.

------------------------------------------------------------------------------------------------
4) I checked whether I have installed all the dependencies for build,
I seem to be ok.
------------------------------------------------------------------------------------------------
$ sudo apt-get build-dep virtualbox
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

------------------------------------------------------------------------------------------------
5) Begin the build process ...
------------------------------------------------------------------------------------------------
$ dpkg-buildpackage --check-builddeps --build=binary --no-sign
dpkg-buildpackage: info: source package virtualbox
dpkg-buildpackage: info: source version 7.0.8-dfsg-2
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Gianfranco Costamagna
<locutusofb...@debian.org>
dpkg-buildpackage: info: host architecture amd64
 dpkg-source --before-build .
 fakeroot debian/rules clean
dh clean --with python3
dh: warning: The target override_dh_systemd_enable references a now
obsolete command and will not be run! (Marked by debhelper, will be an
error in compat 13)
   debian/rules override_dh_auto_clean
make[1]: Entering directory
'/home/vbox/virtualbox-7.0.8-dfsg-2/virtualbox-7.0.8-dfsg'
dh_auto_clean
# Cleaning package
rm -rf out
rm -f build-stamp
rm -f debian/virtualbox.README.Debian debian/README.Debian.html
rm -f debian/virtualbox-dkms.install
rm -f debian/virtualbox-dkms.links
find . -name "*.pyc" -exec rm -f {} \;
make[1]: Leaving directory
'/home/vbox/virtualbox-7.0.8-dfsg-2/virtualbox-7.0.8-dfsg'
   dh_clean
 debian/rules build
dh build --with python3
dh: warning: The target override_dh_systemd_enable references a now
obsolete command and will not be run! (Marked by debhelper, will be an
error in compat 13)
   dh_update_autotools_config
   dh_autoreconf
   debian/rules override_dh_auto_configure
make[1]: Entering directory
'/home/vbox/virtualbox-7.0.8-dfsg-2/virtualbox-7.0.8-dfsg'
Building for Debian/bookworm
mkdir -p out
./configure \
    --ose \
    --odir=/home/vbox/virtualbox-7.0.8-dfsg-2/virtualbox-7.0.8-dfsg/out \
    --with-linux="/usr" \
    --disable-kmods \
    --enable-webservice \
    --enable-vde \
    --enable-vnc
Checking for environment: Determined build machine: linux.amd64,
target machine: linux.amd64, OK.
Checking for kBuild: found, OK.
Checking for gcc: found version 12.2.0, OK.
Checking for Open Watcom:
  ** Open Watcom was not found, using alternative BIOS sources!
Checking for iasl: found version 20200925, OK.
Checking for yasm: found version 1.3.0, OK.
Checking for xslt: found, OK.
Checking for pthread: found, OK.
Checking for libxml2: found version 2.9.14, OK.
Checking for libIDL: found version 0.8.14, OK.
Checking for zlib: found version 1.2.13, OK.
Checking for liblzf: found LZF API version 1.5, OK.
Checking for ssl: found version OpenSSL 3.0.9 30 May 2023, OK.
Checking for libcurl: found version 7.88.1, OK.
Checking for libvpx: found version 1.12.0, OK.
Checking for libtpms: found, OK.
Checking for liblzma: found, OK.
Checking for libpng: found version 1.6.39, OK.
Checking for SDL: found version 1.2.15, OK.
Checking for X libraries: found, OK.
Checking for Xcursor: found, OK.
Checking for Xinerama: found, OK.
Checking for Xrandr: found, OK.
Checking for Xmu: found, OK.
Checking for Mesa / GLU: found (inactive), OK.
Checking for Qt5: found version 5.15.8, OK.
Checking for Qt5 devtools: found version moc 5.15.8, OK.
Checking for Python support: found version 3.11.2, OK.
Checking for Java support: OK.
Checking for PulseAudio: found version 16.1.0 API version 12, OK.
Checking for static stc++ library: found, OK.
Checking for ALSA: found version 1.2.8, OK.
Checking for libdevmapper: found version 1.02.185 (2022-05-18), OK.
Checking for libcap library: found, OK.
Checking for compiler.h: compiler.h not found, OK.
Checking for 32-bit support: OK.
Checking for makeself: found version 2.4.5, OK.
Checking for GSOAP compiler: found version 2.8.124, OK.
Checking for libvncserver: found version 0.9.14, OK.

Successfully generated
'/home/vbox/virtualbox-7.0.8-dfsg-2/virtualbox-7.0.8-dfsg/out/AutoConfig.kmk'
and '/home/vbox/virtualbox-7.0.8-dfsg-2/virtualbox-7.0.8-dfsg/out/env.sh'.
Source '/home/vbox/virtualbox-7.0.8-dfsg-2/virtualbox-7.0.8-dfsg/out/env.sh'
once before you start to build VBox:

  source /home/vbox/virtualbox-7.0.8-dfsg-2/virtualbox-7.0.8-dfsg/out/env.sh
  kmk

To compile the kernel modules, do:

  cd ./out/linux.amd64/release/bin/src
  make


  +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++
  Hardening is enabled which means that the VBox binaries will not run from
  the binary directory. The binaries have to be installed suid root and some
  more prerequisites have to be fulfilled which is normally done by installing
  the final package. For development, the hardening feature can be disabled
  by specifying the --disable-hardening parameter. Please never disable that
  feature for the final distribution!
  +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++ WARNING +++

Enjoy!
make[1]: Leaving directory
'/home/vbox/virtualbox-7.0.8-dfsg-2/virtualbox-7.0.8-dfsg'
   debian/rules override_dh_auto_build
make[1]: Entering directory
'/home/vbox/virtualbox-7.0.8-dfsg-2/virtualbox-7.0.8-dfsg'
# Building package
. out/env.sh && kmk -j 32 \
    
AUTOCFG=/home/vbox/virtualbox-7.0.8-dfsg-2/virtualbox-7.0.8-dfsg/out/AutoConfig.kmk
\
    
LOCALCFG=/home/vbox/virtualbox-7.0.8-dfsg-2/virtualbox-7.0.8-dfsg/debian/LocalConfig.kmk
\
    PATH_OUT=/home/vbox/virtualbox-7.0.8-dfsg-2/virtualbox-7.0.8-dfsg/out \
    TOOL_YASM_AS=yasm \
    VBOX_USE_SYSTEM_XORG_HEADERS=1 \
    VBOX_USE_SYSTEM_GL_HEADERS=1 \
    VBOX_NO_LEGACY_XORG_X11=1 \
    VBOX_BUILD_PUBLISHER=_Debian \
    VBOX_WITH_REGISTRATION_REQUEST= \
    VBOX_WITH_UPDATE_REQUEST= \
    KBUILD_VERBOSE=2 \
    VBOX_WITH_EXTPACK_VBOXDTRACE=
/home/vbox/virtualbox-7.0.8-dfsg-2/virtualbox-7.0.8-dfsg/src/libs/xpcom18a4/python/gen_python_deps.py:27:
DeprecationWarning: The distutils package is deprecated and slated for
removal in Python 3.12. Use setuptools or check PEP 632 for potential
alternatives
  from distutils.version import StrictVersion
/usr/share/kBuild/footer-inherit-uses-tools.kmk:1012: *** kBuild:
Cannot find include file for the SDK 'LIBSDL2'! Searched:
/usr/share/kBuild/sdks .  Stop.
make[1]: *** [debian/rules:62: override_dh_auto_build] Error 2
make[1]: Leaving directory
'/home/vbox/virtualbox-7.0.8-dfsg-2/virtualbox-7.0.8-dfsg'
make: *** [debian/rules:37: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

------------------------------------------------------------------------------------------------
6) Checking the LIBSDL2 package ... and it says "Installed"
------------------------------------------------------------------------------------------------
$ apt search libsdl2
Sorting... Done
Full Text Search... Done
libsdl2-2.0-0/stable,now 2.26.5+dfsg-1 amd64 [installed,automatic]
  Simple DirectMedia Layer

libsdl2-dev/stable,now 2.26.5+dfsg-1 amd64 [installed]
  Simple DirectMedia Layer development files

Can you please advise?

Regards,
Ian

Reply via email to