Re: MacPorts XCode Installation

2022-03-07 Thread Michele Venturi
I have made a script to install the right version of Xcode

https://gist.github.com/dardo82/1a68666175e84ebfb3d03fc4b75a3609


It requires the xcodes command that can be found here

https://github.com/RobotsAndPencils/xcodes

Maybe it should be packaged as a new port,it is useful...

Accepting the license can also be automated if needed.

Il mar 8 mar 2022, 03:21 raf  ha scritto:

> On Tue, Mar 08, 2022 at 01:13:36PM +1100, macpo...@raf.org wrote:
>
> > > Il lun 7 mar 2022, 12:38 Ryan Schmidt  ha
> scritto:
> > >
> > > > On Feb 26, 2022, at 12:04, Haren Samarasinghe wrote:
> > > >
> > > > > After reading the installation guide [1], quite a few people that
> I've
> > > > introduced MacPorts to have thought that a full XCode installation is
> > > > required. They're uncertain of doing this due to the large amount of
> space
> > > > it requires.
> > > > >
> > > > > In reality, I'd say that the majority of ports only require the
> command
> > > > line tools. In the scenarios where XCode is required for a port, the
> user
> > > > is normally alerted to this.
> > > > >
> > > > > I was planning on changing the docs [1][2] to show that XCode isn't
> > > > required, but I wanted to first check whether this would be an
> acceptable
> > > > change.
> > > >
> > > > Yes that's a good idea.
> > > >
> > > > If the port you're installing (and its dependencies) are available as
> > > > binaries, you do not need Xcode and you do not need the command line
> tools.
> > > > MacPorts will just install the binaries. MacPorts will probably print
> > > > warnings about Xcode and/or CLT being missing but in this case they
> can be
> > > > ignored.
> > > >
> > > > If the port (or its dependencies) are not available as binaries,
> you'll
> > > > probably need either Xcode or the command line tools. If you don't
> have
> > > > them installed, you'll get warnings, and then probably a build
> failure.
> > > >
> > > > Some ports need Xcode to build. These are (hopefully) marked with
> > > > "use_xcode yes". If you try to install such a port and you do not
> have
> > > > Xcode installed, MacPorts will tell you to install it.
> >
> > On a related note, the other day I was on my brother's
> > 10.14 mac, and I needed to migrate its macports from
> > a version for 10.13. There are instructions at
> > https://guide.macports.org/#installing.xcode that say:
> >
> >   2.1.1. Install Xcode on OS X 10.9 or Later
> >   Download the latest version of Xcode from the Apple developer
> >   website or get it using the Mac App Store.
> >
> > But the latest version of XCode is incompatible with 10.14,
> > and the Mac App Store won't install it (or any other version).
> > So those instructions might need an update.
> >
> > https://trac.macports.org/wiki/Migration says:
> >
> >   Install the latest version of Xcode that is compatible with your OS.
> >   Open the Xcode application once after installation and follow any
> prompts.
> >
> > But it links to the page above, not to a page showing
> > the latest compatible versions of XCode for each macos
> > version.
> >
> > I'm sure I've seen such a list in the past, but can't
> > remember where it is, and I can't seem to find it today.
> > Is it somewhere prominent and I'm just not finding it?
> > It would be great if either of the above pages linked to it.
> >
> > Ah, this has a great compatibility chart:
> > https://en.wikipedia.org/wiki/Xcode#Xcode_11.x_(since_SwiftUI_framework)
> >
> > I know this thread is about letting people know that XCode
> > isn't always needed, but I think the instructions for getting
> > the right XCode for old macos systems could be better too.
> >
> > cheers,
> > raf
>
> I think is the page I originally saw:
>
>   https://xcodereleases.com/
>
> cheers,
> raf
>
>


Re: MacPorts XCode Installation

2022-03-07 Thread raf
On Tue, Mar 08, 2022 at 01:13:36PM +1100, macpo...@raf.org wrote:

> > Il lun 7 mar 2022, 12:38 Ryan Schmidt  ha scritto:
> > 
> > > On Feb 26, 2022, at 12:04, Haren Samarasinghe wrote:
> > >
> > > > After reading the installation guide [1], quite a few people that I've
> > > introduced MacPorts to have thought that a full XCode installation is
> > > required. They're uncertain of doing this due to the large amount of space
> > > it requires.
> > > >
> > > > In reality, I'd say that the majority of ports only require the command
> > > line tools. In the scenarios where XCode is required for a port, the user
> > > is normally alerted to this.
> > > >
> > > > I was planning on changing the docs [1][2] to show that XCode isn't
> > > required, but I wanted to first check whether this would be an acceptable
> > > change.
> > >
> > > Yes that's a good idea.
> > >
> > > If the port you're installing (and its dependencies) are available as
> > > binaries, you do not need Xcode and you do not need the command line 
> > > tools.
> > > MacPorts will just install the binaries. MacPorts will probably print
> > > warnings about Xcode and/or CLT being missing but in this case they can be
> > > ignored.
> > >
> > > If the port (or its dependencies) are not available as binaries, you'll
> > > probably need either Xcode or the command line tools. If you don't have
> > > them installed, you'll get warnings, and then probably a build failure.
> > >
> > > Some ports need Xcode to build. These are (hopefully) marked with
> > > "use_xcode yes". If you try to install such a port and you do not have
> > > Xcode installed, MacPorts will tell you to install it.
> 
> On a related note, the other day I was on my brother's
> 10.14 mac, and I needed to migrate its macports from
> a version for 10.13. There are instructions at
> https://guide.macports.org/#installing.xcode that say:
> 
>   2.1.1. Install Xcode on OS X 10.9 or Later
>   Download the latest version of Xcode from the Apple developer
>   website or get it using the Mac App Store.
> 
> But the latest version of XCode is incompatible with 10.14,
> and the Mac App Store won't install it (or any other version).
> So those instructions might need an update.
> 
> https://trac.macports.org/wiki/Migration says:
> 
>   Install the latest version of Xcode that is compatible with your OS.
>   Open the Xcode application once after installation and follow any prompts.
> 
> But it links to the page above, not to a page showing
> the latest compatible versions of XCode for each macos
> version.
> 
> I'm sure I've seen such a list in the past, but can't
> remember where it is, and I can't seem to find it today.
> Is it somewhere prominent and I'm just not finding it?
> It would be great if either of the above pages linked to it.
> 
> Ah, this has a great compatibility chart:
> https://en.wikipedia.org/wiki/Xcode#Xcode_11.x_(since_SwiftUI_framework)
> 
> I know this thread is about letting people know that XCode
> isn't always needed, but I think the instructions for getting
> the right XCode for old macos systems could be better too.
> 
> cheers,
> raf

