Skip to content

Conversation

@hoffie
Copy link
Member

@hoffie hoffie commented May 31, 2021

Let the autobuild default to latest xcode (= 12.x) again, but still ensure that we limit SDK support to 10.15 due to lack of Qt-wise support for newer versions.

This is a different approach to the already merged #1655. This change has a (low) chance of fixing recent Mac issues on Big Sur
(#1643, #1791). At least, it makes us use the latest officially recommended setup.

This only touches the regular Mac build, not the legacy build.

Support matrix:
https://doc.qt.io/qt-5/macos.html

Variables:
https://doc.qt.io/qt-5/qmake-variable-reference.html#qmake-mac-sdk

Explanations:
https://doc.qt.io/qt-5/macos-deployment.html

This PR is just a blind test if it works like that at all (cannot try locally). If it does, it would be interesting to have affected users test this version.

cc @softins

@hoffie hoffie added this to the Release 3.8.1 milestone May 31, 2021
@hoffie hoffie marked this pull request as draft May 31, 2021 07:44
@hoffie
Copy link
Member Author

hoffie commented May 31, 2021

Autobuild failed, QMAKE_MAC_SDK=macosx10.15 doesn't seem to be respected while the other option (QMAKE_MACOSX_DEPLOYMENT_TARGET=10.13) is. Investigating.

Edit: Meh, it's just me being bad at properly using the method introduced in my commit before. Fixed and rebuilding now.

@hoffie hoffie force-pushed the mac-xcode-12 branch 3 times, most recently from 08ef331 to b467af2 Compare May 31, 2021 09:23
@softins
Copy link
Member

softins commented May 31, 2021

I think what you have done is not enough. Xcode 12 only includes the 11.1 SDK by default. See my test run from 25 days ago at https://github.com/softins/jamulus/runs/2522272216 where I had added a line xcodebuild -sdk -version to the prepare scripts to see which SDKs were present. There is only the latest one SDK for each platform.

You would need to determine what commands are needed to load an additional older SDK before you can select it for building with. I started to look at that, but then side-stepped it by switching to Xcode 11.

@hoffie
Copy link
Member Author

hoffie commented May 31, 2021

I think what you have done is not enough. Xcode 12 only includes the 11.1 SDK by default. See my test run from 25 days ago at https://github.com/softins/jamulus/runs/2522272216 where I had added a line xcodebuild -sdk -version to the prepare scripts to see which SDKs were present. There is only the latest one SDK for each platform.

Yep, thanks, I noticed that some minutes ago and tried Xcode 12 which still ships 10.15. Currently fails in python scripts, looking into this now.

You would need to determine what commands are needed to load an additional older SDK before you can select it for building with. I started to look at that, but then side-stepped it by switching to Xcode 11.

Yeah, I think this was and is the simplest solution. It's just that I'm hoping that code generated by newer Xcode might magically make our leak bugs go away...

@hoffie hoffie force-pushed the mac-xcode-12 branch 3 times, most recently from c66d866 to 7a329a2 Compare May 31, 2021 11:06
@softins
Copy link
Member

softins commented May 31, 2021

If you are pinning the Xcode version to 12.0 (I think 12.1 would work too), in order to get the 10.15 SDK as default, I suspect you don't need the EXTRA_QMAKE_ARGS any more?

@softins
Copy link
Member

softins commented May 31, 2021

Let the autobuild default to Xcode 12 again, but still ensure
that we limit SDK support to 10.15 due to lack of Qt-wise support
for newer versions.

This is a slightly different approach to the already merged jamulussoftware#1655.

We are limited to <= Xcode-12.1.1 though because we require SDK 10.15
which is not shipped on more recent versions anymore.
This change has a (low) chance of fixing recent Mac issues on Big Sur
(jamulussoftware#1643, jamulussoftware#1791). At least, it makes us use the latest officially
recommended setup.

This only touches the regular Mac build, not the legacy build.

Support matrix:
https://doc.qt.io/qt-5/macos.html

Variables:
https://doc.qt.io/qt-5/qmake-variable-reference.html#qmake-mac-sdk

Explanations:
https://doc.qt.io/qt-5/macos-deployment.html
@hoffie
Copy link
Member Author

hoffie commented May 31, 2021

If you are pinning the Xcode version to 12.0 (I think 12.1 would work too)

Ah, right. Trying with 12.1.1 now.

in order to get the 10.15 SDK as default, I suspect you don't need the EXTRA_QMAKE_ARGS any more?

Hrm, yep, can probably drop it. Will leave it in now.

Do you know a way to use older SDKs with latest Xcode? All I've found was inofficial binary dumps, which I'd rather not use due to legal and security questions...?

@gilgongo gilgongo mentioned this pull request Sep 4, 2021
57 tasks
@ann0see
Copy link
Member

ann0see commented Sep 5, 2021

@emlynmac since you‘re a macOS specialist, could you have a look at this please?

@emlynmac
Copy link
Contributor

emlynmac commented Sep 5, 2021

Is there a reason to use 12.1.1 instead of the current 12.4 Xcode?

@ann0see
Copy link
Member

ann0see commented Sep 5, 2021

I doubt there’s a reason. Probably 12.1.1 was the latest version as this PR was opened?

@emlynmac
Copy link
Contributor

emlynmac commented Sep 5, 2021

Maybe let's get as far up the chain as we can then?
I seem to recall seeing a branch for qt 6 which had support for latest Xcode already. Is that something that needs consideration?

@ann0see
Copy link
Member

ann0see commented Sep 5, 2021

Yes, I think @dcorson-ticino-com worked on Qt 6 support, but I'm not sure how far he got.
So we should move this one up to the latest Xcode version.

@ann0see ann0see marked this pull request as ready for review September 5, 2021 21:56
@ann0see
Copy link
Member

ann0see commented Sep 5, 2021

Let's have a look at the CI

@dcorson-ticino-com
Copy link
Contributor

Yes, I think @dcorson-ticino-com worked on Qt 6 support, but I'm not sure how far he got.
So we should move this one up to the latest Xcode version.

Yes, I have a Qt6 branch that compiles and works fine as far as I can see.
As I don't know what Xcode is I don't think I changed it.

@softins
Copy link
Member

softins commented Sep 6, 2021

Is there a reason to use 12.1.1 instead of the current 12.4 Xcode?

@emlynmac Yes, see the comments further up (I've not been active over the weekend, so just picking up this conversation). Qt5 is only compatible with SDKs up to 10.15. If you use SDK 11, you get lots of warning messages from Qt about compatibility.

Xcode 12.1.1 is apparently the last one that comes with SDK 10.15, which is why we pinned that one. We should continue to do so, unless someone can come up with a way to use SDK 10.15 with later versions of Xcode.

@ann0see
Copy link
Member

ann0see commented Sep 6, 2021

@dcorson-ticino-com could you please open a PR on your work? Probably all the macOS issues are somehow related and Qt6 might solve them.

@emlynmac @softins is it worth to move this forward for the next release or not?

@softins
Copy link
Member

softins commented Sep 6, 2021

@dcorson-ticino-com could you please open a PR on your work? Probably all the macOS issues are somehow related and Qt6 might solve them.

Certainly worth trying, but I'm not optimistic that Qt6 would be any better than Qt5 on Mac.

@emlynmac @softins is it worth to move this forward for the next release or not?

Maybe for 3.9.0, but certainly not for 3.8.1.

@dcorson-ticino-com
Copy link
Contributor

@dcorson-ticino-com could you please open a PR on your work? Probably all the macOS issues are somehow related and Qt6 might solve them.

Give me a couple of days, I'm no longer sure in what kind of state it is in.

@ann0see ann0see modified the milestones: Release 3.8.1, Release 3.9.0 Sep 6, 2021
@ann0see
Copy link
Member

ann0see commented Sep 6, 2021

Ok. De-tagged.

@ann0see
Copy link
Member

ann0see commented Jan 2, 2022

Give me a couple of days, I'm no longer sure in what kind of state it is in.

@emlynmac @dcorson-ticino-com @pljones not quite sure what to do with this. I'd rather open an issue to discuss the macOS problems...

@dcorson-ticino-com
Copy link
Contributor

not quite sure what to do with this. I'd rather open an issue to discuss the macOS problems...

Tony has gone forward with this, but having compilation problems on git. I had it working OK under both QT5 and QT6 compiled locally.
As to the macOS problems I think it will be worth while to see how QT6 helps.

@ann0see
Copy link
Member

ann0see commented Jan 2, 2022

Ok. If we do remove the license note, we could get it to work.

@ann0see
Copy link
Member

ann0see commented Jan 2, 2022

@hoffie
Copy link
Member Author

hoffie commented Jan 23, 2022

@softins @ann0see @emlynmac What's the current state of this PR?
I think the original proposal (update to 12.1.1) still makes sense.

The initial PR did this, but it has been modified to update to 12.4, which is sub-optimal, I think:

This official page confirms that 12.1.x is (and probably will stay?) the last version to support SDK 10.15, which we need for Qt5 compatibility: https://developer.apple.com/support/xcode/
This inofficial page lists 12.1.1 as the most-recent 12.1.x release: https://xcodereleases.com/

As all the newly introduced logic wrt EXTRA_QMAKE_ARGS as its no longer needed, I'm closing this PR and will open a new one for the 12.1.1 update.

@hoffie hoffie closed this Jan 23, 2022
@hoffie hoffie deleted the mac-xcode-12 branch January 23, 2022 11:20
@hoffie hoffie removed this from the Release 3.9.0 milestone Jan 23, 2022
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.

5 participants