Priority: P2: Important
Affects Version/s: 5.15.0, 5.15.2, 6.0.0, 6.0.1
Fix Version/s: None
Component/s: Build tools: macdeployqt
Environment:macOS BigSur, Qt6.0.1 and Qt5.15.2 tested
When deploying an application with one of its library dependencies names containing "_debug" (e.g. /usr/local/opt/abseil/lib/libabsl_debugging_internal.dylib) macdeployqt will complain it as a debug build and refuses to deploy QCocoa platform plugins.
Digging further, the "useDebugLibs" control if debug libraries are used. Since QCocoa has no "_debug" suffix, the LHS will evaluate to false.
This for loop will continue if "useDebugLibs" is "true" in this condition
This statement is around Line 200 in main.cpp:
Where the "deploymentInfo.isDebug" was set "true" at around Line970 in shared.cpp:
The isDebugLibrary is should be checking if the library name "ends" with the "_debug" suffix but it however does:
A "containing" check.
So my libabsl_debugging_internal.dylib breaks "macdeployqt" thus no qcocoa platform plugins are deployed.
I've uploaded a minimal proof of concept:
Download and extract the zip
- To Compile and run macdeployqt
mkdir build; cd build;
cmake ..; cmake --build .
- Then double-click the mainapp.app, it'll fail due to missing libqcocoa platform plugin (can verify by checking if ./mainapp.app/Contents/PlugIns exists)
Now edit the CMakeLists.txt, switch the TEST_LIBRARY_NAME variable comments. do a clean recompile with macdeployqt, it should be working after double-clicking on the app bundle.
A QMessageBox would pop-up if it works well