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

qt: add qtversion.xml and caveats. #124923

Closed
wants to merge 1 commit into from

Conversation

MikeMcQuaid
Copy link
Member

It seems a few people want this:

Without this file, it's a bit of a pain to manually enter these settings and QtCreator will resolve the /opt/homebrew symlink at choose time so get broken by brew upgrades of Qt.

@MikeMcQuaid MikeMcQuaid added the CI-skip-dependents Pass --skip-dependents to brew test-bot. label Mar 6, 2023
@BrewTestBot BrewTestBot added nodejs Node or npm use is a significant feature of the PR or issue perl Perl use is a significant feature of the PR or issue CI-linux-self-hosted Build on Linux self-hosted runner long build Needs CI-long-timeout icu4c ICU use is a significant feature of the PR or issue ffmpeg FFMPEG use is a significant feature of the PR or issue labels Mar 6, 2023
Formula/qt.rb Outdated Show resolved Hide resolved
qtversion_xml = share/"qtcreator/QtProject/qtcreator/qtversion.xml"
qtversion_xml.dirname.mkpath
qtversion_xml.write <<~XML
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Member Author

Choose a reason for hiding this comment

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

Formula/qt.rb Outdated Show resolved Hide resolved
<valuemap type="QVariantMap">
<value type="int" key="Id">1</value>
<value type="QString" key="Name">Qt %{Qt:Version} (Homebrew)</value>
<value type="QString" key="QMakePath">#{opt_bin}/qmake</value>
Copy link
Member Author

Choose a reason for hiding this comment

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

opt_bin is important here so it persists upgrades

carlocab
carlocab previously approved these changes Mar 7, 2023
Copy link
Member

@carlocab carlocab left a comment

Choose a reason for hiding this comment

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

I'm happy with doing this in principle, but have no idea how to tell if this works. But CC @paperchalice who might know something about this.

Copy link
Member

@SMillerDev SMillerDev left a comment

Choose a reason for hiding this comment

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

I'm fine with it if you leave a comment why we ship this separately

@MikeMcQuaid
Copy link
Member Author

I'm happy with doing this in principle, but have no idea how to tell if this works.

@carlocab I've tested this locally (I made it to scratch my own itch) and it works well.

I'm fine with it if you leave a comment why we ship this separately

@SMillerDev Done, thanks!

SMillerDev
SMillerDev previously approved these changes Mar 8, 2023
carlocab
carlocab previously approved these changes Mar 8, 2023
@carlocab carlocab removed the CI-linux-self-hosted Build on Linux self-hosted runner label Mar 8, 2023
@ZhongRuoyu
Copy link
Member

ZhongRuoyu commented Mar 9, 2023

No space left on device:

