Build: Bump Qt6 from 6.8.1 to 6.9.1 (Automated PR)
This automated Pull Request updates the used Qt6 version to version 6.9.1.
This PR was opened by the workflow Bump dependencies (create-prs)
CHANGELOG: Build: Updated bundled Qt6 to version 6.9.1
PR has been updated for version 6.8.1 by the workflow Bump dependencies (create-prs).
I'd assume that this breaks on every Qt6 build.
Yeah, looks like the Qt6 builders can't cope now.
The iOS linker error also occurs on a local build. So it's a general incompatibility with Qt.
Any idea why the QFFmpeg dependency exists?
I do absolutely not understand why we need ffmpeg.
OK, I can repeat the Windows error locally:
aqt install-qt "--outputdir" ~/Downloads/Qt windows desktop 6.8.1 "win64_msvc2019_64" "--archives" "qtbase" "qttools" "qttranslations" --modules qtmultimedia
...
ERROR : The packages ['qt_base', 'qtmultimedia'] were not found while parsing XML of package information!
This appears to be caused by "--archives"...
Oh.
aqt list-qt windows desktop --arch 6.8.1
win64_llvm_mingw win64_mingw win64_msvc2022_64 win64_msvc2022_arm64_cross_compiled
I think we're currently trying to use win64_msvc2019_64, right?
Yup,
aqt install-qt --outputdir ~/Downloads/Qt windows desktop 6.8.1 win64_msvc2022_64 --archives qtbase qttools qttranslations --modules qtmultimedia
works.
...
But, naturally, 6.7.3 isn't compatible with msvc2022, so we have to bump both.
win64_llvm_mingw win64_mingw win64_msvc2019_64 win64_msvc2019_arm64
OK, that seems to have got the Qt 6.8.1 install happy, at least... let's see if it works.
iOS: https://doc.qt.io/qt-6/qtmultimedia-apple.html
Bumped windows/deploy_windows.ps1 as well.
I think we can get windows sorted out. iOS might not be that easy since we depend on Qt developers potentially.
https://bugreports.qt.io/plugins/servlet/mobile#issue/QTBUG-129651 is tagged important but I have a bad feeling.
https://bugreports.qt.io/plugins/servlet/mobile#issue/QTBUG-126817
I believe that qtmultimedia pulls FFmpeg as dependency.
-> we need to find and add the iOS ffmpeg libraries manually
Mmm...
qmake does not have required features (which were introduced in cmake scripts). with qmake you'd have to manually add ffmpeg libs to the project, embed and sign them, adjust runpath search path by adding @executable_path and then adding linker options with those libraries.
Don't like the idea of moving to cmake.
(And, at some point, we need to get Linux off 5.12.8 onto a newer version, too.)
-> we need to find and add the iOS ffmpeg libraries manually
Something like this in a dependencies step? https://www.iteye.com/blog/witcheryne-1734706 just updated for the current era...
Probably. As far as I read, the Qt installer ships prebuilt ffmpeg binaries. We probably need to find the path where these files are.
Don't like the idea of moving to cmake.
Agree.
OK:
aqt install-qt --outputdir /Qt mac desktop 6.8.1 clang_64 --archives qtbase qttools qttranslations --modules qtmultimedia
aqt install-qt --outputdir /Qt mac ios 6.8.1 ios --archives qtbase qttools qttranslations --modules qtmultimedia
$ cd /Qt/6.8.1/ios
/Qt/6.8.1/ios$ find -iname *ffmpeg*
./lib/cmake/Qt6/FindFFmpeg.cmake
./lib/cmake/Qt6Multimedia/Qt6QFFmpegMediaPluginTargets-debug.cmake
./lib/cmake/Qt6Multimedia/Qt6QFFmpegMediaPluginAdditionalTargetInfo.cmake
./lib/cmake/Qt6Multimedia/Qt6QFFmpegMediaPluginConfigVersion.cmake
./lib/cmake/Qt6Multimedia/Qt6QFFmpegMediaPluginConfig.cmake
./lib/cmake/Qt6Multimedia/Qt6QFFmpegMediaPluginConfigVersionImpl.cmake
./lib/cmake/Qt6Multimedia/Qt6QFFmpegMediaPluginTargets.cmake
./lib/cmake/Qt6Multimedia/Qt6QFFmpegMediaPluginTargets-release.cmake
./lib/cmake/Qt6Multimedia/Qt6QFFmpegMediaPluginDependencies.cmake
./lib/ffmpeg
./mkspecs/modules/qt_plugin_ffmpegmediaplugin.pri
./plugins/multimedia/libffmpegmediaplugin_debug.prl
./plugins/multimedia/libffmpegmediaplugin.a
./plugins/multimedia/objects-Release/QFFmpegMediaPlugin_init
./plugins/multimedia/objects-Release/QFFmpegMediaPlugin_init/QFFmpegMediaPlugin_init.cpp.o
./plugins/multimedia/libffmpegmediaplugin.prl
./plugins/multimedia/libffmpegmediaplugin_debug.a
./plugins/multimedia/objects-Debug/QFFmpegMediaPlugin_init
./plugins/multimedia/objects-Debug/QFFmpegMediaPlugin_init/QFFmpegMediaPlugin_init.cpp.o
/Qt/6.8.1/ios$ ls lib/ffmpeg/
libavcodec.framework libavformat.framework libavutil.framework libswresample.framework libswscale.framework
For comparison:
/Qt/6.7.3/ios$ find -iname *ffmpeg*
./lib/cmake/Qt6/FindFFmpeg.cmake
(There's more on the FFMpeg dependency here: https://doc.qt.io/qt-6/qtmultimedia-building-from-source.html -- not that I think it's helpful.)
What is worth noting: https://doc.qt.io/qt-6/qtmultimedia-index.html#licenses-and-attributions -- if we're distributing a statically linked Qt6 multimedia, we're distributing other libraries, so we should add them to the list.
AND
In the case of issues with the default FFmpeg backend, we suggest testing with a native backend. ... the default media backend can be configured via cmake variable QT_DEFAULT_MEDIA_BACKEND. https://doc.qt.io/qt-6/qtmultimedia-index.html#changing-backends
That might fix it, too... no idea where to put a "cmake variable"... (Maybe CMAKE_CXX_FLAGS? Maybe from environment CXXFLAGS?)
https://github.com/jamulussoftware/jamulus/pull/3451 for the Windows fix (plus this commit).
Dunno if this is not helping....
WARNING : You are installing the ios version of Qt, which requires that the desktop version of Qt is also installed. You can install it with the following command:
aqt install-qt mac desktop 6.8.1 clang_64
and that doesn't happen in the iOS builder.
Dunno if this is not helping....
WARNING : You are installing the ios version of Qt, which requires that the desktop version of Qt is also installed. You can install it with the following command:
aqt install-qt mac desktop 6.8.1 clang_64and that doesn't happen in the iOS builder.
I think this is fixed here:
https://github.com/jamulussoftware/jamulus/blob/6e63b13c5a33bf6f20c9c02f3afd4f3616b325ba/.github/autobuild/ios.sh#L70
Second try at the iOS build -- the truncated log messages don't help.
EDIT: Oh, click the line number and it relists everything fully.
/Applications/Xcode_15.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -ivfsstatcache /Users/runner/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphoneos17.5-21F77-f0fa7969d082b13145125136a829df3a.sdkstatcache -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fno-color-diagnostics -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -Wno-implicit-fallthrough -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -Wno-semicolon-before-method-body -Wall -Wextra @/Users/runner/Library/Developer/Xcode/DerivedData/Jamulus-bdtpfrmonafyhfejbibnxopfprmh/ArchiveIntermediates/Jamulus/IntermediateBuildFilesPath/Jamulus.build/Release-iphoneos/Jamulus.build/Objects-normal/arm64/82b82416624d2658e5098eb0a28c15c5-common-args.resp -MMD -MT dependencies -MF /Users/runner/Library/Developer/Xcode/DerivedData/Jamulus-bdtpfrmonafyhfejbibnxopfprmh/ArchiveIntermediates/Jamulus/IntermediateBuildFilesPath/Jamulus.build/Release-iphoneos/Jamulus.build/Objects-normal/arm64/channel.d --serialize-diagnostics /Users/runner/Library/Developer/Xcode/DerivedData/Jamulus-bdtpfrmonafyhfejbibnxopfprmh/ArchiveIntermediates/Jamulus/IntermediateBuildFilesPath/Jamulus.build/Release-iphoneos/Jamulus.build/Objects-normal/arm64/channel.dia -c /Users/runner/work/jamulus/jamulus/src/channel.cpp -o /Users/runner/Library/Developer/Xcode/DerivedData/Jamulus-bdtpfrmonafyhfejbibnxopfprmh/ArchiveIntermediates/Jamulus/IntermediateBuildFilesPath/Jamulus.build/Release-iphoneos/Jamulus.build/Objects-normal/arm64/channel.o
Well, I don't see it having passed the flag...
I believe we need to link a pre-compiled file from plugins/multimedia. Via Xcode GUI, It's possible to add a library manually. Then - most likely - there's a qmake variable for the linker (yes, this could be CXXFLAGS) where we'd add it manually.
Maybe also https://github.com/deepin-community/qt6-multimedia/blob/bc546c744fbab91bc9359f56001dfac464f17388/src/multimedia/Qt6MultimediaMacros.cmake#L6 helps. This defines how cmake loads ffmpeg. Edit: The local version looks different. It wants to load iOS/libs/ffmpeg/*.framework as far as I understand.
Update: Loading all *.framework files form iOS/ffmpeg/ by putting them in the root and then including them via the Xcode GUI makes the app build. However, it crashes while opening it on the device since it cannot find the framework. If I add "@executable_path/" as Runpath Search Paths in Xcode, the app opens towards a black screen.
https://forum.qt.io/topic/104023/how-to-add-a-ios-framework-to-qt-project/7
I think it's worth to wait a bit since there seem to be multiple issues on iOS with the move to ffmpeg on the Qt side (https://www.reddit.com/r/QtFramework/comments/1gh5xb2/issues_with_qt_68_and_ffmpeg_on_ios_anyone_else/). I hope there'll be a fix in the next months.
PR has been updated for version 6.8.2 by the workflow Bump dependencies (create-prs).
I'm inclined to de-tag this. There's no progress on the Qt side.
OK, this could have an impact on our plans for Jamulus 4 but it shouldn't hold up 3.12.0, I agree.
The linked issue from Qt has had an update. It's now in progress
PR has been updated for version 6.8.3 by the workflow Bump dependencies (create-prs).