I think is the page I originally saw:

  https://xcodereleases.com/

cheers,
raf



Re: MacPorts XCode Installation

2022-03-07 Thread macports
> Il lun 7 mar 2022, 12:38 Ryan Schmidt  ha scritto:
> 
> > On Feb 26, 2022, at 12:04, Haren Samarasinghe wrote:
> >
> > > After reading the installation guide [1], quite a few people that I've
> > introduced MacPorts to have thought that a full XCode installation is
> > required. They're uncertain of doing this due to the large amount of space
> > it requires.
> > >
> > > In reality, I'd say that the majority of ports only require the command
> > line tools. In the scenarios where XCode is required for a port, the user
> > is normally alerted to this.
> > >
> > > I was planning on changing the docs [1][2] to show that XCode isn't
> > required, but I wanted to first check whether this would be an acceptable
> > change.
> >
> > Yes that's a good idea.
> >
> > If the port you're installing (and its dependencies) are available as
> > binaries, you do not need Xcode and you do not need the command line tools.
> > MacPorts will just install the binaries. MacPorts will probably print
> > warnings about Xcode and/or CLT being missing but in this case they can be
> > ignored.
> >
> > If the port (or its dependencies) are not available as binaries, you'll
> > probably need either Xcode or the command line tools. If you don't have
> > them installed, you'll get warnings, and then probably a build failure.
> >
> > Some ports need Xcode to build. These are (hopefully) marked with
> > "use_xcode yes". If you try to install such a port and you do not have
> > Xcode installed, MacPorts will tell you to install it.

On a related note, the other day I was on my brother's
10.14 mac, and I needed to migrate its macports from
a version for 10.13. There are instructions at
https://guide.macports.org/#installing.xcode that say:

  2.1.1. Install Xcode on OS X 10.9 or Later
  Download the latest version of Xcode from the Apple developer
  website or get it using the Mac App Store.

But the latest version of XCode is incompatible with 10.14,
and the Mac App Store won't install it (or any other version).
So those instructions might need an update.

https://trac.macports.org/wiki/Migration says:

  Install the latest version of Xcode that is compatible with your OS.
  Open the Xcode application once after installation and follow any prompts.

But it links to the page above, not to a page showing
the latest compatible versions of XCode for each macos
version.

I'm sure I've seen such a list in the past, but can't
remember where it is, and I can't seem to find it today.
Is it somewhere prominent and I'm just not finding it?
It would be great if either of the above pages linked to it.

Ah, this has a great compatibility chart:
https://en.wikipedia.org/wiki/Xcode#Xcode_11.x_(since_SwiftUI_framework)

I know this thread is about letting people know that XCode
isn't always needed, but I think the instructions for getting
the right XCode for old macos systems could be better too.

cheers,
raf



Re: MacPorts XCode Installation

2022-03-07 Thread Michele Venturi
I've filed a new ticket, is it ok?
https://trac.macports.org/ticket/64777


Michele Venturi
about.me/dardo82



Il giorno lun 7 mar 2022 alle ore 17:51 Chris Jones <
jon...@hep.phy.cam.ac.uk> ha scritto:

>
> whatever you think relevant, from the discussion here. If its not clear
> it can be added to later on so don't worry about including everything at
> first. But please lets have the discussion in trac rather than here...
>
> On 07/03/2022 4:28 pm, Michele Venturi wrote:
> > What should I include in the bug report to make it clear?
> >
> > Il lun 7 mar 2022, 17:25 Marius Schamschula  > > ha scritto:
> >
> > Michele,
> >
> > Please submit a MacPorts ticket!
> >
> > Other users may search trac if they encounter the same issue. We can
> > also link to any upstream tickets from there.
> >
> >> On Mar 7, 2022, at 10:22 AM, Michele Venturi  >> > wrote:
> >>
> >> Should I submit a bug report before we even know if it's a
> >> MacPorts specific issue? Or how do we find that out?
> >>
> >> Il lun 7 mar 2022, 16:47 Chris Jones  >> > ha scritto:
> >>
> >>
> >>
> >> On 07/03/2022 3:31 pm, Michele Venturi wrote:
> >> > I have the required libraries in /usr/lib/swift too,but MPV
> >> is looking
> >> > for them in /opt/local/lib,so it doesn't find them:
> >> >
> >> > otool -l $(which mpv)
> >> > ...
> >> > cmd LC_RPATH
> >> > cmdsize 32
> >> > path /opt/local/lib (offset 12)
> >> >
> >> > Should we change RPATH or add symbolic links?
> >>
> >> No, those are not the solutions here. If there is an issue
> >> with the
> >> build on 10.13 we should fix that instead, rather than apply
> >> after-the-fact bandaids.
> >>
> >> The first thing to determine is if its a MacPorts specific
> >> issue due to
> >> how the build is performed, or an upstream issue. Either way
> >> please
> >> submit a bug report to macports trac so the discussion on this
> >> can
> >> continue there.
> >>
> >> Chris
> >>
> >> >
> >> > Michele Venturi
> >> > about.me/dardo82 
> >> >
> >> >
> >> >
> >> <
> https://about.me/dardo82?promo=email_sig_source=product_medium=email_sig_campaign=gmail_api_content=thumb
> >> <
> https://about.me/dardo82?promo=email_sig_source=product_medium=email_sig_campaign=gmail_api_content=thumb
> >>
> >>
> >> >
> >> > Michele Venturi
> >> > about.me/dardo82 
> >> >
> >> <
> https://about.me/dardo82?promo=email_sig_source=product_medium=email_sig_campaign=gmail_api_content=thumb
> >> <
> https://about.me/dardo82?promo=email_sig_source=product_medium=email_sig_campaign=gmail_api_content=thumb
> >>
> >>
> >> >
> >> >
> >> >
> >> >
> >> > Il giorno lun 7 mar 2022 alle ore 15:46 Ryan Schmidt
> >> > mailto:ryandes...@macports.org>
> >>  >> >> ha scritto:
> >> >
> >> >
> >> >
> >> > On Mar 7, 2022, at 08:34, Michele Venturi wrote:
> >> >
> >> >  > If I install MPV without Xcode I get an error when I
> >> launch it:
> >> >  >
> >> >  > dyld: Library not loaded:
> >> @rpath/libswiftAVFoundation.dylib
> >> >  >   Referenced from: /opt/local/bin/mpv
> >> >  >   Reason: image not found
> >> >  >
> >> >  > It's missing something,have you tried to execute it
> >> on 10.13?
> >> >
> >> > I have not.
> >> >
> >> > I guess you're right, in relation to the Swift language
> >> usage I
> >> > mentioned earlier, this port does appear to need
> >> > libswiftAVFoundation.dylib at runtime. And maybe it is
> >> expecting to
> >> > find it within Xcode on your system. (It depends on what
> >> @rpath
> >> > expands to. I forget what the command is to interrogate
> >> a binary
> >> > about its rpaths.)
> >> >
> >> > Swift is still a new programming language and I don't
> >> think we have
> >> > many ports in MacPorts that use Swift so I'm not sure if
> >> this should
> >> > be considered normal or not.
> >> >
> >> > I see that I have 

