MacPorts should require the latest Xcode

Anders F Björklund afb at macports.org
Wed Oct 24 14:55:14 PDT 2007


2007-07-30 kl. 21.03 skrev Ryan Schmidt:

>>>> Problems caused by old Xcode versions are reported by users with 
>>>> some regularity. I suppose we could add something to the FAQ, but 
>>>> users don't always read the FAQ, and the first step of the first 
>>>> section of the installation guide already reads: "Download and 
>>>> install the latest version of Xcode Tools—do not install an older 
>>>> version from the OS X 10.4 install disk or some ports may fail to 
>>>> install."
>>>>
>>>> We should not allow users to run into this problem. Can we please 
>>>> modify MacPorts base to issue a fatal error and refuse to do 
>>>> anything unless the latest Xcode (2.4.1 on 10.4.x, 1.5.x on 10.3.x) 
>>>> is installed? I think this would be a good idea. When new versions 
>>>> of Xcode are released, we can update base as needed.

This is now http://trac.macports.org/projects/macports/ticket/12794

I believe it is valid to print out a warning if Xcode is older than
2.4 for Tiger and 1.5 for Panther (no direct warning for Jaguar yet)

>> Tentative -1, simply because Xcode is a massive download. Most things 
>> will build with an outdated version, I don't think it's particularly 
>> nice to force people to download a gigabyte update if they don't need 
>> and/or want to. Also, we shouldn't try to second guess people who do 
>> know what they're doing with an "unsupported" Xcode version.
>
> Fine, then print a big honkin' warning. If MacPorts ever encounters an 
> error during the configure or build phase of a port, have it print 
> something like this at the end:
>
> YOU ARE USING AN OUTDATED VERSION OF XCODE, AND THIS MAY HAVE CAUSED 
> THE PROBLEM YOU JUST ENCOUNTERED. Please go to 
> http://developer.apple.com/ and download and install the latest 
> version of Xcode. Then clean this port and try installing or upgrading 
> it again.

I have added the version checks to configure, to do something with.
They are then called $XCODE_VERSION and $MACOSX_VERSION (naturally?)

Technically Xcode isn't strictly required*, but shouldn't be outdated.

--anders


PS. When I say "not really required" I mean that it is possible
both to run with a limited subset of the full Xcode installation
and also possible to run MacPorts without any compilation tools
at all - i.e. if you _know_what_you_are_getting_yourself_into_

So while it is perfectly valid to print out a warning, I don't
think it should abort any interesting experiments with building
in chroots and using binary archives for the more technical user.
But it also needs a matching *runtime* check for GCC, in port(1).



More information about the macports-dev mailing list