Re: 10.15 Xcode version: Buildbot, vs. GitHub CI

2021-12-01 Thread Ryan Schmidt
On Dec 1, 2021, at 09:18, Christopher Nielsen wrote:
> 
> * Would it be feasible to update our 10.15 buildbot to a newer Xcode release? 
> Or are there certain ports/situations that necessitate remaining with 11.7?

Because there are a variety of scenarios where a build fails if the OS version 
and SDK version are not the same, I deliberately keep Xcode versions on the 
buildbot machines* on the last version that contains the SDK version that 
matches the OS version. If Xcode 12 contains the macOS 10.15 SDK, I can update 
the 10.15 worker to it, otherwise I would not want to do that.

I do have work in progress on a MacOSX.sdk port which should make it easier for 
ports to request any SDK on any OS. It is not committed yet.


*there might be one case where I did update to a newer version; I'd have to 
review



Re: 10.15 Xcode version: Buildbot, vs. GitHub CI

2021-12-01 Thread Christopher Chavez
> This brings up two questions:
> * Would it be feasible to update our 10.15 buildbot to a newer Xcode release? 
> Or are there certain ports/situations that necessitate remaining with 11.7?

Xcode 12 prohibiting implicit function declarations is probably no longer a 
reason since these must have been resolved to support Big Sur/Monterey.

> * Do we have control over the Xcode version used for GitHub CI, or is 12.4 
> the only option?

Yes, or I thought we did. A year ago I tried adding a second 10.15 CI builder 
to have both Xcode 11 and Xcode 12 beta: 
https://github.com/macports/macports-ports/pull/8162

The important part was to run xcode-select with the path for the desired 
version. The available versions are listed at 
https://github.com/actions/virtual-environments/blob/main/images/macos/macos-10.15-Readme.md#xcode

However there may have been an issue where the command line tools didn’t match 
the selected Xcode version.

Christopher A. Chavez


Re: 10.15 Xcode version: Buildbot, vs. GitHub CI

2021-12-01 Thread Jason Liu
The code isn't actually mine... I simply took the code from other
Portfiles, e.g. the wxWidgets 1.0 PortGroup
,
phantomjs-qt
,
qt5
,
qt6
,
etc. Although admittedly, the code in those Portfiles are slightly more
generalized than mine, since I'm only interested in the specific case of
the macOS 10.12 SDK on macOS 10.11.

-- 
Jason Liu


On Wed, Dec 1, 2021 at 12:50 PM Chris Jones 
wrote:

>
> you are making a number of assumptions in the code below on where things
> are installed, that I don't think are universally valid. I think it
> would be better to use the macPort utilities to query the SDK version
> and/or Xcode version instead.
>
> Chris
>
> On 01/12/2021 5:14 pm, Jason Liu wrote:
> > A very similar situation occurs on macOS 10.11: It's fairly common to
> > install Xcode 8.2.1 on macOS 10.11, and Xcode 8.2.1 comes with the macOS
> > 10.12 SDK. So, in my upcoming fixes that allows godot to compile on
> > older macOSes, I have the following check:
> >
> > if {${os.platform} eq "darwin" && ${os.major} <= 15} {
> >  
> >  set sdks_dir
> ${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs
> >  set add_appkit_wrapper yes
> >  if {![catch {file lstat $sdks_dir/MacOSX10.12.sdk finfo}]} {
> >  set add_appkit_wrapper no
> >  }
> > }
> >
> > Thus, if the Portfile detects the situation of the macOS 10.12 SDK being
> > installed on macOS 10.11, then it won't add my AppKit compatibility
> > wrapper file.
> >
> > I suspect a similar technique might need to be put in place to account
> > for Xcode 11 vs 12 being installed on macOS 10.15.
> >
> > --
> > Jason  Liu
> >
> >
> > On Wed, Dec 1, 2021 at 10:32 AM Chris Jones  > > wrote:
> >
> > Hi,
> >
> > On 01/12/2021 3:18 pm, Christopher Nielsen wrote:
> >  > Just encountered an interesting situation, where a Swift-based
> > port builds successfully via 10.15 CI, but fails on our buildbot.
> >  >
> >  > This appears to be related to Xcode versions: Presently our 10.15
> > buildbot has Xcode 11.7, whereas 10.15 CI has Xcode 12.4.
> >  >
> >  > This brings up two questions:
> >  > * Would it be feasible to update our 10.15 buildbot to a newer
> > Xcode release? Or are there certain ports/situations that
> > necessitate remaining with 11.7?
> >  > * Do we have control over the Xcode version used for GitHub CI,
> > or is 12.4 the only option?
> >  >
> >  > Ideally both should utilize the same Xcode 12 release,
> > specifically one that still ships with the 10.15 SDK. So the choices
> > would be 12.0, 12.0.1, and 12.1.
> >  >
> >  > Thoughts?
> >  >
> >
> > MacPorts cannot mandate what Xcode a user has installed. Both Xcode
> 11
> > and 12 are valid options to have on macOS10.15 (and, I might be wrong
> > here, but from memory Ryan specifically keeps the builder on Xcode
> > 11 to
> > avoid issues with Xcode 12 also shipping the macOS11 SDK).
> >
> > So basically the port needs to handle both, in whatever way is
> > appropriate. I guess this is the new mint port
> >
> >
> >
> https://github.com/macports/macports-ports/commit/cfc6d01aa685a5a9cc30264bc2a7e9d1badf587e
> > <
> https://github.com/macports/macports-ports/commit/cfc6d01aa685a5a9cc30264bc2a7e9d1badf587e
> >
> >
> > I see there is a check in there on the Darwin version. It sounds this
> > this should be changed to a test specifically on the Xcode(CLT)
> > versions
> > installed, if the requirement is really Xcode 12 and above, and not
> > really the Darwin version.
> >
> > Chris
> >
>


Re: 10.15 Xcode version: Buildbot, vs. GitHub CI

2021-12-01 Thread Chris Jones



you are making a number of assumptions in the code below on where things 
are installed, that I don't think are universally valid. I think it 
would be better to use the macPort utilities to query the SDK version 
and/or Xcode version instead.


Chris

On 01/12/2021 5:14 pm, Jason Liu wrote:
A very similar situation occurs on macOS 10.11: It's fairly common to 
install Xcode 8.2.1 on macOS 10.11, and Xcode 8.2.1 comes with the macOS 
10.12 SDK. So, in my upcoming fixes that allows godot to compile on 
older macOSes, I have the following check:


if {${os.platform} eq "darwin" && ${os.major} <= 15} {
     
     set sdks_dir ${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs
     set add_appkit_wrapper yes
     if {![catch {file lstat $sdks_dir/MacOSX10.12.sdk finfo}]} {
         set add_appkit_wrapper no
     }
}

Thus, if the Portfile detects the situation of the macOS 10.12 SDK being 
installed on macOS 10.11, then it won't add my AppKit compatibility 
wrapper file.


I suspect a similar technique might need to be put in place to account 
for Xcode 11 vs 12 being installed on macOS 10.15.


--
Jason  Liu


On Wed, Dec 1, 2021 at 10:32 AM Chris Jones > wrote:


Hi,

On 01/12/2021 3:18 pm, Christopher Nielsen wrote:
 > Just encountered an interesting situation, where a Swift-based
port builds successfully via 10.15 CI, but fails on our buildbot.
 >
 > This appears to be related to Xcode versions: Presently our 10.15
buildbot has Xcode 11.7, whereas 10.15 CI has Xcode 12.4.
 >
 > This brings up two questions:
 > * Would it be feasible to update our 10.15 buildbot to a newer
Xcode release? Or are there certain ports/situations that
necessitate remaining with 11.7?
 > * Do we have control over the Xcode version used for GitHub CI,
or is 12.4 the only option?
 >
 > Ideally both should utilize the same Xcode 12 release,
specifically one that still ships with the 10.15 SDK. So the choices
would be 12.0, 12.0.1, and 12.1.
 >
 > Thoughts?
 >

MacPorts cannot mandate what Xcode a user has installed. Both Xcode 11
and 12 are valid options to have on macOS10.15 (and, I might be wrong
here, but from memory Ryan specifically keeps the builder on Xcode
11 to
avoid issues with Xcode 12 also shipping the macOS11 SDK).

So basically the port needs to handle both, in whatever way is
appropriate. I guess this is the new mint port



https://github.com/macports/macports-ports/commit/cfc6d01aa685a5a9cc30264bc2a7e9d1badf587e



I see there is a check in there on the Darwin version. It sounds this
this should be changed to a test specifically on the Xcode(CLT)
versions
installed, if the requirement is really Xcode 12 and above, and not
really the Darwin version.

Chris



Re: 10.15 Xcode version: Buildbot, vs. GitHub CI

2021-12-01 Thread Jason Liu
A very similar situation occurs on macOS 10.11: It's fairly common to
install Xcode 8.2.1 on macOS 10.11, and Xcode 8.2.1 comes with the macOS
10.12 SDK. So, in my upcoming fixes that allows godot to compile on older
macOSes, I have the following check:

if {${os.platform} eq "darwin" && ${os.major} <= 15} {

set sdks_dir ${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs
set add_appkit_wrapper yes
if {![catch {file lstat $sdks_dir/MacOSX10.12.sdk finfo}]} {
set add_appkit_wrapper no
}
}

Thus, if the Portfile detects the situation of the macOS 10.12 SDK being
installed on macOS 10.11, then it won't add my AppKit compatibility wrapper
file.

I suspect a similar technique might need to be put in place to account for
Xcode 11 vs 12 being installed on macOS 10.15.

-- 
Jason  Liu


On Wed, Dec 1, 2021 at 10:32 AM Chris Jones 
wrote:

> Hi,
>
> On 01/12/2021 3:18 pm, Christopher Nielsen wrote:
> > Just encountered an interesting situation, where a Swift-based port
> builds successfully via 10.15 CI, but fails on our buildbot.
> >
> > This appears to be related to Xcode versions: Presently our 10.15
> buildbot has Xcode 11.7, whereas 10.15 CI has Xcode 12.4.
> >
> > This brings up two questions:
> > * Would it be feasible to update our 10.15 buildbot to a newer Xcode
> release? Or are there certain ports/situations that necessitate remaining
> with 11.7?
> > * Do we have control over the Xcode version used for GitHub CI, or is
> 12.4 the only option?
> >
> > Ideally both should utilize the same Xcode 12 release, specifically one
> that still ships with the 10.15 SDK. So the choices would be 12.0, 12.0.1,
> and 12.1.
> >
> > Thoughts?
> >
>
> MacPorts cannot mandate what Xcode a user has installed. Both Xcode 11
> and 12 are valid options to have on macOS10.15 (and, I might be wrong
> here, but from memory Ryan specifically keeps the builder on Xcode 11 to
> avoid issues with Xcode 12 also shipping the macOS11 SDK).
>
> So basically the port needs to handle both, in whatever way is
> appropriate. I guess this is the new mint port
>
>
>
> https://github.com/macports/macports-ports/commit/cfc6d01aa685a5a9cc30264bc2a7e9d1badf587e
>
> I see there is a check in there on the Darwin version. It sounds this
> this should be changed to a test specifically on the Xcode(CLT) versions
> installed, if the requirement is really Xcode 12 and above, and not
> really the Darwin version.
>
> Chris
>


Re: 10.15 Xcode version: Buildbot, vs. GitHub CI

2021-12-01 Thread Chris Jones

Hi,

On 01/12/2021 3:18 pm, Christopher Nielsen wrote:

Just encountered an interesting situation, where a Swift-based port builds 
successfully via 10.15 CI, but fails on our buildbot.

This appears to be related to Xcode versions: Presently our 10.15 buildbot has 
Xcode 11.7, whereas 10.15 CI has Xcode 12.4.

This brings up two questions:
* Would it be feasible to update our 10.15 buildbot to a newer Xcode release? 
Or are there certain ports/situations that necessitate remaining with 11.7?
* Do we have control over the Xcode version used for GitHub CI, or is 12.4 the 
only option?

Ideally both should utilize the same Xcode 12 release, specifically one that 
still ships with the 10.15 SDK. So the choices would be 12.0, 12.0.1, and 12.1.

Thoughts?



MacPorts cannot mandate what Xcode a user has installed. Both Xcode 11 
and 12 are valid options to have on macOS10.15 (and, I might be wrong 
here, but from memory Ryan specifically keeps the builder on Xcode 11 to 
avoid issues with Xcode 12 also shipping the macOS11 SDK).


So basically the port needs to handle both, in whatever way is 
appropriate. I guess this is the new mint port



https://github.com/macports/macports-ports/commit/cfc6d01aa685a5a9cc30264bc2a7e9d1badf587e

I see there is a check in there on the Darwin version. It sounds this 
this should be changed to a test specifically on the Xcode(CLT) versions 
installed, if the requirement is really Xcode 12 and above, and not 
really the Darwin version.


Chris


10.15 Xcode version: Buildbot, vs. GitHub CI

2021-12-01 Thread Christopher Nielsen
Just encountered an interesting situation, where a Swift-based port builds 
successfully via 10.15 CI, but fails on our buildbot.

This appears to be related to Xcode versions: Presently our 10.15 buildbot has 
Xcode 11.7, whereas 10.15 CI has Xcode 12.4.

This brings up two questions:
* Would it be feasible to update our 10.15 buildbot to a newer Xcode release? 
Or are there certain ports/situations that necessitate remaining with 11.7?
* Do we have control over the Xcode version used for GitHub CI, or is 12.4 the 
only option?

Ideally both should utilize the same Xcode 12 release, specifically one that 
still ships with the 10.15 SDK. So the choices would be 12.0, 12.0.1, and 12.1.

Thoughts?