Re: Does MacPorts need ALL of Xcode?

2021-10-03 Thread Joshua Root

Ryan Schmidt wrote:

Ports that include the xcode portgroup also most probably require Xcode. I would have 
thought that the xcode 1.0 portgroup would declare "use_xcode yes" somewhere in 
it, but it doesn't seem to. Maybe that is an oversight.


It isn't. Setting build.type to "xcode" also sets use_xcode to "yes".

- Josh


Re: Does MacPorts need ALL of Xcode?

2021-10-02 Thread Ryan Schmidt
On Oct 3, 2021, at 00:08, Ian Wadham wrote:

> OK, thanks Ryan, but how about https://guide.macports.org/#installing.xcode ?
> 
> It explicitly says to install Xcode first, as a dependency of MacPorts, and 
> then do xcode-select —install, which is what I have been doing for 10 years 
> or more as a MacPorts user. And I suppose almost all other MacPorts users 
> have too.
> 
> But in that time Xcode has grown from a gigabyte or two to 20 Gb on my 
> current MacOS, Catalina 10.15.7. That is a significant slice of the SSD 
> storage in a shop-standard MacBook Pro. So if a user does not need Xcode as a 
> prerequisite of MacPorts, he/she should not have to carry the time and space 
> overheads of downloading, installing and storing it.
> 
> My question then is please can https://guide.macports.org/#installing.xcode 
> be re-written to help users who do not need Xcode for any other reason?

Yes, it can. Anyone can contribute updates to the documentation by submitting a 
pull request. Much of the Guide has not been updated in over a decade and is in 
dire need of rewrites or replacement.


>>> Couldn’t those ports list Xcode as a build dependency?
>> 
>> They do, by using this keyword:
>> 
>> use_xcode yes
> 
> Chris Jones raised the point on 26/27 September on this thread that some 
> ports require Xcode and gave this as the reason for MacPorts requiring Xcode.
> 
> But how many ports are involved here? What percentage of users are likely to 
> need them? And what is the worst that can happen to a user if he/she happens 
> to run into one and does not have Xcode installed?

MacPorts will print a message saying Xcode is required to install that port.


> I tried port search use_xcode to try and shed some light on these questions, 
> but it gave "no match … found”.

"port search" does not do a search of the entire literal contents of portfiles, 
but you can use grep to do that.

Ports that include the xcode portgroup also most probably require Xcode. I 
would have thought that the xcode 1.0 portgroup would declare "use_xcode yes" 
somewhere in it, but it doesn't seem to. Maybe that is an oversight.

According to this:

port file all | sort -u | xargs grep -El 
'^[[:space:]]*(use_xcode[[:space:]]yes|PortGroup[[:space:]]+xcode[[:space:]])' 
| wc -l

there are around 180 ports that require Xcode. There may be others that require 
Xcode but that do not so indicate yet.




Re: Does MacPorts need ALL of Xcode?

2021-10-02 Thread Ian Wadham


> On 2 Oct 2021, at 6:20 pm, Ryan Schmidt  wrote:
> 
> On Sep 27, 2021, at 16:36, Ian Wadham wrote:
> 
>> So what is the “recipe” to install just the CLT with no version of Xcode 
>> present? And can that recipe be included in the MacPorts Guide?
> 
> Run
> 
> xcode-select --install
> 
> and click the button to install the command line tools.
> 
> Or download the command line tools installer from the Apple Developer 
> Downloads web site.

OK, thanks Ryan, but how about https://guide.macports.org/#installing.xcode ?

It explicitly says to install Xcode first, as a dependency of MacPorts, and 
then do xcode-select —install, which is what I have been doing for 10 years or 
more as a MacPorts user. And I suppose almost all other MacPorts users have too.

But in that time Xcode has grown from a gigabyte or two to 20 Gb on my current 
MacOS, Catalina 10.15.7. That is a significant slice of the SSD storage in a 
shop-standard MacBook Pro. So if a user does not need Xcode as a prerequisite 
of MacPorts, he/she should not have to carry the time and space overheads of 
downloading, installing and storing it.

My question then is please can https://guide.macports.org/#installing.xcode be 
re-written to help users who do not need Xcode for any other reason?