Re: MacPorts XCode Installation

2022-03-07 Thread Chris Jones



whatever you think relevant, from the discussion here. If its not clear 
it can be added to later on so don't worry about including everything at 
first. But please lets have the discussion in trac rather than here...


On 07/03/2022 4:28 pm, Michele Venturi wrote:

What should I include in the bug report to make it clear?

Il lun 7 mar 2022, 17:25 Marius Schamschula > ha scritto:


Michele,

Please submit a MacPorts ticket!

Other users may search trac if they encounter the same issue. We can
also link to any upstream tickets from there.


On Mar 7, 2022, at 10:22 AM, Michele Venturi mailto:dard...@gmail.com>> wrote:

Should I submit a bug report before we even know if it's a
MacPorts specific issue? Or how do we find that out?

Il lun 7 mar 2022, 16:47 Chris Jones mailto:jon...@hep.phy.cam.ac.uk>> ha scritto:



On 07/03/2022 3:31 pm, Michele Venturi wrote:
> I have the required libraries in /usr/lib/swift too,but MPV
is looking
> for them in /opt/local/lib,so it doesn't find them:
>
> otool -l $(which mpv)
> ...
> cmd LC_RPATH
> cmdsize 32
> path /opt/local/lib (offset 12)
>
> Should we change RPATH or add symbolic links?

No, those are not the solutions here. If there is an issue
with the
build on 10.13 we should fix that instead, rather than apply
after-the-fact bandaids.

The first thing to determine is if its a MacPorts specific
issue due to
how the build is performed, or an upstream issue. Either way
please
submit a bug report to macports trac so the discussion on this
can
continue there.

Chris

>
> Michele Venturi
> about.me/dardo82 
>
>
>

>

>
> Michele Venturi
> about.me/dardo82 
>

>

>
>
>
>
> Il giorno lun 7 mar 2022 alle ore 15:46 Ryan Schmidt
> mailto:ryandes...@macports.org>
>> ha scritto:
>
>
>
>     On Mar 7, 2022, at 08:34, Michele Venturi wrote:
>
>      > If I install MPV without Xcode I get an error when I
launch it:
>      >
>      > dyld: Library not loaded:
@rpath/libswiftAVFoundation.dylib
>      >   Referenced from: /opt/local/bin/mpv
>      >   Reason: image not found
>      >
>      > It's missing something,have you tried to execute it
on 10.13?
>
>     I have not.
>
>     I guess you're right, in relation to the Swift language
usage I
>     mentioned earlier, this port does appear to need
>     libswiftAVFoundation.dylib at runtime. And maybe it is
expecting to
>     find it within Xcode on your system. (It depends on what
@rpath
>     expands to. I forget what the command is to interrogate
a binary
>     about its rpaths.)
>
>     Swift is still a new programming language and I don't
think we have
>     many ports in MacPorts that use Swift so I'm not sure if
this should
>     be considered normal or not.
>
>     I see that I have many copies of
libswiftAVFoundation.dylib on my
>     system, within various applications' bundles, so I guess
Apple
>     expects people to include copies of the Swift dylibs
with their
>     application.
>
>     On my 10.15 system, it does not link with
>     @rpath/libswiftAVFoundation.dylib. It links with various
Swift
>     dylibs in /usr/lib/swift. Maybe the port can be made to
do so on
>     10.13 as well.
>
>     You should file a bug report about this mpv problem.
>





Re: MacPorts XCode Installation

2022-03-07 Thread Michele Venturi
What should I include in the bug report to make it clear?

Il lun 7 mar 2022, 17:25 Marius Schamschula  ha
scritto:

> Michele,
>
> Please submit a MacPorts ticket!
>
> Other users may search trac if they encounter the same issue. We can also
> link to any upstream tickets from there.
>
> On Mar 7, 2022, at 10:22 AM, Michele Venturi  wrote:
>
> Should I submit a bug report before we even know if it's a MacPorts
> specific issue? Or how do we find that out?
>
> Il lun 7 mar 2022, 16:47 Chris Jones  ha
> scritto:
>
>>
>>
>> On 07/03/2022 3:31 pm, Michele Venturi wrote:
>> > I have the required libraries in /usr/lib/swift too,but MPV is looking
>> > for them in /opt/local/lib,so it doesn't find them:
>> >
>> > otool -l $(which mpv)
>> > ...
>> > cmd LC_RPATH
>> > cmdsize 32
>> > path /opt/local/lib (offset 12)
>> >
>> > Should we change RPATH or add symbolic links?
>>
>> No, those are not the solutions here. If there is an issue with the
>> build on 10.13 we should fix that instead, rather than apply
>> after-the-fact bandaids.
>>
>> The first thing to determine is if its a MacPorts specific issue due to
>> how the build is performed, or an upstream issue. Either way please
>> submit a bug report to macports trac so the discussion on this can
>> continue there.
>>
>> Chris
>>
>> >
>> > Michele Venturi
>> > about.me/dardo82 
>> >
>> > <
>> https://about.me/dardo82?promo=email_sig_source=product_medium=email_sig_campaign=gmail_api_content=thumb>
>>
>> >
>> > Michele Venturi
>> > about.me/dardo82
>> > <
>> https://about.me/dardo82?promo=email_sig_source=product_medium=email_sig_campaign=gmail_api_content=thumb>
>>
>> >
>> >
>> >
>> >
>> > Il giorno lun 7 mar 2022 alle ore 15:46 Ryan Schmidt
>> > mailto:ryandes...@macports.org>> ha scritto:
>> >
>> >
>> >
>> > On Mar 7, 2022, at 08:34, Michele Venturi wrote:
>> >
>> >  > If I install MPV without Xcode I get an error when I launch it:
>> >  >
>> >  > dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib
>> >  >   Referenced from: /opt/local/bin/mpv
>> >  >   Reason: image not found
>> >  >
>> >  > It's missing something,have you tried to execute it on 10.13?
>> >
>> > I have not.
>> >
>> > I guess you're right, in relation to the Swift language usage I
>> > mentioned earlier, this port does appear to need
>> > libswiftAVFoundation.dylib at runtime. And maybe it is expecting to
>> > find it within Xcode on your system. (It depends on what @rpath
>> > expands to. I forget what the command is to interrogate a binary
>> > about its rpaths.)
>> >
>> > Swift is still a new programming language and I don't think we have
>> > many ports in MacPorts that use Swift so I'm not sure if this should
>> > be considered normal or not.
>> >
>> > I see that I have many copies of libswiftAVFoundation.dylib on my
>> > system, within various applications' bundles, so I guess Apple
>> > expects people to include copies of the Swift dylibs with their
>> > application.
>> >
>> > On my 10.15 system, it does not link with
>> > @rpath/libswiftAVFoundation.dylib. It links with various Swift
>> > dylibs in /usr/lib/swift. Maybe the port can be made to do so on
>> > 10.13 as well.
>> >
>> > You should file a bug report about this mpv problem.
>> >
>>
>
>


Re: MacPorts XCode Installation

2022-03-07 Thread Marius Schamschula
Michele,

Please submit a MacPorts ticket!

Other users may search trac if they encounter the same issue. We can also link 
to any upstream tickets from there.

> On Mar 7, 2022, at 10:22 AM, Michele Venturi  wrote:
> 
> Should I submit a bug report before we even know if it's a MacPorts specific 
> issue? Or how do we find that out?
> 
> Il lun 7 mar 2022, 16:47 Chris Jones  > ha scritto:
> 
> 
> On 07/03/2022 3:31 pm, Michele Venturi wrote:
> > I have the required libraries in /usr/lib/swift too,but MPV is looking 
> > for them in /opt/local/lib,so it doesn't find them:
> > 
> > otool -l $(which mpv)
> > ...
> > cmd LC_RPATH
> > cmdsize 32
> > path /opt/local/lib (offset 12)
> > 
> > Should we change RPATH or add symbolic links?
> 
> No, those are not the solutions here. If there is an issue with the 
> build on 10.13 we should fix that instead, rather than apply 
> after-the-fact bandaids.
> 
> The first thing to determine is if its a MacPorts specific issue due to 
> how the build is performed, or an upstream issue. Either way please 
> submit a bug report to macports trac so the discussion on this can 
> continue there.
> 
> Chris
> 
> > 
> > Michele Venturi
> > about.me/dardo82   > >
> > 
> >  >  
> > >
> >  
> >   
> > Michele Venturi
> > about.me/dardo82  
> >  >  
> > >
> >  
> > 
> > 
> > 
> > 
> > Il giorno lun 7 mar 2022 alle ore 15:46 Ryan Schmidt 
> > mailto:ryandes...@macports.org> 
> > >> ha 
> > scritto:
> > 
> > 
> > 
> > On Mar 7, 2022, at 08:34, Michele Venturi wrote:
> > 
> >  > If I install MPV without Xcode I get an error when I launch it:
> >  >
> >  > dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib
> >  >   Referenced from: /opt/local/bin/mpv
> >  >   Reason: image not found
> >  >
> >  > It's missing something,have you tried to execute it on 10.13?
> > 
> > I have not.
> > 
> > I guess you're right, in relation to the Swift language usage I
> > mentioned earlier, this port does appear to need
> > libswiftAVFoundation.dylib at runtime. And maybe it is expecting to
> > find it within Xcode on your system. (It depends on what @rpath
> > expands to. I forget what the command is to interrogate a binary
> > about its rpaths.)
> > 
> > Swift is still a new programming language and I don't think we have
> > many ports in MacPorts that use Swift so I'm not sure if this should
> > be considered normal or not.
> > 
> > I see that I have many copies of libswiftAVFoundation.dylib on my
> > system, within various applications' bundles, so I guess Apple
> > expects people to include copies of the Swift dylibs with their
> > application.
> > 
> > On my 10.15 system, it does not link with
> > @rpath/libswiftAVFoundation.dylib. It links with various Swift
> > dylibs in /usr/lib/swift. Maybe the port can be made to do so on
> > 10.13 as well.
> > 
> > You should file a bug report about this mpv problem.
> > 



Re: MacPorts XCode Installation

2022-03-07 Thread Michele Venturi
Should I submit a bug report before we even know if it's a MacPorts
specific issue? Or how do we find that out?

Il lun 7 mar 2022, 16:47 Chris Jones  ha scritto:

