[Bug]: configure.py and kBuild hardcode 'VBox' Qt library infix (-lQt6CoreVBox) and legacy GTK2 plugins when building with --with-qt-dir on Linux

Aperta
#923 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 6 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c, cpp

Direzione di ricerca

Start by reading configure.py and the kBuild rules that select Qt libraries and stage plugins; the report identifies those as the failing paths but does not give specific rule files. Reproduce with the stated Qt 6.8 SDK and --with-qt-dir, then inspect the missing library and GTK2 plugin dependencies. Done when configuration and staging work with upstream Qt 6.8 without the reported missing targets.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
Version

7.2.22

Host OS Type

Linux

Host OS name + version

Debian 12 (Bookworm)

Host Architecture

x86

Guest OS Type

other

Guest Architecture

x86

Guest OS name + version

N/A (Host build system: configure.py and kBuild)

Component

Other

What happened?

When building VirtualBox trunk (r113835) on Debian 12 x86_64 using a standard upstream Qt 6.8.0 SDK directory via --with-qt-dir=$HOME/Qt/6.8.0/gcc_64, three build issues occur:

1. configure.py hardcodes -lQt6CoreVBox instead of -lQt6Core

Running:

./configure --disable-hardening --disable-docs --disable-java --with-qt-dir=$HOME/Qt/6.8.0/gcc_64

fails the Qt library check because configure.py links the test binary against Oracle's internal suffixed library name -lQt6CoreVBox:

[WARN]: Compilation of test program for qt failed
[WARN]:    g++ -I/usr/include/c++/12 -I/home/adrian/Qt/6.8.0/gcc_64/include -L/home/adrian/Qt/6.8.0/gcc_64/lib /tmp/tmp61yp9ocv/testlib.cpp -fPIC -o /tmp/tmp61yp9ocv/testlib -std=c++17 -Wl,-rpath,/home/adrian/Qt/6.8.0/gcc_64/lib -lQt6CoreVBox
[WARN]: /usr/bin/ld: cannot find -lQt6CoreVBox: No such file or directory
collect2: error: ld returned 1 exit status
2. kBuild still expects the VBox infix on Qt6 libraries and plugins

After patching configure.py (s/Qt6CoreVBox/Qt6Core/g), configure.py succeeds, but kmk fails because the VBox infix is still expected on the libraries and plugins inside --with-qt-dir:

kmk: *** No rule to make target '/home/adrian/Qt/6.8.0/gcc_64/lib/libQt6CoreVBox.so', needed by '/home/adrian/vbox-build/vbox/out/linux.amd64/release/obj/VBoxDbg/VBoxDbg.so'.  Stop.
kmk: *** No rule to make target '/home/adrian/Qt/6.8.0/gcc_64/plugins/platforms/libqxcbVBox.so', needed by '/home/adrian/vbox-build/vbox/out/linux.amd64/release/obj/qt-bin/plugins/platforms/libqxcbVBox.so'.  Stop.
3. Pass - Staging requires legacy GTK2 Qt plugins removed in Qt 6

During kBuild: Pass - Staging, the build fails looking for libqgtk2VBox.so and libqgtk2styleVBox.so:

kmk: *** No rule to make target '/home/adrian/Qt/6.8.0/gcc_64/plugins/platformthemes/libqgtk2VBox.so', needed by '/home/adrian/vbox-build/vbox/out/linux.amd64/release/obj/qt-bin/plugins/platformthemes/libqgtk2VBox.so'.  Stop.
kmk: *** No rule to make target '/home/adrian/Qt/6.8.0/gcc_64/plugins/styles/libqgtk2styleVBox.so', needed by '/home/adrian/vbox-build/vbox/out/linux.amd64/release/obj/qt-bin/plugins/styles/libqgtk2styleVBox.so'.  Stop.

In Qt 6.8, GTK2 plugins do not exist (replaced by plugins/platformthemes/libqgtk3.so).

Workaround used to complete the build
  1. Replace Qt6CoreVBox with Qt6Core in configure.py.
  2. Create *VBox.so symlinks for lib/libQt6*.so* and plugins/**/*.so in the Qt 6.8 SDK directory.
  3. Symlink plugins/platformthemes/libqgtk2VBox.so and plugins/styles/libqgtk2styleVBox.so.
How can we reproduce this?
  1. On Debian 12 (x86_64), check out VirtualBox trunk:
    svn co https://www.virtualbox.org/svn/vbox/trunk vbox
    cd vbox
    
  2. Install an upstream Qt 6.8.0 SDK (linux_gcc_64) into $HOME/Qt/6.8.0/gcc_64.
  3. Run ./configure pointing --with-qt-dir to the Qt 6.8.0 directory:
    export LD_LIBRARY_PATH="$HOME/Qt/6.8.0/gcc_64/lib:$LD_LIBRARY_PATH"
    export PATH="$HOME/Qt/6.8.0/gcc_64/bin:$PATH"
    ./configure --disable-hardening --disable-docs --disable-java --with-qt-dir=$HOME/Qt/6.8.0/gcc_64
    
    -> Observe configure.log failing with /usr/bin/ld: cannot find -lQt6CoreVBox.
  4. Replace Qt6CoreVBox with Qt6Core in configure.py, re-run ./configure, source ./env.sh, and run kmk -j$(nproc):
    -> Observe kmk stopping on missing libQt6CoreVBox.so, libqxcbVBox.so, libqgtk2VBox.so, and libqgtk2styleVBox.so.
Did you upload all of your necessary log files, screenshots, etc.?
  • Yes, I've uploaded all pertinent files to this issue.
Lingua principale
C
Stelle
1.4k
Fork
219
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di VirtualBox/virtualbox

Tutte le issue di VirtualBox/virtualbox

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.