>> Couldn’t those ports list Xcode as a build dependency?
> 
> They do, by using this keyword:
> 
> use_xcode yes

Chris Jones raised the point on 26/27 September on this thread that some ports 
require Xcode and gave this as the reason for MacPorts requiring Xcode.

But how many ports are involved here? What percentage of users are likely to 
need them? And what is the worst that can happen to a user if he/she happens to 
run into one and does not have Xcode installed?

I tried port search use_xcode to try and shed some light on these questions, 
but it gave "no match … found”.

Cheers,
Ian Waham.




Re: Does MacPorts need ALL of Xcode?

2021-10-02 Thread Ryan Schmidt



On Sep 27, 2021, at 11:49, Filipp Gunbin wrote:

> On 26/09/2021 23:42 +0100, Chris Jones wrote:
> 
>> The majority of ports will indeed build fine with just the CLT
>> installed. There are a number though where the build does indeed
>> require a complete Xcode installation, which is why the baseline
>> recommendation is to install Xcode. However if you are ok with perhaps
>> running into the occasional port failure (the likelihood for which
>> depends on which ports you use) you likely can get by just fine with
>> just the CLT.
> 
> How can one check if a given port requires full XCode?

You can check if its portfile contains the line:

use_xcode yes

If it does, it requires Xcode to build.

However, if it is distributable, then it may already have been built by our 
build servers, which have both Xcode and the command line tools installed, in 
which case MacPorts can obtain and install that pre-built archive for you 
without you needing to have Xcode installed on your computer. In fact, if a 
port is distributable, you don't even need the command line tools installed to 
install it.

Re: Does MacPorts need ALL of Xcode?

2021-10-02 Thread Ryan Schmidt
On Sep 27, 2021, at 16:36, Ian Wadham wrote:

> So what is the “recipe” to install just the CLT with no version of Xcode 
> present? And can that recipe be included in the MacPorts Guide?

Run

xcode-select --install

and click the button to install the command line tools.

Or download the command line tools installer from the Apple Developer Downloads 
web site.


> Couldn’t those ports list Xcode as a build dependency?

They do, by using this keyword:

use_xcode yes




Re: Does MacPorts need ALL of Xcode?

2021-09-28 Thread Bjarne D Mathiesen
I usually install MacPorts from the tarball.

In my experience, in order for macports itself to compile,
you'll have to
1) install Xcode
2) install the Command Line Tools
3) open Xcode and let it install it's components
otherwise, you'll get the error, that the c-compiler can't create an
executable

-- 
Bjarne D Mathiesen
Korsør ; Danmark ; Europa
---
denne besked er skrevet i et totalt M$-frit miljø
MacPro 2010 ; OpenCore + macOS 10.15.7 Catalina
2 x 3,46 GHz 6-Core Intel Xeon ; 256 GB 1333 MHz DDR3 ECC RDIMM
ATI Radeon RX 590 8 GB


Re: Does MacPorts need ALL of Xcode?

2021-09-27 Thread Chris Jones


> On 27 Sep 2021, at 10:36 pm, Ian Wadham  wrote:
> 
> Hello Chris,
> 
>> On 27 Sep 2021, at 8:42 am, Chris Jones  wrote:
>> The majority of ports will indeed build fine with just the CLT installed.
> 
> So what is the “recipe” to install just the CLT with no version of Xcode 
> present? And can that recipe be included in the MacPorts Guide?

I’ve no idea on the ‘best’ way as personally i want Xcode anyway, but you could 
try navigating to 

https://developer.apple.com/download/more/?=command%20line%20tools 

and install the correct version from there. If your next question is whats the 
correct version see

https://trac.macports.org/wiki/XcodeVersionInfo

> 
>> There are a number though where the build does indeed require a complete 
>> Xcode installation, which is why the baseline recommendation is to install 
>> Xcode. However if you are ok with perhaps running into the occasional port 
>> failure (the likelihood for which depends on which ports you use) you likely 
>> can get by just fine with just the CLT.
> 
> Couldn’t those ports list Xcode as a build dependency?

Not just like a regular port dep., so it gets installed as required.

