Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.3
-
Windows 10 22H2
-
-
d217eca2f (dev), 50a591426 (6.6), 9b32c3478 (tqtc/lts-6.5), 89552f6c4 (dev), 92dd43096 (6.6)
Description
Steps to reproduce
- Load the Shader Effects example (https://doc.qt.io/qt-6/qtquick-shadereffects-example.html )
- Edit shadereffects.qml to add one line, "import QtMultimedia"
- Re-run CMake
- Build the project
Note: After step #2, it is necessary to re-run CMake (or delete the build folder entirely) if the project was previously built. Simply cleaning the project is not enough.
Outcomes
The build fails with the following error:
wasm-ld: error: duplicate symbol: qInitResources_shaders() >>> defined in CMakeFiles/shadereffectsexample.dir/.rcc/qrc_shaders.cpp.o >>> defined in C:/Qt/6.5.3/wasm_multithread/lib/objects-Release/Multimedia_resources_1/.rcc/qrc_shaders.cpp.o wasm-ld: error: duplicate symbol: qCleanupResources_shaders() >>> defined in CMakeFiles/shadereffectsexample.dir/.rcc/qrc_shaders.cpp.o >>> defined in C:/Qt/6.5.3/wasm_multithread/lib/objects-Release/Multimedia_resources_1/.rcc/qrc_shaders.cpp.o
Workaround/Fix
- Users: Pass a name that's not "shaders" to qt6_add_shaders()
- Qt: Pass a name that's not "shaders" to qt_internal_add_shaders() (see https://github.com/qt/qtmultimedia/blob/v6.5.3/src/multimedia/CMakeLists.txt#L285 for example)