2023-03-08T17:50:53.3595910Z FAILED: qtconnectivity/src/bluetooth/CMakeFiles/Bluetooth.dir/cmake_pch.hxx.gch 
2023-03-08T17:50:53.3601362Z /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/g++-11 -DBluetooth_EXPORTS -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_BLUETOOTH_LIB -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x070000 -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_MOC_COMPAT -DQT_NETWORK_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_USE_QSTRINGBUILDER -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/tmp/qt-20230308-51403-1h9tyg9/qt-everywhere-src-6.4.2/qtconnectivity/src/bluetooth/Bluetooth_autogen/include -I/tmp/qt-20230308-51403-1h9tyg9/qt-everywhere-src-6.4.2/qtbase/include -I/tmp/qt-20230308-51403-1h9tyg9/qt-everywhere-src-6.4.2/qtbase/include/QtBluetooth -I/tmp/qt-20230308-51403-1h9tyg9/qt-everywhere-src-6.4.2/qtconnectivity/src/bluetooth -I/tmp/qt-20230308-51403-1h9tyg9/qt-everywhere-src-6.4.2/qtbase/include/QtBluetooth/6.4.2 -I/tmp/qt-20230308-51403-1h9tyg9/qt-everywhere-src-6.4.2/qtbase/include/QtBluetooth/6.4.2/QtBluetooth -I/tmp/qt-20230308-51403-1h9tyg9/qt-everywhere-src-6.4.2/qtbase/include/QtCore -I/tmp/qt-20230308-51403-1h9tyg9/qt-everywhere-src-6.4.2/qtbase/mkspecs/linux-g++ -I/tmp/qt-20230308-51403-1h9tyg9/qt-everywhere-src-6.4.2/qtbase/include/QtNetwork -I/tmp/qt-20230308-51403-1h9tyg9/qt-everywhere-src-6.4.2/qtbase/src/corelib -I/tmp/qt-20230308-51403-1h9tyg9/qt-everywhere-src-6.4.2/qtbase/include/QtCore/6.4.2 -I/tmp/qt-20230308-51403-1h9tyg9/qt-everywhere-src-6.4.2/qtbase/include/QtCore/6.4.2/QtCore -I/tmp/qt-20230308-51403-1h9tyg9/qt-everywhere-src-6.4.2/qtbase/src/network -I/tmp/qt-20230308-51403-1h9tyg9/qt-everywhere-src-6.4.2/qtbase/include/QtNetwork/6.4.2 -I/tmp/qt-20230308-51403-1h9tyg9/qt-everywhere-src-6.4.2/qtbase/include/QtNetwork/6.4.2/QtNetwork -DNDEBUG -O2 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fno-exceptions -fPIC -Wsuggest-override -fcf-protection -std=c++17 -Winvalid-pch -x c++-header -include /tmp/qt-20230308-51403-1h9tyg9/qt-everywhere-src-6.4.2/qtconnectivity/src/bluetooth/CMakeFiles/Bluetooth.dir/cmake_pch.hxx -MD -MT qtconnectivity/src/bluetooth/CMakeFiles/Bluetooth.dir/cmake_pch.hxx.gch -MF qtconnectivity/src/bluetooth/CMakeFiles/Bluetooth.dir/cmake_pch.hxx.gch.d -o qtconnectivity/src/bluetooth/CMakeFiles/Bluetooth.dir/cmake_pch.hxx.gch -c /tmp/qt-20230308-51403-1h9tyg9/qt-everywhere-src-6.4.2/qtconnectivity/src/bluetooth/CMakeFiles/Bluetooth.dir/cmake_pch.hxx.cxx
2023-03-08T17:50:53.3604908Z In file included from /tmp/qt-20230308-51403-1h9tyg9/qt-everywhere-src-6.4.2/qtbase/include/QtNetwork/qudpsocket.h:1,
2023-03-08T17:50:53.3605482Z                  from /tmp/qt-20230308-51403-1h9tyg9/qt-everywhere-src-6.4.2/qtbase/include/QtNetwork/QtNetwork:65,
2023-03-08T17:50:53.3606103Z                  from /tmp/qt-20230308-51403-1h9tyg9/qt-everywhere-src-6.4.2/qtconnectivity/src/bluetooth/CMakeFiles/Bluetooth.dir/cmake_pch.hxx:6,
2023-03-08T17:50:53.3606516Z                  from <command-line>:
2023-03-08T17:50:53.3607081Z /tmp/qt-20230308-51403-1h9tyg9/qt-everywhere-src-6.4.2/qtbase/src/network/socket/qudpsocket.h:59:2: fatal error: cannot write PCH file: No space left on device
2023-03-08T17:50:53.3607449Z    59 | };
2023-03-08T17:50:53.3607619Z       |  ^
2023-03-08T17:50:53.3607821Z compilation terminated.

@carlocab
Copy link
Member

carlocab commented Mar 9, 2023

Yea, needs the self-hosted runner. But that also fails with the same error because it needs to be recreated, and our recreation workflow is broken ATM.

@carlocab carlocab removed the CI-long-timeout Use longer GitHub Actions CI timeout. label Mar 9, 2023
@MikeMcQuaid
Copy link
Member Author

@Bo98 How long would it take to move our Linux creation workflow over to Orchestrator? If not too long: that'd be a great thing to be able to prioritise 🙇🏻

@carlocab
Copy link
Member

carlocab commented Mar 9, 2023

One thing we could also consider doing is migrating our self-hosted runner workflow to using a GitHub large runner instead. Not sure how the costs compare, but presumably it shouldn't be too different.

@MikeMcQuaid
Copy link
Member Author

We should definitely do this. I'm much less concerned about costs than reliability and removing our need to maintain infrastructure.

@carlocab
Copy link
Member

carlocab commented Mar 9, 2023

If you set up a large GitHub runner (maybe called homebrew-large-bottle-build) for the org and wire it up to Homebrew/core I'll poke at the workflows to get it going.