There is an Xcode PG which handles this and I think errors out if Xcode is not 
installed, so its fairly obvious what is wrong.
> 
> If a dependency has to be another MacPorts package, then perhaps there could 
> be a dummy Xcode in MacPorts, maybe just a Portfile, that checks the presence 
> and version of the Xcode.app.

See above. A PG to handle this already exists.
> 
> Otherwise, new MacPorts users may be paying a 20Gb disk storage penalty 
> forever more. And the time to download and install Xcode could become a 
> disincentive for new MacPorts users in any case…
> 
> Cheers, Ian Wadham.
> 
>> Chris
>> 
 On 26 Sep 2021, at 10:07 am, Mircea Trandafir  wrote:
>>> 
>>>  I’ve been using only the command line tools for more than a year with 
>>> absolutely no issues (other than the occasional “version not detected” 
>>> error, but I think that happens with Xcode too).
>>> 
>>> -- 
>>> Mircea Trandafir
>>> Associate professor
>>> Department of Economics
>>> University of Southern Denmark
>>> Campusvej 55, 5230 Odense M
>>> Denmark
>>> Email: mircea.tranda...@sam.sdu.dk
>>> Web: http://www.mirceatrandafir.com
>>> 
 On Sep 26, 2021, at 5:52 AM, Ian Wadham  wrote:
 
 Hi guys,
 
 I have recently upgraded my MacOS from High Sierra 10.13 to Catalina 
 10.15, mainly because I would like to start playing with a package called 
 Flutter, which has a dependency on Xcode 12+ in its MacBook version.
 
 It appears that Xcode is following some variant of Grosch’s Law, or maybe 
 Parkinson’s Law (software expands to fill the hardware space available to 
 it). So I am wondering, if all a user needs are some MacPorts packages, 
 whether it is necessary to install all (or even any) of Xcode just to get 
 the command-line tools.
 
 I have been using MacPorts to get access to FOSS for more than 10 years 
 and have watched the Xcode requirement grow from around 1 Gb of disk to 
 around 20 Gb in Catalina. In Xcode 9, on High Sierra, the requirement was 
 around 10 Gb. So it has roughly doubled in two version steps of MacOS.
 
 At first I used to regard the Xcode overhead as being like some sort of 
 tax on the pleasure of using FOSS, but now it is taking up an unhealthy 
 portion of the 250 Gb in my MacBook Pro’s 250 Gb internal SSD drive.
 
 I have to put up with this if I wish to use Macports and Flutter, even 
 though, like Dave Horsfall, I am unlikely to use Xcode as an IDE. So is it 
 possible to have MacPorts depend on some minimal subset of Xcode?
 
 Cheers,
 Ian Wadham.
 
> 


Re: Does MacPorts need ALL of Xcode?

2021-09-27 Thread Ian Wadham
Hello Chris,

> On 27 Sep 2021, at 8:42 am, Chris Jones  wrote:
> The majority of ports will indeed build fine with just the CLT installed.

So what is the “recipe” to install just the CLT with no version of Xcode 
present? And can that recipe be included in the MacPorts Guide?

> There are a number though where the build does indeed require a complete 
> Xcode installation, which is why the baseline recommendation is to install 
> Xcode. However if you are ok with perhaps running into the occasional port 
> failure (the likelihood for which depends on which ports you use) you likely 
> can get by just fine with just the CLT.

Couldn’t those ports list Xcode as a build dependency?

If a dependency has to be another MacPorts package, then perhaps there could be 
a dummy Xcode in MacPorts, maybe just a Portfile, that checks the presence and 
version of the Xcode.app.

Otherwise, new MacPorts users may be paying a 20Gb disk storage penalty forever 
more. And the time to download and install Xcode could become a disincentive 
for new MacPorts users in any case…

Cheers, Ian Wadham.