>
>
> On 07/03/2022 3:31 pm, Michele Venturi wrote:
> > I have the required libraries in /usr/lib/swift too,but MPV is looking
> > for them in /opt/local/lib,so it doesn't find them:
> >
> > otool -l $(which mpv)
> > ...
> > cmd LC_RPATH
> > cmdsize 32
> > path /opt/local/lib (offset 12)
> >
> > Should we change RPATH or add symbolic links?
>
> No, those are not the solutions here. If there is an issue with the
> build on 10.13 we should fix that instead, rather than apply
> after-the-fact bandaids.
>
> The first thing to determine is if its a MacPorts specific issue due to
> how the build is performed, or an upstream issue. Either way please
> submit a bug report to macports trac so the discussion on this can
> continue there.
>
> Chris
>
> >
> > Michele Venturi
> > about.me/dardo82 
> >
> > <
> https://about.me/dardo82?promo=email_sig_source=product_medium=email_sig_campaign=gmail_api_content=thumb>
>
> >
> > Michele Venturi
> > about.me/dardo82
> > <
> https://about.me/dardo82?promo=email_sig_source=product_medium=email_sig_campaign=gmail_api_content=thumb>
>
> >
> >
> >
> >
> > Il giorno lun 7 mar 2022 alle ore 15:46 Ryan Schmidt
> > mailto:ryandes...@macports.org>> ha scritto:
> >
> >
> >
> > On Mar 7, 2022, at 08:34, Michele Venturi wrote:
> >
> >  > If I install MPV without Xcode I get an error when I launch it:
> >  >
> >  > dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib
> >  >   Referenced from: /opt/local/bin/mpv
> >  >   Reason: image not found
> >  >
> >  > It's missing something,have you tried to execute it on 10.13?
> >
> > I have not.
> >
> > I guess you're right, in relation to the Swift language usage I
> > mentioned earlier, this port does appear to need
> > libswiftAVFoundation.dylib at runtime. And maybe it is expecting to
> > find it within Xcode on your system. (It depends on what @rpath
> > expands to. I forget what the command is to interrogate a binary
> > about its rpaths.)
> >
> > Swift is still a new programming language and I don't think we have
> > many ports in MacPorts that use Swift so I'm not sure if this should
> > be considered normal or not.
> >
> > I see that I have many copies of libswiftAVFoundation.dylib on my
> > system, within various applications' bundles, so I guess Apple
> > expects people to include copies of the Swift dylibs with their
> > application.
> >
> > On my 10.15 system, it does not link with
> > @rpath/libswiftAVFoundation.dylib. It links with various Swift
> > dylibs in /usr/lib/swift. Maybe the port can be made to do so on
> > 10.13 as well.
> >
> > You should file a bug report about this mpv problem.
> >
>


Re: MacPorts XCode Installation

2022-03-07 Thread Chris Jones




On 07/03/2022 3:31 pm, Michele Venturi wrote:
I have the required libraries in /usr/lib/swift too,but MPV is looking 
for them in /opt/local/lib,so it doesn't find them:


otool -l $(which mpv)
...
cmd LC_RPATH
cmdsize 32
path /opt/local/lib (offset 12)

Should we change RPATH or add symbolic links?


No, those are not the solutions here. If there is an issue with the 
build on 10.13 we should fix that instead, rather than apply 
after-the-fact bandaids.


The first thing to determine is if its a MacPorts specific issue due to 
how the build is performed, or an upstream issue. Either way please 
submit a bug report to macports trac so the discussion on this can 
continue there.


Chris



Michele Venturi
about.me/dardo82 

 
	

Michele Venturi
about.me/dardo82 
 





Il giorno lun 7 mar 2022 alle ore 15:46 Ryan Schmidt 
mailto:ryandes...@macports.org>> ha scritto:




On Mar 7, 2022, at 08:34, Michele Venturi wrote:

 > If I install MPV without Xcode I get an error when I launch it:
 >
 > dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib
 >   Referenced from: /opt/local/bin/mpv
 >   Reason: image not found
 >
 > It's missing something,have you tried to execute it on 10.13?

I have not.

I guess you're right, in relation to the Swift language usage I
mentioned earlier, this port does appear to need
libswiftAVFoundation.dylib at runtime. And maybe it is expecting to
find it within Xcode on your system. (It depends on what @rpath
expands to. I forget what the command is to interrogate a binary
about its rpaths.)

Swift is still a new programming language and I don't think we have
many ports in MacPorts that use Swift so I'm not sure if this should
be considered normal or not.

I see that I have many copies of libswiftAVFoundation.dylib on my
system, within various applications' bundles, so I guess Apple
expects people to include copies of the Swift dylibs with their
application.

On my 10.15 system, it does not link with
@rpath/libswiftAVFoundation.dylib. It links with various Swift
dylibs in /usr/lib/swift. Maybe the port can be made to do so on
10.13 as well.

You should file a bug report about this mpv problem.



Re: MacPorts XCode Installation

2022-03-07 Thread Michele Venturi
I have the required libraries in /usr/lib/swift too,but MPV is looking for
them in /opt/local/lib,so it doesn't find them:

otool -l $(which mpv)
...
cmd LC_RPATH
cmdsize 32
path /opt/local/lib (offset 12)

Should we change RPATH or add symbolic links?

Michele Venturi
about.me/dardo82


Michele Venturi
about.me/dardo82



Il giorno lun 7 mar 2022 alle ore 15:46 Ryan Schmidt <
ryandes...@macports.org> ha scritto:

>
>
> On Mar 7, 2022, at 08:34, Michele Venturi wrote:
>
> > If I install MPV without Xcode I get an error when I launch it:
> >
> > dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib
> >   Referenced from: /opt/local/bin/mpv
> >   Reason: image not found
> >
> > It's missing something,have you tried to execute it on 10.13?
>
> I have not.
>
> I guess you're right, in relation to the Swift language usage I mentioned
> earlier, this port does appear to need libswiftAVFoundation.dylib at
> runtime. And maybe it is expecting to find it within Xcode on your system.
> (It depends on what @rpath expands to. I forget what the command is to
> interrogate a binary about its rpaths.)
>
> Swift is still a new programming language and I don't think we have many
> ports in MacPorts that use Swift so I'm not sure if this should be
> considered normal or not.
>
> I see that I have many copies of libswiftAVFoundation.dylib on my system,
> within various applications' bundles, so I guess Apple expects people to
> include copies of the Swift dylibs with their application.
>
> On my 10.15 system, it does not link with
> @rpath/libswiftAVFoundation.dylib. It links with various Swift dylibs in
> /usr/lib/swift. Maybe the port can be made to do so on 10.13 as well.
>
> You should file a bug report about this mpv problem.
>
>


Re: MacPorts XCode Installation

2022-03-07 Thread Ryan Schmidt



On Mar 7, 2022, at 08:34, Michele Venturi wrote:

> If I install MPV without Xcode I get an error when I launch it:
> 
> dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib
>   Referenced from: /opt/local/bin/mpv
>   Reason: image not found
> 
> It's missing something,have you tried to execute it on 10.13?

I have not.

I guess you're right, in relation to the Swift language usage I mentioned 
earlier, this port does appear to need libswiftAVFoundation.dylib at runtime. 
And maybe it is expecting to find it within Xcode on your system. (It depends 
on what @rpath expands to. I forget what the command is to interrogate a binary 
about its rpaths.)

Swift is still a new programming language and I don't think we have many ports 
in MacPorts that use Swift so I'm not sure if this should be considered normal 
or not.

I see that I have many copies of libswiftAVFoundation.dylib on my system, 
within various applications' bundles, so I guess Apple expects people to 
include copies of the Swift dylibs with their application.

On my 10.15 system, it does not link with @rpath/libswiftAVFoundation.dylib. It 
links with various Swift dylibs in /usr/lib/swift. Maybe the port can be made 
to do so on 10.13 as well.

You should file a bug report about this mpv problem.



Re: MacPorts XCode Installation

2022-03-07 Thread Michele Venturi
If I install MPV without Xcode I get an error when I launch it:


dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib

  Referenced from: /opt/local/bin/mpv

  Reason: image not found


It's missing something,have you tried to execute it on 10.13?

Michele Venturi
about.me/dardo82



Il giorno lun 7 mar 2022 alle ore 15:10 Ryan Schmidt <
ryandes...@macports.org> ha scritto:

> On Mar 7, 2022, at 08:06, Michele Venturi wrote:
>
> > There is no binary of MPV for OSX 10.13.6? It's too old?
>
> I see a binary of mpv for macOS 10.13:
>
> http://packages.macports.org/mpv/
>
> We produce binaries for Mac OS X 10.6 and later.
>
> Only binaries of default variants are produced. If you are changing the
> variant selection, then you will have to build from source.
>
> There are other reasons why you might not be able to use our binaries. For
> example, if you have built MacPorts base from source in a prefix other than
> /opt/local then you cannot use our binaries.
>
>


Re: MacPorts XCode Installation

2022-03-07 Thread Ryan Schmidt
On Mar 7, 2022, at 08:06, Michele Venturi wrote:

> There is no binary of MPV for OSX 10.13.6? It's too old? 

I see a binary of mpv for macOS 10.13:

http://packages.macports.org/mpv/

We produce binaries for Mac OS X 10.6 and later.

Only binaries of default variants are produced. If you are changing the variant 
selection, then you will have to build from source.

There are other reasons why you might not be able to use our binaries. For 
example, if you have built MacPorts base from source in a prefix other than 
/opt/local then you cannot use our binaries.



Re: MacPorts XCode Installation

2022-03-07 Thread Michele Venturi
There is no binary of MPV for OSX 10.13.6? It's too old?

Il lun 7 mar 2022, 13:41 Ryan Schmidt  ha scritto:

> On Mar 7, 2022, at 06:14, Michele Venturi wrote:
>
> > Web browsers are even more complicated but
> > you do not need to install xcode to use safari...
>
> But you do need to install Xcode to *compile* Safari.
>
> In the same way, you need to install Xcode to *compile* mpv, but you do
> not need Xcode to receive a binary of mpv from our servers, nor do you need
> Xcode to run an mpv (or any other port) that you've already installed with
> MacPorts.
>
>


Re: MacPorts XCode Installation

2022-03-07 Thread Ryan Schmidt
On Mar 7, 2022, at 06:14, Michele Venturi wrote:

> Web browsers are even more complicated but
> you do not need to install xcode to use safari...

But you do need to install Xcode to *compile* Safari.

In the same way, you need to install Xcode to *compile* mpv, but you do not 
need Xcode to receive a binary of mpv from our servers, nor do you need Xcode 
to run an mpv (or any other port) that you've already installed with MacPorts.



Re: MacPorts XCode Installation

2022-03-07 Thread Michele Venturi
Web browsers are even more complicated but
you do not need to install xcode to use safari...

Il lun 7 mar 2022, 13:07 Ryan Schmidt  ha scritto:

> On Mar 7, 2022, at 06:02, Michele Venturi wrote:
>
> > Sadly xcode is needed even for something as simple as
> > a media player, for example mpv, I wonder why actually.
>
> Media players are probably extremely complicated pieces of software.
> Hardly what I would call simple.
>
> In the case of mpv, it requires Xcode, on recent OS versions, because
> parts of it are built using the Swift language, and this was thought to be
> the only way to get those parts to build properly. See
> https://github.com/macports/macports-ports/commit/8222cfaa4124483d2faad4f35a209885d440dd61
> .
>
> mpv is a difficult piece of software to get to build properly. I recently
> committed numerous changes to hopefully fix many of those problems in the
> mpv port, but there are probably still other problems remaining.


Re: MacPorts XCode Installation

2022-03-07 Thread Ryan Schmidt
On Mar 7, 2022, at 06:02, Michele Venturi wrote:

> Sadly xcode is needed even for something as simple as
> a media player, for example mpv, I wonder why actually.

Media players are probably extremely complicated pieces of software. Hardly 
what I would call simple.

In the case of mpv, it requires Xcode, on recent OS versions, because parts of 
it are built using the Swift language, and this was thought to be the only way 
to get those parts to build properly. See 
https://github.com/macports/macports-ports/commit/8222cfaa4124483d2faad4f35a209885d440dd61.

mpv is a difficult piece of software to get to build properly. I recently 
committed numerous changes to hopefully fix many of those problems in the mpv 
port, but there are probably still other problems remaining.

Re: MacPorts XCode Installation

2022-03-07 Thread Michele Venturi
Sadly xcode is needed even for something as simple as
a media player, for example mpv, I wonder why actually.


Il lun 7 mar 2022, 12:38 Ryan Schmidt  ha scritto:

>
>
> On Feb 26, 2022, at 12:04, Haren Samarasinghe wrote:
>
> > After reading the installation guide [1], quite a few people that I've
> introduced MacPorts to have thought that a full XCode installation is
> required. They're uncertain of doing this due to the large amount of space
> it requires.
> >
> > In reality, I'd say that the majority of ports only require the command
> line tools. In the scenarios where XCode is required for a port, the user
> is normally alerted to this.
> >
> > I was planning on changing the docs [1][2] to show that XCode isn't
> required, but I wanted to first check whether this would be an acceptable
> change.
>
> Yes that's a good idea.
>
> If the port you're installing (and its dependencies) are available as
> binaries, you do not need Xcode and you do not need the command line tools.
> MacPorts will just install the binaries. MacPorts will probably print
> warnings about Xcode and/or CLT being missing but in this case they can be
> ignored.
>
> If the port (or its dependencies) are not available as binaries, you'll
> probably need either Xcode or the command line tools. If you don't have
> them installed, you'll get warnings, and then probably a build failure.
>
> Some ports need Xcode to build. These are (hopefully) marked with
> "use_xcode yes". If you try to install such a port and you do not have
> Xcode installed, MacPorts will tell you to install it.
>
>


Re: MacPorts XCode Installation

2022-03-07 Thread Ryan Schmidt



On Feb 26, 2022, at 12:04, Haren Samarasinghe wrote:

> After reading the installation guide [1], quite a few people that I've 
> introduced MacPorts to have thought that a full XCode installation is 
> required. They're uncertain of doing this due to the large amount of space it 
> requires.
> 
> In reality, I'd say that the majority of ports only require the command line 
> tools. In the scenarios where XCode is required for a port, the user is 
> normally alerted to this.
> 
> I was planning on changing the docs [1][2] to show that XCode isn't required, 
> but I wanted to first check whether this would be an acceptable change.

Yes that's a good idea.

If the port you're installing (and its dependencies) are available as binaries, 
you do not need Xcode and you do not need the command line tools. MacPorts will 
just install the binaries. MacPorts will probably print warnings about Xcode 
and/or CLT being missing but in this case they can be ignored.

If the port (or its dependencies) are not available as binaries, you'll 
probably need either Xcode or the command line tools. If you don't have them 
installed, you'll get warnings, and then probably a build failure.

Some ports need Xcode to build. These are (hopefully) marked with "use_xcode 
yes". If you try to install such a port and you do not have Xcode installed, 
MacPorts will tell you to install it.



Re: MacPorts XCode Installation

2022-02-26 Thread chilli.names...@gmail.com
Though not important, my memory just hit me, apologies, I built that minimal 
snow system in 2014 when I upgraded a 2010 Mac to become a media server, which 
it still is and seems to work exactly the same as it has been since 2014, 
except that I stopped maintaining it around 2018. 

> On Feb 26, 2022, at 16:07, "chilli.names...@gmail.com" 
>  wrote:
> 
> I don't know if this will be all that helpful because it is pretty old 
> information. Bought a Mac in 2010 with Snow Leopard, but I didn't want the 
> default install, trimmed it down to a bare minimum system that still had a 
> desktop, disabled all possible features and removed them, etc. I think my 
> custom footprint with XCode is less than a quarter of the default size of 
> Snow Leopard with out Xcode. I even built an installer to install the custom 
> snow system with the select XCode packages, but I never had to use it but for 
> the one time in late 2010. To get MacPorts working without full installing 
> XCode, iirc after consultig Ryan, I installed only these packages from XCode 
> 3.6.2
> 
> DevSDK.pkg 
> gcc4.2.pkg
> llvm-gcc4.2.pkg 
> X11SDK.pkg 
> QuickTimeSDK.pkg
> CoreAudioSDK.pkg
> OpenGLSDK.pkg 
> DeveloperToolsCLI.pkg
> DeveloperToolsSystemSupport.pkg
> clang.pkg
> 
> And MacPorts worked great for nearly a decade before I couldn't keep up with 
> fixing broken updates and stopped updating, but the machine is still 
> extremely stable and all the ports I use still work, just at now outdated 
> versions and no longer being upgraded.
> 
> XCode current is far more complex than 3.6.2, but I bet that underneath the 
> behemoth of currentish XCodes there are bound to be about a dozen packages 
> included that one could install individually and still have MacPorts work, 
> dare I say, flawlessly.
> 
>>> On Feb 26, 2022, at 15:38, Dave Horsfall  wrote:
>>> 
>>> On Sat, 26 Feb 2022, Peter Hancock wrote:
>>> 
>>> Quite. I have full Xcode, regretfully, plus the CLI tools. I'm never 
>>> confiident that some that Macports installation needs the full thing.
>> 
>> I've never wanted to find out the hard way, so I always install the full 
>> Xcode (after a lot of digging around to find an old version -- 10.0 -- for 
>> my ancient MacBook Pro and High Sierra).
>> 
>>> Being alerted is one thing, undergoing the grief of installing The Full 
>>> Thing is another, and uninstalling TFT afterwards yet another. (It's not 
>>> 100% clear to me how to get rid of it, while keeping the CLT)
>> 
>> I have a 500GB SSD, so space isn't a problem :-)
>> 
>>> A peripheral point is the way Apple deletes "receipts" for previous 
>>> command reinstalls, and once or twice a month, one (seemingly) has to 
>>> jump through the well-worn hoop of touching a flag-file into existence, 
>>> doing an Apple update, and deleting the flag afterwards.
>>> 
>>> That's tolerable, but it's a chore, and a worrying one. It's tempting to 
>>> think (falsely): if I install TFT, perhaps this nonsense will stop.
>>> 
>>> The clearer this (general, TFT) topic can be made, the better.
>> 
>> I'm not quite sure what this is all about; then again, as I said I always 
>> install the full Xcode and I've never seen this problem.
>> 
>> -- Dave


