2.6-beta band-aid: Disable QML to fix link failure avoid undefined behaviour#14772
Conversation
|
Looks good. Other options, or maybe a fix already in the pipeline? @mixxxdj/developers |
| # undefined behaviour in a stable build. | ||
| # See: https://github.com/mixxxdj/mixxx/issues/14766 | ||
| # Once this is fixed we can revert the commit introducing this. | ||
| option(QML "Build with QML" OFF) |
There was a problem hiding this comment.
Let's overwrite this default in build.yml. Otherwise CI would no longer detect, if someone commits a change that breaks QML.
There was a problem hiding this comment.
I fully agree with creating the PPA builds without QML, but the GitHub CI builds of the 2.6 branch, and the PRs targeted to, it must have QML always enabled. This is important so that no one unknowingly adds a PR to 2.6, that breaks the main build after merging.
To my understanding this behavior can easily be achieved by setting the default in CMakeLists.txt to OFF and overwrite it with ON in build.yml and build-checks.yml.
There was a problem hiding this comment.
I don't want to have this type of undefined behavior in our beta builds provided on our download page. This is IMHO more important than the unlikely case that something QML related is pushed to the 2.6 branch.
I expect that one of use will quickly find the root cause so that this situation is only temporary anyway.
|
Overall, I would be pushing for fixing the problem correctly, rather than yet again silencing QML. As I said here, the problem doesn't too hard to fix, so for now I think it's fair to build the jammy and oracular PPA with Also, remember that QML is now used for controller screen rendering, which is shipped with 2.6. |
|
After investigation, it looks like the root cause of the multiple definition comes from two Qt shader meta targets (GL and SG) that seems to not support multiple definition. This doesn't impact Qt >=6.7 I suspect this fix would work: diff --git a/src/rendergraph/shaders/CMakeLists.txt b/src/rendergraph/shaders/CMakeLists.txt
index 277bd3e0aa..7cc84e32b6 100644
--- a/src/rendergraph/shaders/CMakeLists.txt
+++ b/src/rendergraph/shaders/CMakeLists.txt
@@ -34,7 +34,7 @@ if(TARGET rendergraph_gl)
# Add the .qsb shader bundles; rendergraph::MaterialShader will use
# QShader to extract the GLSL shader from the bundle.
message(STATUS "Adding qsb shaders to rendergraph_gl")
- qt6_add_shaders(rendergraph_gl "shaders-qsb"
+ qt6_add_shaders(rendergraph_gl "shaders-qsb-gl"
BATCHABLE
PRECOMPILE
# FIXME qsl relies on 'spirv-opt' to be available in the path, so only installing it via VCPKG is not sufficientYou could also disable diff --git a/src/rendergraph/CMakeLists.txt b/src/rendergraph/CMakeLists.txt
index b2f028a2f8..15f1dbddac 100644
--- a/src/rendergraph/CMakeLists.txt
+++ b/src/rendergraph/CMakeLists.txt
@@ -1,7 +1,7 @@
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)
message(STATUS "Qt version ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}")
-if(QT_VERSION_MINOR GREATER_EQUAL 6)
+if(QT_VERSION_MINOR GREATER_EQUAL 7)
set(USE_QSHADER_FOR_GL ON)
endif() |
|
We have currently no 2.6-beta builds for beta tester. Regarding the issue. I have digged through it and it is clearly NOT a compiler issue. We have various objects in the archives that are equal named but different. This means that everyone that builds the 2.6-beta may occasionally suffer the build failure in the best case or a crash if the linker picks the wrong object in the wrong situation. |
|
@acolombier do you have a reference that Qt has something fixed in Qt 6.7? Here we need probably a proper interface and hide the different types in the implementation in the namespace. |
How about reverting this change in main right away? |
I'd be okay with this trade-off. Arguably, nobody will use QML in 2.6. Even S4 Mk3 user would need a custom build, so as long as we keep 2.7 unchanged regarding QML policy I'm good with it |
|
Greate, merge? I will take care to not merge this into main. |
|
@JoergAtGithub merge? |
|
Please address the change request above, and we can merge this! |
|
You mean to enable readable it on the CI. Right? I consider this duplicated symbol issue a critical issue that may leads to a crash on all targets. Therfore I like to have it disabled for all beta builds. To have them stable as possible. Let's not merge (revert) it in main after merging this PR and than fix the root cause here. Who wants to take care by the way @m0dB seems to be caught in real live. |
JoergAtGithub
left a comment
There was a problem hiding this comment.
Just noticed, that QML is enabled for CI with this PR as it is - so my request is alread fullfilled. Let's merge this therefore!
Because of multiple concurrent definition of symbols caused by the render graph compile definition, we can't provide 2.6-beta build for all Ubuntu versions on our PPA.
This is a emergency band aid, to provide beta testers with builds until the root cause is fixed.
See:
#14766
#14771
Hopefully we fix the issue fast that we can revert this PR