Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add qt6-multimedia package #25992

Merged
merged 33 commits into from
May 29, 2024
Merged

Add qt6-multimedia package #25992

merged 33 commits into from
May 29, 2024

Conversation

mmcauliffe
Copy link
Contributor

Checklist

  • Title of this PR is meaningful: e.g. "Adding my_nifty_package", not "updated meta.yaml".
  • License file is packaged (see here for an example).
  • Source is from official source.
  • Package does not vendor other packages. (If a package uses the source of another package, they should be separate packages or the licenses of all packages need to be packaged).
  • If static libraries are linked in, the license of the static library is packaged.
  • Package does not ship static libraries. If static libraries are needed, follow CFEP-18.
  • Build number is 0.
  • A tarball (url) rather than a repo (e.g. git_url) is used in your recipe (see here for more details).
  • GitHub users listed in the maintainer section have posted a comment confirming they are willing to be listed there.
  • When in trouble, please check our knowledge base documentation before pinging a team.

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/qt-multimedia) and found some lint.

Here's what I've got...

For recipes/qt-multimedia:

  • There are too few lines. There should be one empty line at the end of the file.

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/qt-multimedia) and found it was in an excellent condition.

@mmcauliffe
Copy link
Contributor Author

Ok, added your changes!

For Mac it's erroring on

$PREFIX/include/libavcodec/avcodec.h:2142:10: error: typedef 'AVMediaType' cannot be referenced with a enum specifier

Is the section below from qt-main required? Or is this a result from it not using the conda_build_config values?

    # Ensure that build and host have the same clang version on osx
    # otherwise qt6 may be out of sync compared to the pinned compiler
    # version
    - libclang     {{ cxx_compiler_version }}     # [osx]
    - libclang-cpp {{ cxx_compiler_version }}     # [osx]
    - libclang                                    # [not osx]
    - libclang-cpp                                # [not osx]

For Windows, it's erroring on lines like:

ERROR (qt6-multimedia,Library/lib/qt6/plugins/multimedia/ffmpegmediaplugin.dll): $RPATH/api-ms-win-core-libraryloader-l1-2-1.dll not found in packages, sysroot(s) nor the missing_dso_whitelist.

Any ideas?


cmake -LAH -G "Ninja" \
-DCMAKE_PREFIX_PATH=${PREFIX} \
-DCMAKE_FIND_FRAMEWORK=LAST \
Copy link
Contributor

@hmaarrfk hmaarrfk Apr 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
-DCMAKE_FIND_FRAMEWORK=LAST \
-DCMAKE_FIND_FRAMEWORK=NEVER \
-DCMAKE_FIND_APPBUNDLE=NEVER \

try maybe this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for OSX that is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might be taht their CMAKE file overrides this somehow...

@hmaarrfk
Copy link
Contributor

The windows warning appears in the qt6-main changes you are proposing too, but we didn't enable "strictness" on this front for "old recipes".

Thus it is being "silently dropped as a warning" and not "stopping building as an error".

2024-04-10T04:23:29.3853276Z WARNING (qt6-main,Library/lib/qt6/plugins/multimedia/ffmpegmediaplugin.dll): $RPATH/api-ms-win-core-libraryloader-l1-2-0.dll not found in packages, sysroot(s) nor the missing_dso_whitelist.
2024-04-10T04:23:29.3855925Z .. is this binary repackaging?
2024-04-10T04:23:29.4590237Z WARNING (qt6-main,Library/lib/qt6/plugins/multimedia/ffmpegmediaplugin.dll): $RPATH/api-ms-win-ntuser-sysparams-l1-1-0.dll not found in packages, sysroot(s) nor the missing_dso_whitelist.

For osx: Its strange to me that the error isn't getting triggered in the qt-main for the main build:
https://forums.developer.apple.com/forums/thread/83067

Other posts suggest editing the files. maybe homebrew has a patch?

@hmaarrfk
Copy link
Contributor

do you have access to a mac? i think it would be good to troubleshoot this locally to get the compilation options right.

@hmaarrfk
Copy link
Contributor

for windows, i'm nto too worried, we can raise an issue if this is the blocker, and maybe decide to move forward without it.

@mmcauliffe
Copy link
Contributor Author

mmcauliffe commented Apr 10, 2024 via email

@mmcauliffe
Copy link
Contributor Author

