Re: Any reason not to update to Xcode 12.2 on Catalina?

2020-11-16 Thread raf
On Mon, Nov 16, 2020 at 06:45:17PM -0600, Ryan Schmidt 
 wrote:

> On Nov 16, 2020, at 17:32, raf wrote:
> 
> > On Sun, Nov 15, 2020 at 11:56:54AM -0600, Ryan Schmidt wrote:
> > 
> >> You should definitely never run with a mismatched set of Xcode and its
> >> command line tools. Either update the command line tools to the Xcode
> >> 12.2 version or downgrade Xcode to whatever it was before. Using Xcode
> >> 11.x and matching CLT on macOS 10.15 will keep you from encountering
> >> some build failures.
> > 
> > Hi,
> > 
> > I have "XCode 11.3 (11C29)" (on macos-10.14.6) and,
> > in its Preferences / Locations, it says
> > "Command Line Tools: XCode 11.3 (11C29)".
> > 
> > But pkgutil seems to say otherwise:
> > 
> >  $ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep version
> >  version: 10.3.0.0.1.1562985497
> > 
> > I haven't noticed any problem (yet), but that looks
> > like a mismatch. Should I upgrade the command line
> > tools anyway? Note that I never actually use the XCode
> > app itself, just the command line tools. I suppose the
> > answer is yes.
> > 
> > Also, is the XCode app mistaken about which version of
> > the command line tools are there, or is it just
> > referring to its embedded version of them?
> 
> This poorly-named Xcode preferences setting is showing you the same
> information as running "xcode-select -p". This tells you what you
> will be running if you run e.g. "clang" on the command line: will you
> get the one that's in Xcode or the one in the standalone command line
> tools package? In your case, it is telling you that you will get the
> one from Xcode 11.3.
> 
> As the pkgutil command shows, your standalone command line tools
> version is 10.3. Because this does not match your Xcode version, you
> should update it.
> 
> MacPorts will use the commands from Xcode if the port indicates that
> it requires that ("use_xcode yes") or if the standalone command line
> tools are not installed, otherwise it will use the commands from the
> command line tools. To avoid problems, make sure the two are the same
> version.

Hi Ryan,

Thanks for that. I have upgraded the command line tools to 11.3
so they match now.

cheers,
raf



Re: Any reason not to update to Xcode 12.2 on Catalina?

2020-11-16 Thread Ryan Schmidt
On Nov 16, 2020, at 17:32, raf wrote:

> On Sun, Nov 15, 2020 at 11:56:54AM -0600, Ryan Schmidt wrote:
> 
>> You should definitely never run with a mismatched set of Xcode and its
>> command line tools. Either update the command line tools to the Xcode
>> 12.2 version or downgrade Xcode to whatever it was before. Using Xcode
>> 11.x and matching CLT on macOS 10.15 will keep you from encountering
>> some build failures.
> 
> Hi,
> 
> I have "XCode 11.3 (11C29)" (on macos-10.14.6) and,
> in its Preferences / Locations, it says
> "Command Line Tools: XCode 11.3 (11C29)".
> 
> But pkgutil seems to say otherwise:
> 
>  $ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep version
>  version: 10.3.0.0.1.1562985497
> 
> I haven't noticed any problem (yet), but that looks
> like a mismatch. Should I upgrade the command line
> tools anyway? Note that I never actually use the XCode
> app itself, just the command line tools. I suppose the
> answer is yes.
> 
> Also, is the XCode app mistaken about which version of
> the command line tools are there, or is it just
> referring to its embedded version of them?

This poorly-named Xcode preferences setting is showing you the same information 
as running "xcode-select -p". This tells you what you will be running if you 
run e.g. "clang" on the command line: will you get the one that's in Xcode or 
the one in the standalone command line tools package? In your case, it is 
telling you that you will get the one from Xcode 11.3.

As the pkgutil command shows, your standalone command line tools version is 
10.3. Because this does not match your Xcode version, you should update it.

MacPorts will use the commands from Xcode if the port indicates that it 
requires that ("use_xcode yes") or if the standalone command line tools are not 
installed, otherwise it will use the commands from the command line tools. To 
avoid problems, make sure the two are the same version.




Re: rebuild a package without an update

2020-11-16 Thread Ryan Schmidt



On Nov 16, 2020, at 17:58, Riccardo Mottola wrote:
> 
> Ryan Schmidt wrote:
>>> So I have to force the "gcc-4.2" of xcode... that one works (and, luckily, 
>>> libxml2 still compiles with it)
>> My point is that "sudo port upgrade outdated" should work. If it does not, 
>> we may have a bug somewhere that we need to fix, and what you're describing 
>> above sounds like we haven't declared dependencies correctly somewhere, or 
>> maybe we have a circular dependency. Forcibly rebuilding a port is nice to 
>> know how to do, I just wanted to emphasize that it is not a task we expect 
>> users to need to do on a regular basis.
>> 
> 
> you are perfectly right! Since I'm am on an old (even is "beloved") OS 
> version, I expect some hiccups, but this is harder.
> However, as I tried to explain, the problem is a bit deep - causing all 
> MacPorts compiler to break is a pain on systems which have an older 
> toolchain. Probably this goes unnoticed on newer macs where the system 
> clang/gcc is "new enough".
> Here were are in the situation that if, for some upstream reason, libxml2 
> stops compiling with gcc 4.2, the user has no workaround and is stuck in an 
> endless dependency.

If such a situation were to arise, then indeed we would want to do something 
about it. We do have automated build machines for Mac OS X 10.6 and later so if 
such a situation did arise we would probably notice it on the build machines. 
As far as I know, we do not have such a situation at present.




Re: rebuild a package without an update

2020-11-16 Thread Riccardo Mottola via macports-users

Hi Ryan!

Ryan Schmidt wrote:

So I have to force the "gcc-4.2" of xcode... that one works (and, luckily, 
libxml2 still compiles with it)

My point is that "sudo port upgrade outdated" should work. If it does not, we 
may have a bug somewhere that we need to fix, and what you're describing above sounds 
like we haven't declared dependencies correctly somewhere, or maybe we have a circular 
dependency. Forcibly rebuilding a port is nice to know how to do, I just wanted to 
emphasize that it is not a task we expect users to need to do on a regular basis.



you are perfectly right! Since I'm am on an old (even is "beloved") OS 
version, I expect some hiccups, but this is harder.
However, as I tried to explain, the problem is a bit deep - causing all 
MacPorts compiler to break is a pain on systems which have an older 
toolchain. Probably this goes unnoticed on newer macs where the system 
clang/gcc is "new enough".
Here were are in the situation that if, for some upstream reason, 
libxml2 stops compiling with gcc 4.2, the user has no workaround and is 
stuck in an endless dependency.


Maybe somebody knows how to lessen this? Dr. Kenneth Cunningham? 
Statically linking some base stuff could be a "foundation" to build on 
indeed.


Riccardo


Re: Any reason not to update to Xcode 12.2 on Catalina?

2020-11-16 Thread raf
On Sun, Nov 15, 2020 at 11:56:54AM -0600, Ryan Schmidt 
 wrote:

> You should definitely never run with a mismatched set of Xcode and its
> command line tools. Either update the command line tools to the Xcode
> 12.2 version or downgrade Xcode to whatever it was before. Using Xcode
> 11.x and matching CLT on macOS 10.15 will keep you from encountering
> some build failures.

Hi,

I have "XCode 11.3 (11C29)" (on macos-10.14.6) and,
in its Preferences / Locations, it says
"Command Line Tools: XCode 11.3 (11C29)".

But pkgutil seems to say otherwise:

  $ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep version
  version: 10.3.0.0.1.1562985497

I haven't noticed any problem (yet), but that looks
like a mismatch. Should I upgrade the command line
tools anyway? Note that I never actually use the XCode
app itself, just the command line tools. I suppose the
answer is yes.

Also, is the XCode app mistaken about which version of
the command line tools are there, or is it just
referring to its embedded version of them?

cheers,
raf



No problem with 2.6.4

2020-11-16 Thread Dave Horsfall
Apart from the Xcode problem (which I'm working on); thanks Ryan and the 
rest for your work.


-- Dave


Re: QLColorCode update and issue

2020-11-16 Thread Andrew Udvare

On 16/11/2020 14:30, Ryan Schmidt wrote:



On Nov 16, 2020, at 13:17, Andrew Udvare wrote:


On 16/11/2020 11:45, Ryan Schmidt wrote:

You get this error when doing what?


This happens when I try to load a preview.

1. Load Finder
2. Pick a file that would load a preview with it like a shell script that ends 
with .sh
3. Use the space-bar to trigger a full preview with Quick Look

Compatible files: 
https://github.com/anthonygelibert/QLColorCode/blob/master/Info.plist#L14



I see in the PR that you're on macOS 11. I haven't seen these kinds of sandbox 
errors before. Maybe they're something new in macOS 11.



Yup, apparently https://github.com/anthonygelibert/QLColorCode/issues/72


OpenPGP_0x1AFD9AFC120C26DD_and_old_rev.asc
Description: application/pgp-keys


OpenPGP_signature
Description: OpenPGP digital signature


Re: QLColorCode update and issue

2020-11-16 Thread Ryan Schmidt



On Nov 16, 2020, at 13:17, Andrew Udvare wrote:

> On 16/11/2020 11:45, Ryan Schmidt wrote:
>> You get this error when doing what?
> 
> This happens when I try to load a preview.
> 
> 1. Load Finder
> 2. Pick a file that would load a preview with it like a shell script that 
> ends with .sh
> 3. Use the space-bar to trigger a full preview with Quick Look
> 
> Compatible files: 
> https://github.com/anthonygelibert/QLColorCode/blob/master/Info.plist#L14
> 

I see in the PR that you're on macOS 11. I haven't seen these kinds of sandbox 
errors before. Maybe they're something new in macOS 11.



Re: QLColorCode update and issue

2020-11-16 Thread Andrew Udvare

On 16/11/2020 11:45, Ryan Schmidt wrote:

You get this error when doing what?


This happens when I try to load a preview.

1. Load Finder
2. Pick a file that would load a preview with it like a shell script 
that ends with .sh

3. Use the space-bar to trigger a full preview with Quick Look

Compatible files: 
https://github.com/anthonygelibert/QLColorCode/blob/master/Info.plist#L14


OpenPGP_0x1AFD9AFC120C26DD_and_old_rev.asc
Description: application/pgp-keys


OpenPGP_signature
Description: OpenPGP digital signature


Re: macOS 11 Big Sur and MacPorts

2020-11-16 Thread Ryan Schmidt



On Nov 16, 2020, at 02:55, Dominik Reichardt wrote:

> Yes, everyone replying that you have the CLT installed, check if it’s 
> actually the correct one. Because apparently there is a bug that makes Xcode 
> report that the CLTs are installed *without* checking whether it is the 
> correct version.


On OS X 10.9 Mavericks and later you can run:

pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep version

This will tell you the installed version of the command line tools. On Big Sur 
I get:

version: 12.2.0.0.1.1604076827

If you are on Big Sur and you have a version older than 12.2, please download 
and install the Xcode 12.2 command line tools from:

https://developer.apple.com/download/more/?=Command%20Line%20Tools

If it says:

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

then you either do not have the command line tools installed or you are 
affected by the Apple bug that deletes the command line tools receipt described 
here:

https://trac.macports.org/wiki/ProblemHotlist#reinstall-clt

To fix this, download and install the Xcode 12.2 command line tools from:

https://developer.apple.com/download/more/?=Command%20Line%20Tools



Re: QLColorCode update and issue

2020-11-16 Thread Ryan Schmidt



On Nov 16, 2020, at 02:40, Andrew Udvare wrote:

> I have a PR here to update the QLColorCode port 
> https://github.com/macports/macports-ports/pull/9138 and while everything 
> builds, the highlight functionality of this does not work.
> 
> One observation: /opt/local/lib/liblua.dylib (port: lua) was installed with 
> permissions 0644. I have since fixed this to be 0755 but it has made no 
> difference, nor am I sure this is related to the cause.

Libraries don't get executed so they don't need the execute bit.


> I get this error from dyld:
> 
> Dyld Error Message:
>  Library not loaded: /opt/local/lib/liblua.dylib
>  Referenced from: /opt/local/bin/highlight
>  Reason: no suitable image found.  Did find:
>   file system sandbox blocked open() of '/opt/local/lib/liblua.dylib'
>   /opt/local/lib/liblua.dylib: stat() failed with errno=1
>   file system sandbox blocked open() of '/opt/local/lib/liblua.dylib'
> 
> The highlight program itself works fine in CLI, where I have added iTerm2 and 
> a number of apps to the Security & Privacy section in System Preferences. I 
> added highlight as well to there and it has not changed anything. I tried to 
> run `qlmanage -r` (root and non-root) multiple times. And lastly I tried 
> rebooting.
> 
> Has anyone seen this issue before? And solved it for a port?

You get this error when doing what?



Re: macOS 11 Big Sur and MacPorts

2020-11-16 Thread Dominik Reichardt


> On 16. Nov 2020, at 10:05, Wahlstedt Jyrki  wrote:
> 
> 
> 
>> Dominik Reichardt mailto:domi...@gmail.com>> kirjoitti 
>> 16.11.2020 kello 10.55:
>> 
>> In Xcode itself I actually do not see the CLT listed at all, only the 
>> simulators.
>> 
> I have mine here:
> 
> 

Indeed, there it is, thanks :)

QLColorCode update and issue

2020-11-16 Thread Andrew Udvare
I have a PR here to update the QLColorCode port 
https://github.com/macports/macports-ports/pull/9138 and while 
everything builds, the highlight functionality of this does not work.


One observation: /opt/local/lib/liblua.dylib (port: lua) was installed 
with permissions 0644. I have since fixed this to be 0755 but it has 
made no difference, nor am I sure this is related to the cause.


I get this error from dyld:

Dyld Error Message:
  Library not loaded: /opt/local/lib/liblua.dylib
  Referenced from: /opt/local/bin/highlight
  Reason: no suitable image found.  Did find:
file system sandbox blocked open() of '/opt/local/lib/liblua.dylib'
/opt/local/lib/liblua.dylib: stat() failed with errno=1
file system sandbox blocked open() of '/opt/local/lib/liblua.dylib'

The highlight program itself works fine in CLI, where I have added 
iTerm2 and a number of apps to the Security & Privacy section in System 
Preferences. I added highlight as well to there and it has not changed 
anything. I tried to run `qlmanage -r` (root and non-root) multiple 
times. And lastly I tried rebooting.


Has anyone seen this issue before? And solved it for a port?

Thanks
Andrew


OpenPGP_0x1AFD9AFC120C26DD_and_old_rev.asc
Description: application/pgp-keys


OpenPGP_signature
Description: OpenPGP digital signature


Re: macOS 11 Big Sur and MacPorts

2020-11-16 Thread Andrew Udvare

On 16/11/2020 02:56, Lothar Haeger wrote:

Same here: installing XCode and opening it once seems to install command line 
tools. At least they are listed in Preferences as installed (at the same path 
as XCode.app).
Seems as if no separate install is required with 12.x anymore.


Am 16.11.2020 um 06:41 schrieb Wahlstedt Jyrki :




Ryan Schmidt  kirjoitti 16.11.2020 kello 4.41:

Hm. As far as I knew, the "components" that Xcode updates at first launch are 
only related to on-device iOS/iPadOS/watchOS/tvOS development.


Not 100 % sure, but entering the command gives:

jwa@bach:databases> xcode-select --install
xcode-select: error: command line tools are already installed, use "Software 
Update" to install updates
jwa@bach:databases>

Is it only me?


!
! Jyrki





I really would like to convert this to *extremely clear* copy-paste 
instructions or even a script that fixes issues, at least for Big Sur.


I haven't had too much of an issue building things (except Qt from the 
PR to update it, see ticket #61103) but I have some seen some messages 
like the following:


Warning: The macOS 11.0 SDK does not appear to be installed. Ports may 
not build correctly.
Warning: You can install it as part of the Xcode Command Line Tools 
package by running `xcode-select --install'.


Maybe related to https://trac.macports.org/wiki/ProblemHotlist#reinstall-clt

Usually the message is different and says to go to this link.

--
Andrew


OpenPGP_0x1AFD9AFC120C26DD_and_old_rev.asc
Description: application/pgp-keys


OpenPGP_signature
Description: OpenPGP digital signature


Re: macOS 11 Big Sur and MacPorts

2020-11-16 Thread Ken Cunningham
> Same here: installing XCode and opening it once seems to install command line 
> tools. At least they are listed in Preferences as installed (at the same path 
> as XCode.app). 
> Seems as if no separate install is required with 12.x anymore.

I’m agreeing with Ryan here.

Opening Xcode 12.2 did indeed update components, but it did *not* update the 
Command Line Tools.

I downloaded the Command Line Tools 12.2 Installer from Apple, and got all new 
stuff, including the MacOS 11 SDK and a newer version of clang that matches the 
one in Xcode.

So — I had to use the installer to update the CLTs.

Ken