@MikeMcQuaid
Copy link
Member Author

@carlocab Done! Have made it as large as we can. That may be excessive but worth it for a trial run I think.

carlocab added a commit to carlocab/homebrew-core that referenced this pull request Mar 9, 2023
@carlocab
Copy link
Member

carlocab commented Mar 9, 2023

Testing this out at #125189.

@carlocab carlocab added the CI-linux-large-runner Use a large GitHub runner on Linux label Mar 9, 2023
@carlocab
Copy link
Member

carlocab commented Mar 9, 2023

Testing this out at #125189.

This is looking good, I think. We should be all set here once #125189 is merged.

@Bo98
Copy link
Member

Bo98 commented Mar 9, 2023

@Bo98 How long would it take to move our Linux creation workflow over to Orchestrator? If not too long: that'd be a great thing to be able to prioritise 🙇🏻

I can prioritise it this weekend.

Though a quicker fix is to just revert what broke the workflow.

@Bo98
Copy link
Member

Bo98 commented Mar 9, 2023

One thing we could also consider doing is migrating our self-hosted runner workflow to using a GitHub large runner instead. Not sure how the costs compare, but presumably it shouldn't be too different.

Difference being GitHub large runners have a maximum 6 hour limit.

It's why we figured it out it's only a replacement for the "need more storage" case, e.g. bottle uploads.

carlocab added a commit that referenced this pull request Mar 9, 2023
@MikeMcQuaid
Copy link
Member Author

Though a quicker fix is to just revert what broke the workflow.

I'm fine with that. I personally have no idea what broke this. It sounded like from what @p-linnane said that this maybe wasn't a change on our side but on Google's?

Difference being GitHub large runners have a maximum 6 hour limit.

It's why we figured it out it's only a replacement for the "need more storage" case, e.g. bottle uploads.

I think we need to move away from needing these absurdly long timeouts.

A relatively short-term fix here is moving the test formula/test dependents steps into separate dependent jobs rather than separate steps.

@Bo98
Copy link
Member

Bo98 commented Mar 9, 2023

I'm fine with that. I personally have no idea what broke this. It sounded like from what @p-linnane said that this maybe wasn't a change on our side but on Google's?

#120777

It seems a few people want this:
- https://stackoverflow.com/questions/68278937/adding-a-homebrew-installed-qt-to-qt-creator-on-a-mac-missing-examples-and-mor
- https://stackoverflow.com/questions/53683242/adding-a-homebrew-installed-qt-to-qt-creator-on-a-mac

Without this file, it's a bit of a pain to manually enter these
settings and QtCreator will resolve the `/opt/homebrew` symlink at
choose time so get broken by `brew upgrade`s of Qt.
@BrewTestBot BrewTestBot added the CI-linux-self-hosted Build on Linux self-hosted runner label Mar 9, 2023
@ZhongRuoyu ZhongRuoyu added the CI-long-timeout Use longer GitHub Actions CI timeout. label Mar 9, 2023
@carlocab
Copy link
Member

carlocab commented Mar 9, 2023

HOMEBREW_MAKE_JOBS: 64 😎

@p-linnane
Copy link
Member

Reverting the upgrade to the setup-gcloud action: #125210

@p-linnane
Copy link
Member

I've manually run the self-hosted recreation job now that #125210 is merged and it completed successfully.

@ZhongRuoyu ZhongRuoyu removed the CI-long-timeout Use longer GitHub Actions CI timeout. label Mar 9, 2023
@BrewTestBot
Copy link
Member

🤖 A scheduled task has triggered a merge.

@MikeMcQuaid MikeMcQuaid deleted the qtversion_xml branch March 10, 2023 08:40
@MikeMcQuaid
Copy link
Member Author

Thanks @carlocab and everyone else who helped get this over the line!

zengxiangrui-kuaishou added a commit to zengxiangrui-kuaishou/homebrew-core that referenced this pull request Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-linux-large-runner Use a large GitHub runner on Linux CI-linux-self-hosted Build on Linux self-hosted runner CI-skip-dependents Pass --skip-dependents to brew test-bot. ffmpeg FFMPEG use is a significant feature of the PR or issue icu4c ICU use is a significant feature of the PR or issue long build Needs CI-long-timeout nodejs Node or npm use is a significant feature of the PR or issue perl Perl use is a significant feature of the PR or issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants