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

Use newer Qt version (5.15.10) on macOS #127

Draft
wants to merge 1 commit into
base: 3.x
Choose a base branch
from
Draft

Conversation

Jojo-Schmitz
Copy link
Owner

@Jojo-Schmitz Jojo-Schmitz commented Jun 9, 2023

Resolves: musescore#16533
Resolves: musescore#17740

Backport of musescore#17772, needed as this branch also used Qt 5.15 and not 5.9 like 3.6.2 and earlier

Needs QWebEngine though, that so far isn't part of https://s3.amazonaws.com/utils.musescore.org/Qt5159_mac.zip

@Jojo-Schmitz
Copy link
Owner Author

Jojo-Schmitz commented Jun 10, 2023

Seems too much effort (need to build Qt from scratch) for too little effect

@Jojo-Schmitz Jojo-Schmitz deleted the 3.x-new-qt-mac branch June 10, 2023 14:07
@Jojo-Schmitz Jojo-Schmitz changed the title Use newer Qt version on macOS Use newer Qt version (5.15.9) on macOS Jun 11, 2023
@Jojo-Schmitz Jojo-Schmitz restored the 3.x-new-qt-mac branch December 1, 2023 09:03
@Jojo-Schmitz Jojo-Schmitz reopened this Dec 1, 2023
@Jojo-Schmitz Jojo-Schmitz marked this pull request as draft December 1, 2023 09:03
@Jojo-Schmitz
Copy link
Owner Author

Jojo-Schmitz commented Dec 1, 2023

See also #232, but also #93

@Jojo-Schmitz
Copy link
Owner Author

Maybe I found a way to get Qt build on GitHub... 'stolen' from https://github.com/cbjeukendrup/musescore_build_qt

@Jojo-Schmitz Jojo-Schmitz changed the title Use newer Qt version (5.15.9) on macOS Use newer Qt version (5.15.10) on macOS Sep 13, 2024
@Jojo-Schmitz
Copy link
Owner Author

Jojo-Schmitz commented Sep 13, 2024

Pity, still things from Qt WebEngine seem to be missing

@cbjeukendrup if you find the time, mind to check where/why this might have gone wrong?

@cbjeukendrup
Copy link

I never created builds with WebEngine myself. That was done by Antonio Lotti, see musescore#17997 (comment). You won't be able to download those builds anymore by now, because GitHub saves them only 90 days; but you can create new ones by forking his repo and then running the GH Action.

@Jojo-Schmitz
Copy link
Owner Author

Jojo-Schmitz commented Sep 16, 2024

That's what I did (actually I forked your's), but still running into problems.

@AntonioBL: any idea?

@cbjeukendrup
Copy link

You forked my repo, rather than @AntonioBL's, and again, my repo doesn't have anything with Qt 5 WebEngine.

@Jojo-Schmitz
Copy link
Owner Author

Got it. Your repo has actions that look like doing something with WebEngine though...

@cbjeukendrup
Copy link

Oh, you're right. Apparently my attempts did have results. The problem seems something different: https://github.com/Jojo-Schmitz/musescore_build_qt/actions/runs/10850041193/job/30115719091#step:7:10

So Python 2 is needed, which is so old that it's no longer shipped with macOS since version 12.3. Looks like the best way to install it is using pyenv: https://stackoverflow.com/a/67274521

Jojo-Schmitz added a commit to Jojo-Schmitz/musescore_build_qt that referenced this pull request Sep 16, 2024
@Jojo-Schmitz
Copy link
Owner Author

Thanks, will try that

Backport of musescore#17772

But now using a self build (well, built in GitHub CI) Qt 5.15.10
Jojo-Schmitz added a commit to Jojo-Schmitz/musescore_build_qt that referenced this pull request Sep 16, 2024
see Jojo-Schmitz/MuseScore#127 (comment)

Update qt5.15.10_macOS_universal.yml
@Jojo-Schmitz
Copy link
Owner Author

Hmm, Jojo-Schmitz/musescore_build_qt@95bb9ce doesn't do the trick though

@cbjeukendrup
Copy link

Based on that SO answer, maybe this works?

        brew install pyenv
        pyenv install 2.7.18
        pyenv global 2.7.18
        echo "$(pyenv root)/shims" >> $GITHUB_PATH

@Jojo-Schmitz
Copy link
Owner Author

Hmmm, ok, I'll try

@Jojo-Schmitz
Copy link
Owner Author

Got much further with that, but then fails compilation.

Jojo-Schmitz added a commit to Jojo-Schmitz/musescore_build_qt that referenced this pull request Sep 17, 2024
@cbjeukendrup
Copy link

You could look at https://github.com/Homebrew/homebrew-core/blob/26bd22e37e641c3a1571fac5913a7774aca24c64/Formula/q/[email protected]. This is HomeBrew's spec for how to install and build the latest Qt 5. You cannot just take Qt from HomeBrew, as HomeBrew binaries aren't really suitable for redistribution (they contain some hardcoded paths etc). But you can take inspiration from which patches it applies.
Unless you happen to know Ruby, the syntax is weird, but you can probably figure out what it approximately does. See my musescore_build_qt repo for how patches could be applied.

Jojo-Schmitz added a commit to Jojo-Schmitz/musescore_build_qt that referenced this pull request Sep 17, 2024
@Jojo-Schmitz
Copy link
Owner Author

Build for Qt 5.15.10 fails with:

2024-09-17T06:50:34.7761260Z In file included from gen/third_party/blink/renderer/core/editing/editing_jumbo_9.cc:7:
2024-09-17T06:50:34.7764870Z ./../../../../../qt-everywhere-src-5.15.10/qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/core/editing/finder/text_finder.cc:632:10: error: ambiguous conversion for functional-style cast from 'blink::FloatRect' to 'gfx::RectF'
2024-09-17T06:50:34.7767880Z   return gfx::RectF(FindInPageRectFromRange(EphemeralRange(ActiveMatch())));
2024-09-17T06:50:34.7768940Z          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2024-09-17T06:50:34.7771220Z ../../../../../qt-everywhere-src-5.15.10/qtwebengine/src/3rdparty/chromium/ui/gfx/geometry/rect_f.h:26:23: note: candidate constructor (the implicit move constructor)
2024-09-17T06:50:34.7773160Z class GEOMETRY_EXPORT RectF {
2024-09-17T06:50:34.7773700Z                       ^
2024-09-17T06:50:34.7775610Z ../../../../../qt-everywhere-src-5.15.10/qtwebengine/src/3rdparty/chromium/ui/gfx/geometry/rect_f.h:26:23: note: candidate constructor (the implicit copy constructor)
2024-09-17T06:50:34.7778620Z ../../../../../qt-everywhere-src-5.15.10/qtwebengine/src/3rdparty/chromium/ui/gfx/geometry/rect_f.h:43:12: note: candidate constructor
2024-09-17T06:50:34.7781000Z   explicit RectF(const CGRect& r);
2024-09-17T06:50:34.7781800Z            ^

Build for Qt 5.15.15 fails with

2024-09-17T17:44:45.5581150Z In file included from gen/base/base_jumbo_19.cc:16:
2024-09-17T17:44:45.5609170Z ./../../../../../qt-everywhere-src-5.15.15/qtwebengine/src/3rdparty/chromium/base/strings/utf_string_conversions.cc:21:16: error: duplicate explicit instantiation of 'basic_string<unsigned short, base::string16_internals::string16_char_traits>'
2024-09-17T17:44:45.5613800Z template class basic_string<base::char16, base::string16_internals::string16_char_traits>;
2024-09-17T17:44:45.5614820Z                ^
2024-09-17T17:44:45.5616800Z ../../../../../qt-everywhere-src-5.15.15/qtwebengine/src/3rdparty/chromium/base/strings/string16.h:209:10: note: previous explicit instantiation is here
2024-09-17T17:44:45.5618470Z     std::basic_string<base::char16,
2024-09-17T17:44:45.5619310Z          ^
2024-09-17T17:44:45.5619680Z 1 error generated.

@cbjeukendrup
Copy link

I can't really help with that specifically, you'll really have to look at the patches that HomeBrew applies.

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.

2 participants