Re: MacPorts XCode Installation

2022-02-26 Thread chilli.names...@gmail.com
I don't know if this will be all that helpful because it is pretty old 
information. Bought a Mac in 2010 with Snow Leopard, but I didn't want the 
default install, trimmed it down to a bare minimum system that still had a 
desktop, disabled all possible features and removed them, etc. I think my 
custom footprint with XCode is less than a quarter of the default size of Snow 
Leopard with out Xcode. I even built an installer to install the custom snow 
system with the select XCode packages, but I never had to use it but for the 
one time in late 2010. To get MacPorts working without full installing XCode, 
iirc after consultig Ryan, I installed only these packages from XCode 3.6.2

DevSDK.pkg 
gcc4.2.pkg
llvm-gcc4.2.pkg 
X11SDK.pkg 
QuickTimeSDK.pkg
CoreAudioSDK.pkg
OpenGLSDK.pkg 
DeveloperToolsCLI.pkg
DeveloperToolsSystemSupport.pkg
clang.pkg

And MacPorts worked great for nearly a decade before I couldn't keep up with 
fixing broken updates and stopped updating, but the machine is still extremely 
stable and all the ports I use still work, just at now outdated versions and no 
longer being upgraded.

XCode current is far more complex than 3.6.2, but I bet that underneath the 
behemoth of currentish XCodes there are bound to be about a dozen packages 
included that one could install individually and still have MacPorts work, dare 
I say, flawlessly.

> On Feb 26, 2022, at 15:38, Dave Horsfall  wrote:
> 
> On Sat, 26 Feb 2022, Peter Hancock wrote:
> 
>> Quite. I have full Xcode, regretfully, plus the CLI tools. I'm never 
>> confiident that some that Macports installation needs the full thing.
> 
> I've never wanted to find out the hard way, so I always install the full 
> Xcode (after a lot of digging around to find an old version -- 10.0 -- for 
> my ancient MacBook Pro and High Sierra).
> 
>> Being alerted is one thing, undergoing the grief of installing The Full 
>> Thing is another, and uninstalling TFT afterwards yet another. (It's not 
>> 100% clear to me how to get rid of it, while keeping the CLT)
> 
> I have a 500GB SSD, so space isn't a problem :-)
> 
>> A peripheral point is the way Apple deletes "receipts" for previous 
>> command reinstalls, and once or twice a month, one (seemingly) has to 
>> jump through the well-worn hoop of touching a flag-file into existence, 
>> doing an Apple update, and deleting the flag afterwards.
>> 
>> That's tolerable, but it's a chore, and a worrying one. It's tempting to 
>> think (falsely): if I install TFT, perhaps this nonsense will stop.
>> 
>> The clearer this (general, TFT) topic can be made, the better.
> 
> I'm not quite sure what this is all about; then again, as I said I always 
> install the full Xcode and I've never seen this problem.
> 
> -- Dave


Re: MacPorts XCode Installation

2022-02-26 Thread Dave Horsfall
On Sat, 26 Feb 2022, Peter Hancock wrote:

> Quite. I have full Xcode, regretfully, plus the CLI tools. I'm never 
> confiident that some that Macports installation needs the full thing.

I've never wanted to find out the hard way, so I always install the full 
Xcode (after a lot of digging around to find an old version -- 10.0 -- for 
my ancient MacBook Pro and High Sierra).

> Being alerted is one thing, undergoing the grief of installing The Full 
> Thing is another, and uninstalling TFT afterwards yet another. (It's not 
> 100% clear to me how to get rid of it, while keeping the CLT)

I have a 500GB SSD, so space isn't a problem :-)

> A peripheral point is the way Apple deletes "receipts" for previous 
> command reinstalls, and once or twice a month, one (seemingly) has to 
> jump through the well-worn hoop of touching a flag-file into existence, 
> doing an Apple update, and deleting the flag afterwards.
> 
> That's tolerable, but it's a chore, and a worrying one. It's tempting to 
> think (falsely): if I install TFT, perhaps this nonsense will stop.
> 
> The clearer this (general, TFT) topic can be made, the better.

I'm not quite sure what this is all about; then again, as I said I always 
install the full Xcode and I've never seen this problem.

-- Dave


Re: MacPorts XCode Installation

2022-02-26 Thread Peter Hancock

On 26/02/2022 18:04, Haren Samarasinghe wrote:

After reading the installation guide [1], quite a few people that
I've introduced MacPorts to have thought that a full XCode
installation is required. They're uncertain of doing this due to the
large amount of space it requires.


Quite. I have full Xcode, regretfully, plus the CLI tools.
I'm never confiident that some that Macports installation needs the full thing.


In reality, I'd say that the majority of ports only require the
command line tools. In the scenarios where XCode is required for a
port, the user is normally alerted to this.


Being alerted is one thing, undergoing the grief of installing
The Full Thing is another, and uninstalling TFT afterwards yet another.
(It's not 100% clear to me how to get rid of it, while keeping the CLT)


I was planning on changing the docs [1][2] to show that XCode isn't
required, but I wanted to first check whether this would be an
acceptable change.


Acceptable to me.

A peripheral point is the way Apple deletes "receipts" for previous
command reinstalls, and once or twice a month, one (seemingly) has to
jump through the well-worn hoop of touching a flag-file into existence,
doing an Apple update, and deleting the flag afterwards.

That's tolerable, but it's a chore, and a worrying one. It's tempting to
think (falsely): if I install TFT, perhaps this nonsense will stop.

The clearer this (general, TFT) topic can be made, the better.

Peter Hancock