@hmaarrfk I got the OSX build working locally by removing -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=32, I'm not sure what impact this has overall, but it was trying to compile some unity files in QFFmpegPlugin with objcxx:

2024-04-10T20:07:59.3806040Z [156/210] Building OBJCXX object src/plugins/multimedia/ffmpeg/CMakeFiles/QFFmpegMediaPlugin.dir/Unity/unity_0_mm.mm.o
2024-04-10T20:07:59.3909980Z FAILED: src/plugins/multimedia/ffmpeg/CMakeFiles/QFFmpegMediaPlugin.dir/Unity/unity_0_mm.mm.o 
2024-04-10T20:07:59.4018900Z $BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-clang++ -DGL_SILENCE_DEPRECATION -DQFFmpegMediaPlugin_EXPORTS -DQT_COMPILING_FFMPEG -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_UP_TO=0x050000 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -DQT_NO_AS_CONST -DQT_NO_AS_CONST=1 -DQT_NO_CONTEXTLESS_CONNECT=1 -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_FOREACH=1 -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QEXCHANGE -DQT_PLUGIN -DQT_USE_QSTRINGBUILDER -DQT_WARN_DEPRECATED_UP_TO=0x070000 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I$SRC_DIR/build/src/plugins/multimedia/ffmpeg/QFFmpegMediaPlugin_autogen/include -I$SRC_DIR/src/plugins/multimedia/ffmpeg -I$SRC_DIR/build/src/plugins/multimedia/ffmpeg -I$SRC_DIR/build/include -I$SRC_DIR/src/plugins/multimedia/ffmpeg/../darwin -I$SRC_DIR/src/plugins/multimedia/ffmpeg/../darwin/camera -I$SRC_DIR/build/src/multimedia -I$SRC_DIR/build/include/QtMultimedia/6.7.0 -I$SRC_DIR/build/include/QtMultimedia/6.7.0/QtMultimedia -I$SRC_DIR/build/include/QtMultimedia -isystem $PREFIX/include/qt6/QtCore/6.7.0 -isystem $PREFIX/include/qt6/QtCore/6.7.0/QtCore -isystem $PREFIX/include/qt6/QtCore -isystem $PREFIX/include/qt6 -isystem $PREFIX/lib/qt6/mkspecs/macx-clang -isystem $PREFIX/include/qt6/QtGui/6.7.0 -isystem $PREFIX/include/qt6/QtGui/6.7.0/QtGui -isystem $PREFIX/include/qt6/QtGui -isystem $PREFIX/include/qt6/QtNetwork -isystem $PREFIX/include -x objective-c++ -DNDEBUG -O2 -std=c++17 -isysroot /Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -mmacosx-version-min=11.0 -fPIC -fvisibility=hidden -Wall -Wextra -fno-exceptions -fPIC -fapplication-extension -MD -MT src/plugins/multimedia/ffmpeg/CMakeFiles/QFFmpegMediaPlugin.dir/Unity/unity_0_mm.mm.o -MF src/plugins/multimedia/ffmpeg/CMakeFiles/QFFmpegMediaPlugin.dir/Unity/unity_0_mm.mm.o.d -o src/plugins/multimedia/ffmpeg/CMakeFiles/QFFmpegMediaPlugin.dir/Unity/unity_0_mm.mm.o -c $SRC_DIR/build/src/plugins/multimedia/ffmpeg/CMakeFiles/QFFmpegMediaPlugin.dir/Unity/unity_0_mm.mm

whereas the successful qt-main build was compiling the same file with cxx:

2024-04-10T03:41:37.2727560Z [3702/4296] Building CXX object qtmultimedia/src/plugins/multimedia/ffmpeg/CMakeFiles/QFFmpegMediaPlugin.dir/Unity/unity_0_cxx.cxx.o

Any ideas on the consequences of removing that unity support for QtMultimedia/is there a better solution you can think of?

I've also tried to clean up extra dependencies for linux for anything not referenced in the CMake variables for the QtMultimedia build, but if it starts to fail again, I'll add the relevant ones back in.

@mmcauliffe
Copy link
Contributor Author

Ok this should pass for everything, I added the system dlls that were throwing an error to the missing_dso_whitelist, but let me know if there's a better way to solve that, as well as the question about removing the Unity flags.

Otherwise, feel free to merge and I'll get the cross compilation builds working once the feedstock's made.

@hmaarrfk
Copy link
Contributor

