On Jan 27, 2020, at 04:22, Chris Jones wrote:
> On 27/01/2020 10:15 am, Chris Jones wrote:
>> On 27/01/2020 8:10 am, Ryan Schmidt wrote:
>>>
>>>
>>> On Jan 26, 2020, at 09:37, Christopher Jones wrote:
>>>
>>>> I am seeing this warning in a number of builds on the 10.15 build bot
>>>> Warning: cltversion: The Command Line Tools are installed, but MacPorts
>>>> cannot determine the version.
>>>> Warning: cltversion: For a possible fix, please see:
>>>> https://trac.macports.org/wiki/ProblemHotlist#reinstall-clt
>>>> Could someone take a look and follow the instructions to make sure the CLT
>>>> is properly installed ?
>>>
>>> I don't see why the CLT would have become uninstalled on a buildbot
>>> worker... Recent builds seem to be working fine... If you are seeing builds
>>> that are not working, can you share those build URLs?
>> As the message above says, its not un-installed. A recent Xcode update has
>> removed the CLT installation receipts, so the Apple update system is no
>> longer aware it is still installed, and the MacPorts checks as performed by
>> the xcode_workarounds/cltversion PGs for the CLT versions are unable to
>> determine the version installed.
>> The instructions at
>> https://trac.macports.org/wiki/ProblemHotlist#reinstall-clt
>> give the work-arounds needed to fix this and restore the receipts.
>> This is, I believe, a bug in the 10.15 Xcode versions. I have seen this
>> happen on every update I have made on my local machine.
>> The above warning appears in the gcc8 build, for instance
>> https://build.macports.org/builders/ports-10.15_x86_64-builder/builds/22242/steps/install-port/logs/stdio
>> The build was successfully in the end, but only because the
>> xcode_workaround detects the partly broken CLT and ignores it. It would be
>> better to properly fix the installation to make sure the CLT version matches
>> the Xcode installation (which currently the PGs cannot do).
>
> b.t.w. if you want to try by hand the checks that are generating the warning,
> see
>
> <https://github.com/macports/macports-ports/blob/master/_resources/port1.0/group/cltversion-1.0.tcl>
>
> See the lines running pkgutil (there are multiple tries, as the exact syntax
> varies by OS version, so the PG tries each in turn until it finds one that
> works). You should be able to get the version info for the CLT from one of
> them. e.g. (on a 10.13 machine)
>
> > /usr/sbin/pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
> package-id: com.apple.pkg.CLTools_Executables
> version: 10.1.0.0.1.1539992718
> volume: /
> location: /
> install-time: 1540935540
> groups: com.apple.FindSystemFiles.pkg-group
>
> If none of the attempts gives any info, but the PG is able to determine the
> CLT is present (by checking for the existence of a particular file) you get
> the warning above.
Oh right. Sorry... I've updated the 10.15 worker to Xcode 11.3.1 and
reinstalled the CLT. Hopefully that solves it for now.