Repository navigation
Description
Summary
mcpp pack computes the runtime closure from the program only. A shared library that a build program places beside the program with mcpp::deploy (recorded as role: library in mcpp-package.json) is staged, but the libraries it depends on are not added to the closure. A plugin that is only ever dlopened (Qt platform plugins and QML plugins, GTK modules, and so on) therefore ships without its own dependencies, and the packed program fails on a machine that does not have them.
Reproduction (Linux x86_64, xim:qt 6.11.1, mcpp 2026.11.20.1)
- A Qt Quick program whose
build.mcppcallsmcpp::deployforqml/QtQuick/Layouts/libqquicklayoutsplugin.so(the file is in the SDK'sqml/tree) and for the SDK'splugins/platforms/*.so. mcpp pack --format dir.- The packed
lib/has nolibQt6QuickLayouts.so.6, although the deployed plugin has it inDT_NEEDED. The same holds for the platform plugins thatmcpp.rules.qtalready deploys:bin/platforms/libqxcb.soneedslibQt6XcbQpa.so.6,libqwayland.soneedslibQt6WaylandClient.so.6,libqeglfs.soneedslibQt6EglFSDeviceIntegration.so.6; none of them is in the packed tree. (Checked statically over every ELF file in the packed tree; the xcb plugin loading failure on a real display is inferred, not observed.)
Control: if the program itself links libQt6QuickLayouts.so by full path, the library is in DT_NEEDED of the program and mcpp pack carries it. That is the workaround below.
Where
src/pack/pack.cppm: the closure read starts from one object, the program (ClosureReadInput::object = program, for example in the PE branch that reads the program's imports); the ELF path walks the program's loader trace. The deployed files are listed in the manifest but are not roots of that walk.
Expected
Either of these would do:
- a deployed
role: libraryfile is also a root of the closure walk, resolved with the same rules and search directories as the program; or - a build-program directive that adds extra closure roots, for example
mcpp::runtime_closure_root(file), for deployed files the author wants walked.
Current workaround
mcpp.rules.qt and the planned mcpp.rules.qml (mcpp-community/mcpp-plugins) read the dependency table of each deployed plugin and link the SDK libraries it names into the program. The workaround is idempotent (linking a library the engine also stages changes nothing) and marked in the source so it can be deleted once the engine does this. A CI canary in mcpp-plugins prints a notice as soon as a packed tree no longer needs it.
Activity
2026.11.23.1: the kernel interface as the kernel-abi layer, derived s…
speak-agent commentedon Nov 24, 2026
Fixed in mcpp 2026.11.23.1 (#1006). An object the build deploys beside the program (
mcpp::deploy,[runtime] deploy) is a root of the pack's runtime closure on ELF, PE, Mach-O and Android, and a deployed object's search path is rewritten to the packedlib/(SPEC-014 §1.2 v2.7). Verified with xim:qt: libQt6XcbQpa is now packed. The mcpp.rules.qt workaround in mcpp-plugins can be removed once this release is the floor.