can you summarize what you did with osx?

@mmcauliffe
Copy link
Contributor Author

mmcauliffe commented Apr 11, 2024

I had included this line from qt-main (and qt-charts had it as well): https://github.com/conda-forge/qt-main-feedstock/blob/qt6/recipe/build.sh#L74. That line was responsible for unity_0_mm.mm.o to be built as an OBJCXX object instead of a CXX object:

2024-04-10T20:07:59.3806040Z [156/210] Building OBJCXX object src/plugins/multimedia/ffmpeg/CMakeFiles/QFFmpegMediaPlugin.dir/Unity/unity_0_mm.mm.o
2024-04-10T20:07:59.3909980Z FAILED: src/plugins/multimedia/ffmpeg/CMakeFiles/QFFmpegMediaPlugin.dir/Unity/unity_0_mm.mm.o 
2024-04-10T20:07:59.4018900Z $BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-clang++ -DGL_SILENCE_DEPRECATION -DQFFmpegMediaPlugin_EXPORTS -DQT_COMPILING_FFMPEG -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_UP_TO=0x050000 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -DQT_NO_AS_CONST -DQT_NO_AS_CONST=1 -DQT_NO_CONTEXTLESS_CONNECT=1 -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_FOREACH=1 -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QEXCHANGE -DQT_PLUGIN -DQT_USE_QSTRINGBUILDER -DQT_WARN_DEPRECATED_UP_TO=0x070000 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I$SRC_DIR/build/src/plugins/multimedia/ffmpeg/QFFmpegMediaPlugin_autogen/include -I$SRC_DIR/src/plugins/multimedia/ffmpeg -I$SRC_DIR/build/src/plugins/multimedia/ffmpeg -I$SRC_DIR/build/include -I$SRC_DIR/src/plugins/multimedia/ffmpeg/../darwin -I$SRC_DIR/src/plugins/multimedia/ffmpeg/../darwin/camera -I$SRC_DIR/build/src/multimedia -I$SRC_DIR/build/include/QtMultimedia/6.7.0 -I$SRC_DIR/build/include/QtMultimedia/6.7.0/QtMultimedia -I$SRC_DIR/build/include/QtMultimedia -isystem $PREFIX/include/qt6/QtCore/6.7.0 -isystem $PREFIX/include/qt6/QtCore/6.7.0/QtCore -isystem $PREFIX/include/qt6/QtCore -isystem $PREFIX/include/qt6 -isystem $PREFIX/lib/qt6/mkspecs/macx-clang -isystem $PREFIX/include/qt6/QtGui/6.7.0 -isystem $PREFIX/include/qt6/QtGui/6.7.0/QtGui -isystem $PREFIX/include/qt6/QtGui -isystem $PREFIX/include/qt6/QtNetwork -isystem $PREFIX/include -x objective-c++ -DNDEBUG -O2 -std=c++17 -isysroot /Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -mmacosx-version-min=11.0 -fPIC -fvisibility=hidden -Wall -Wextra -fno-exceptions -fPIC -fapplication-extension -MD -MT src/plugins/multimedia/ffmpeg/CMakeFiles/QFFmpegMediaPlugin.dir/Unity/unity_0_mm.mm.o -MF src/plugins/multimedia/ffmpeg/CMakeFiles/QFFmpegMediaPlugin.dir/Unity/unity_0_mm.mm.o.d -o src/plugins/multimedia/ffmpeg/CMakeFiles/QFFmpegMediaPlugin.dir/Unity/unity_0_mm.mm.o -c $SRC_DIR/build/src/plugins/multimedia/ffmpeg/CMakeFiles/QFFmpegMediaPlugin.dir/Unity/unity_0_mm.mm

The successful qt-main build from conda-forge/qt-main-feedstock#256 compiled the same file as a CXX object:

2024-04-10T03:41:37.2727560Z [3702/4296] Building CXX object qtmultimedia/src/plugins/multimedia/ffmpeg/CMakeFiles/QFFmpegMediaPlugin.dir/Unity/unity_0_cxx.cxx.o

From looking over the QtMultimedia sources, the only explicit reference to Unity is for 3rdparty resonance-audio: https://github.com/qt/qtmultimedia/blob/dev/src/3rdparty/resonance-audio/CMakeLists.txt#L44, which we're not building, so I think it's ok to exclude the Unity flags.

