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

Test building with Qt 6 #4908

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Conversation

cjmayo
Copy link
Contributor

@cjmayo cjmayo commented Dec 31, 2023

Builds master on Linux with:

-DCLANG_TIDY=OFF -DENABLE_CAIRO=yes -DENABLE_EGL=ON -DENABLE_GLX=OFF -DENABLE_SPNAV=yes -DENABLE_TESTS=no -DEXPERIMENTAL=no -DHEADLESS=no -DUSE_CCACHE=OFF -DUSE_GLAD=ON -DUSE_MIMALLOC=OFF -DENABLE_GAMEPAD=no -DENABLE_QTDBUS=yes

Draft because Qt6Gamepad doesn't exist, and I guess not everyone wants to switch right now.

@kintel kintel mentioned this pull request Dec 31, 2023
15 tasks
@cjmayo
Copy link
Contributor Author

cjmayo commented Jan 1, 2024

Availability of libqscintilla2_qt6 is the blocker. For Ubuntu need >= 23.04. Can't find it on Homebrew.
A win for MSYS2.

(It is in Debian and Fedora, alas not available on GitHub Actions).

@t-paul
Copy link
Member

t-paul commented Jan 1, 2024

We will need to support both Qt5 and Qt6 for a while anyway, at least for the Linux builds. Qt6-only will be a showstopper for the next couple of years or we would have to drop support for things like AppImages which seem to be quite popular.

I'll try to see if we can get the scintilla package for Ubuntu built via OBS, we have to do that for other libraries too.

I'm not sure Homebrew is a problem, as we have to custom build all the macOS libraries anyway. So the effort here is to figure out how and when to do that. On the plus side, it should be fine here to "just" switch over to Qt6 at some point.

@kintel
Copy link
Member

kintel commented Jan 1, 2024

@cjmayo also, just FYI: The tests run here don't exercise any Qt code paths, but they are good for validating builds.

@cjmayo
Copy link
Contributor Author

cjmayo commented Jan 6, 2024

Looks like brew.sh are waiting for Octave 9 before updating qscintilla2.

@kintel
Copy link
Member

kintel commented Jan 6, 2024

For macOS, let's start by building our own Qt6 and test based on that. We do such builds on CircleCI, but we don't currently run tests there.
Needs: update macosx-build-dependencies.sh to support Qt6.

@cjmayo cjmayo changed the title Port CMakeLists.txt to Qt 6 Test Building with Qt 6 Jan 8, 2024
@cjmayo cjmayo changed the title Test Building with Qt 6 Test building with Qt 6 Jan 8, 2024
@Neumann-A
Copy link

Do I read this PR correctly that only CMake changes are required to build OpenSCAD with Qt6? If so, I might try building it with vcpkg on windows.

@cjmayo
Copy link
Contributor Author

cjmayo commented Feb 3, 2024

Yes, the code changes are done, just needs the CMake update in #4929 (built with Qt 6 here).

When running N.B. there are some MS Windows only changes 05cf63e, and for multi-monitor setups d243e4f.

@cjmayo
Copy link
Contributor Author

cjmayo commented Mar 18, 2024

Homebrew switched qscintilla2 to Qt 6, finally a chance to build with macOS. Requires 10.15 so needs a CMake tweak, but with that builds OK.

With qscintilla2 on Qt 6, Qt 5 builds are broken https://github.com/openscad/openscad/actions/runs/8331011451/job/22796918667#step:5:89

@kintel
Copy link
Member

kintel commented Mar 18, 2024

With qscintilla2 on Qt 6, Qt 5 builds are broken

Argh! I'll take a look at that.

@kintel
Copy link
Member

kintel commented Mar 18, 2024

For now, I added a request here: Homebrew/homebrew-core#166414 (comment) - let's see where that goes.

@kintel
Copy link
Member

kintel commented Mar 22, 2024

Temporary workaround to downgrade QScintilla to the qt5 version: #5059

@kintel
Copy link
Member

kintel commented May 10, 2024

We should support both Qt5 and Qt6 builds on the CI, subject to CI capacity.
See #5129 for WIP to make that work on macOS.

@cjmayo cjmayo force-pushed the qt6-cmakelists branch 2 times, most recently from f6571d0 to da6dc9e Compare May 14, 2024 18:35
@cjmayo
Copy link
Contributor Author

cjmayo commented May 14, 2024

I updated too early - Ubuntu 24.04 wasn't actually available (it was listed in the README...). I probably changed more than I needed to before I understood that.

But yes, this PR is not something ready for merging. Just testing building with Qt6 and some experiments (e.g. can build only using packages from Ubuntu 24.04).

Now that #5129 is merged there is Qt 6 build testing going on.

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

Successfully merging this pull request may close these issues.

None yet

4 participants