> Chris
> 
>> On 26 Sep 2021, at 10:07 am, Mircea Trandafir  wrote:
>> 
>>  I’ve been using only the command line tools for more than a year with 
>> absolutely no issues (other than the occasional “version not detected” 
>> error, but I think that happens with Xcode too).
>> 
>> -- 
>> Mircea Trandafir
>> Associate professor
>> Department of Economics
>> University of Southern Denmark
>> Campusvej 55, 5230 Odense M
>> Denmark
>> Email: mircea.tranda...@sam.sdu.dk
>> Web: http://www.mirceatrandafir.com
>> 
>>> On Sep 26, 2021, at 5:52 AM, Ian Wadham  wrote:
>>> 
>>> Hi guys,
>>> 
>>> I have recently upgraded my MacOS from High Sierra 10.13 to Catalina 10.15, 
>>> mainly because I would like to start playing with a package called Flutter, 
>>> which has a dependency on Xcode 12+ in its MacBook version.
>>> 
>>> It appears that Xcode is following some variant of Grosch’s Law, or maybe 
>>> Parkinson’s Law (software expands to fill the hardware space available to 
>>> it). So I am wondering, if all a user needs are some MacPorts packages, 
>>> whether it is necessary to install all (or even any) of Xcode just to get 
>>> the command-line tools.
>>> 
>>> I have been using MacPorts to get access to FOSS for more than 10 years and 
>>> have watched the Xcode requirement grow from around 1 Gb of disk to around 
>>> 20 Gb in Catalina. In Xcode 9, on High Sierra, the requirement was around 
>>> 10 Gb. So it has roughly doubled in two version steps of MacOS.
>>> 
>>> At first I used to regard the Xcode overhead as being like some sort of tax 
>>> on the pleasure of using FOSS, but now it is taking up an unhealthy portion 
>>> of the 250 Gb in my MacBook Pro’s 250 Gb internal SSD drive.
>>> 
>>> I have to put up with this if I wish to use Macports and Flutter, even 
>>> though, like Dave Horsfall, I am unlikely to use Xcode as an IDE. So is it 
>>> possible to have MacPorts depend on some minimal subset of Xcode?
>>> 
>>> Cheers,
>>> Ian Wadham.
>>> 



Re: Does MacPorts need ALL of Xcode?

2021-09-27 Thread Filipp Gunbin
On 26/09/2021 23:42 +0100, Chris Jones wrote:

> The majority of ports will indeed build fine with just the CLT
> installed. There are a number though where the build does indeed
> require a complete Xcode installation, which is why the baseline
> recommendation is to install Xcode. However if you are ok with perhaps
> running into the occasional port failure (the likelihood for which
> depends on which ports you use) you likely can get by just fine with
> just the CLT.

How can one check if a given port requires full XCode?  I was dreaming
of removing it for a long time, will try after reading this thread.

Thanks.


Re: Does MacPorts need ALL of Xcode?

2021-09-26 Thread Chris Jones

The majority of ports will indeed build fine with just the CLT installed. There 
are a number though where the build does indeed require a complete Xcode 
installation, which is why the baseline recommendation is to install Xcode. 
However if you are ok with perhaps running into the occasional port failure 
(the likelihood for which depends on which ports you use) you likely can get by 
just fine with just the CLT.

Chris

> On 26 Sep 2021, at 10:07 am, Mircea Trandafir  wrote:
> 
>  I’ve been using only the command line tools for more than a year with 
> absolutely no issues (other than the occasional “version not detected” error, 
> but I think that happens with Xcode too).
> 
> -- 
> Mircea Trandafir
> Associate professor
> Department of Economics
> University of Southern Denmark
> Campusvej 55, 5230 Odense M
> Denmark
> Email: mircea.tranda...@sam.sdu.dk
> Web: http://www.mirceatrandafir.com
> 
>>> On Sep 26, 2021, at 5:52 AM, Ian Wadham  wrote:
>>> 
>> Hi guys,
>> 
>> I have recently upgraded my MacOS from High Sierra 10.13 to Catalina 10.15, 
>> mainly because I would like to start playing with a package called Flutter, 
>> which has a dependency on Xcode 12+ in its MacBook version.
>> 
>> It appears that Xcode is following some variant of Grosch’s Law, or maybe 
>> Parkinson’s Law (software expands to fill the hardware space available to 
>> it). So I am wondering, if all a user needs are some MacPorts packages, 
>> whether it is necessary to install all (or even any) of Xcode just to get 
>> the command-line tools.
>> 
>> I have been using MacPorts to get access to FOSS for more than 10 years and 
>> have watched the Xcode requirement grow from around 1 Gb of disk to around 
>> 20 Gb in Catalina. In Xcode 9, on High Sierra, the requirement was around 10 
>> Gb. So it has roughly doubled in two version steps of MacOS.
>> 
>> At first I used to regard the Xcode overhead as being like some sort of tax 
>> on the pleasure of using FOSS, but now it is taking up an unhealthy portion 
>> of the 250 Gb in my MacBook Pro’s 250 Gb internal SSD drive.
>> 
>> I have to put up with this if I wish to use Macports and Flutter, even 
>> though, like Dave Horsfall, I am unlikely to use Xcode as an IDE. So is it 
>> possible to have MacPorts depend on some minimal subset of Xcode?
>> 
>> Cheers,
>> Ian Wadham.
>> 


Re: Does MacPorts need ALL of Xcode?

2021-09-26 Thread Mircea Trandafir
I’ve been using only the command line tools for more than a year with 
absolutely no issues (other than the occasional “version not detected” error, 
but I think that happens with Xcode too).

--
Mircea Trandafir
Associate professor
Department of Economics
University of Southern Denmark
Campusvej 55, 5230 Odense M
Denmark
Email: mircea.tranda...@sam.sdu.dk
Web: http://www.mirceatrandafir.com

On Sep 26, 2021, at 5:52 AM, Ian Wadham  wrote:

Hi guys,

I have recently upgraded my MacOS from High Sierra 10.13 to Catalina 10.15, 
mainly because I would like to start playing with a package called Flutter, 
which has a dependency on Xcode 12+ in its MacBook version.

It appears that Xcode is following some variant of Grosch’s Law, or maybe 
Parkinson’s Law (software expands to fill the hardware space available to it). 
So I am wondering, if all a user needs are some MacPorts packages, whether it 
is necessary to install all (or even any) of Xcode just to get the command-line 
tools.

I have been using MacPorts to get access to FOSS for more than 10 years and 
have watched the Xcode requirement grow from around 1 Gb of disk to around 20 
Gb in Catalina. In Xcode 9, on High Sierra, the requirement was around 10 Gb. 
So it has roughly doubled in two version steps of MacOS.

At first I used to regard the Xcode overhead as being like some sort of tax on 
the pleasure of using FOSS, but now it is taking up an unhealthy portion of the 
250 Gb in my MacBook Pro’s 250 Gb internal SSD drive.

I have to put up with this if I wish to use Macports and Flutter, even though, 
like Dave Horsfall, I am unlikely to use Xcode as an IDE. So is it possible to 
have MacPorts depend on some minimal subset of Xcode?

Cheers,
Ian Wadham.



Does MacPorts need ALL of Xcode?

2021-09-25 Thread Ian Wadham
Hi guys,

I have recently upgraded my MacOS from High Sierra 10.13 to Catalina 10.15, 
mainly because I would like to start playing with a package called Flutter, 
which has a dependency on Xcode 12+ in its MacBook version.

It appears that Xcode is following some variant of Grosch’s Law, or maybe 
Parkinson’s Law (software expands to fill the hardware space available to it). 
So I am wondering, if all a user needs are some MacPorts packages, whether it 
is necessary to install all (or even any) of Xcode just to get the command-line 
tools.

I have been using MacPorts to get access to FOSS for more than 10 years and 
have watched the Xcode requirement grow from around 1 Gb of disk to around 20 
Gb in Catalina. In Xcode 9, on High Sierra, the requirement was around 10 Gb. 
So it has roughly doubled in two version steps of MacOS.

At first I used to regard the Xcode overhead as being like some sort of tax on 
the pleasure of using FOSS, but now it is taking up an unhealthy portion of the 
250 Gb in my MacBook Pro’s 250 Gb internal SSD drive.

I have to put up with this if I wish to use Macports and Flutter, even though, 
like Dave Horsfall, I am unlikely to use Xcode as an IDE. So is it possible to 
have MacPorts depend on some minimal subset of Xcode?

Cheers,
Ian Wadham.