@hmaarrfk
Copy link
Contributor

understood. well it seems that qt released 6.7.1 today, i'm wondering if this is the window we were looking for to rebuild by splitting out multimedia.

@mmcauliffe
Copy link
Contributor Author

mmcauliffe commented Apr 11, 2024 via email

@hmaarrfk
Copy link
Contributor

Yes. Generally speaking I want to get jschulers active approval too. So we should work to also intercept the bots PR and ping jschulers too

@mmcauliffe
Copy link
Contributor Author

That sounds good, it does look like 6.7.1 still isn't out: https://download.qt.io/official_releases/qt/6.7/, but I'll keep an eye on it.

@mmcauliffe
Copy link
Contributor Author

@hmaarrfk this should be good to go for 6.7.1 now for when we want to start the ball on splitting QtMultimedia off from qt-main.

Copy link
Member

@h-vetinari h-vetinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're in good hands with @hmaarrfk, but just gave this a quick look over.

recipes/qt-multimedia/bld.bat Show resolved Hide resolved
recipes/qt-multimedia/bld.bat Outdated Show resolved Hide resolved
recipes/qt-multimedia/build.sh Show resolved Hide resolved
recipes/qt-multimedia/build.sh Outdated Show resolved Hide resolved
recipes/qt-multimedia/meta.yaml Outdated Show resolved Hide resolved
recipes/qt-multimedia/meta.yaml Outdated Show resolved Hide resolved
recipes/qt-multimedia/conda_build_config.yaml Show resolved Hide resolved
Comment on lines 45 to 46
- gst-plugins-base {{ gstreamer }} # [build_platform != target_platform and linux]
- gstreamer # [build_platform != target_platform and linux]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- gst-plugins-base {{ gstreamer }} # [build_platform != target_platform and linux]
- gstreamer # [build_platform != target_platform and linux]
- ffmpeg *=lgpl* # [build_platform != target_platform]

if upstream is discouraging it we can simply remove it from future versions.

specifying the lgpl build of ffmpeg will help just solidify that you aren't relying on the GPL stuff keeping the license LPGL

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/qt-multimedia) and found some lint.

Here's what I've got...

For recipes/qt-multimedia:

  • Failed to even lint the recipe, probably because of a conda-smithy bug 😢. This likely indicates a problem in your meta.yaml, though. To get a traceback to help figure out what's going on, install conda-smithy and run conda smithy recipe-lint . from the recipe directory.

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/qt-multimedia) and found it was in an excellent condition.

Copy link
Member

@h-vetinari h-vetinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last question & a last nit

recipes/qt-multimedia/meta.yaml Outdated Show resolved Hide resolved
recipes/qt-multimedia/meta.yaml Outdated Show resolved Hide resolved
Copy link
Member

@h-vetinari h-vetinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@hmaarrfk
Copy link
Contributor

You can be optimistic and add the "OSX and linux migrations" with something like: https://github.com/conda-forge/staged-recipes/pull/22072/files#diff-8c9415d6f2ea2db40a91544b94827771515f89815957b3bcdb67b43f174a4f3a

i don't know if we have ppc64le but if you think the recipe is correct for OSX cross compilation, then you should be able to do this.

@mmcauliffe
Copy link
Contributor Author

mmcauliffe commented May 24, 2024

Ok added the conda-forge.yml. For testing, I'm on windows and when I try to build the qt-multimedia recipe locally it throws an error with

WARNING: failed to get package records, retrying.  exception was: Unsatisfiable dependencies for platform win-64: {Matc}
Encountered problems while solving:
  - nothing provides requested c_win-64

Even though I'm in a VS2019 prompt and environment that can build other recipes with just compiler('cxx').

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/qt-multimedia) and found some lint.

Here's what I've got...

For recipes/qt-multimedia:

  • The following maintainers have not yet confirmed that they are willing to be listed here: conda-forge/qt-main. Please ask them to comment on this PR if they are.

Copy link
Contributor

@hmaarrfk hmaarrfk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll press merge when it is green again!! Thanks for the patience

@hmaarrfk
Copy link
Contributor

I confirm on behalf of @conda-forge/qt-main that I wish to maintain this recipe

@hmaarrfk hmaarrfk merged commit f8829fa into conda-forge:main May 29, 2024
4 of 5 checks passed
@hmaarrfk
Copy link
Contributor

fingers crossed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants