Too hard to get Dev tools [was Re: Problem with macports install, any help greatly appreciated]
Ryan Schmidt
ryandesign at macports.org
Fri Jun 11 10:29:20 PDT 2010
On Jun 11, 2010, at 11:58, Scott Haneda wrote:
> On Jun 11, 2010, at 4:26 AM, Ryan Schmidt wrote:
>
>> Yes, Apple doesn't make it terribly easy to find the latest version of Xcode for prior versions of Mac OS X. To get Xcode 3.1.4:
>>
>> Go to http://connect.apple.com/
>
> I was in an IRC chat the other day, and the topic of package managers came up. Being a heavy Linux crowd, they have a multitude of options wheras on the Mac we have Fink and MacPorts.
>
> I sidelined and listened. The main gripe; there is no compiler present by default in Mac OS X so you must give up personal data to get Dev Tools from Apple.
>
> I'm not sure if this is 100% true. I know you get additional tools from a Dev Tools installation, but there may be a compiler in the base OS X install; I've never looked
There isn't a compiler in the base OS install. Apple includes Xcode on the discs that come with every Mac. But it may be an outdated version; if so, downloading the latest from ADC is advised.
> I always:
>
> 1) install OS
> 2) install Dev Tools
> 3) Software Update
> 4) Install MacPorts.
>
> 90% or better of what's in /Developer are docs, examples, test apps, profile apps, debugger, tools... stuff.
>
> What is it MacPorts needs at a bare minimum to meet it's requirement of "Needs Apples Developer Tools"?
Certainly the gcc compiler and its support files, and the make program.
Ports using the xcode portgroup also need xcodebuild and its support files.
> How much of /Developer could one potentially omit and still build apps with or without MacPorts? Can I just keep all the bins and includes and be successful?
Certainly the examples and documentation should be deletable. I think you can already elect to not install those by customizing in the Xcode installer. Trying to omit beyond what the Xcode installer gives you checkboxes for seems fraught with peril.
> I'm asking because I wonder how sucessfully MacPorts built apps would also build with the pure OSS versions of I guess gcc and it's other toolchain bits.
We have not tested most ports on the FSF versions of gcc and don't have the manpower to do so; there's no benefit to doing so either. The Xcode installer is easily available (if perhaps not as easily as we might like), it works, and it comes from a trusted source. To use the FSF compiler we'd have to find a binary distribution of a working GCC somewhere, or make and distribute one ourselves, or have MacPorts download and build the source (which as we know from the gcc4* ports takes hours); this does not seem an improvement.
One thing the Apple version has that the FSF version definitely does not is the -arch flag, which is of course required to do all-at-once universal builds, but which MacPorts also uses pervasively even for non-universal builds as of MacPorts 1.8.0.
> I suspect Apple may have modified and customized this toolchain, and it simply wouldn't work.
>
> Would it be possible at all to have MacPorts remove it's requirement for Apples Developer Tools and have MacPorts perform that installation? This seems a really cool way to get people up and running sans a ton of resistance.
>
> I wonder how much of this is technical hurdles versus legal licence agreements hurdles attached to the download from Apple.
Apple wants you to register for ADC to get the Xcode download. I doubt it would legally be OK for us to bypass that.
> I personally don't find it a huge burden to register and download /Developer. I even find the software quite nice, and one heck of a solid development toolkit. Everything you need to build something of the scope of PhotoShop, iMovie, iTunes, whatever you imagine.
>
> I'll go out on a limb, prepared for the bashing... I am yet to see anything on Windows or Linux or other *Nix's that has the polish of X-Code. Add to that it spits out UB's, mobile, desktop, cli, etc, and it's a very polished kit, not to be overshadowed by the technical power ouside "teh pretty". And free of cost with the exception of registration cost.
>
> The other side of the coin is Apple could easily install /Developer on all machines. Yet in the same way some distros are specific to being lean, Apple is choosing to omit software 99% of users won't need, and will add potential confusion.
>
> If /Developer were installed on all Macs, the visibility bit was set to none on the directory, and 'chmod -x /Developer', users would not even know. A set of very simple commands could +x and setfile; poof, dev tools installed, MacPorts could be the initiator of this. A checkbox in the Software Update Preference Pane coukd even toghle those two settings Pipe dreaming I know.
Developer Tools is not updated by Software Update at all, so it would be odd for any settings related to Developer Tools to be located there.
Apple made a big deal about how Snow Leopard installs faster and uses less disk space than Leopard. Adding Developer Tools to the default installation would negate that advantage, and would be unnecessary for the majority of users and would slow them down during install and eat gigs of disk space. While disk space is indeed cheap, installing Developer Tools for all users is overkill. Apple doesn't even install Rosetta or QuickTime 7 by default on Snow Leopard, though these are tiny.
> Is it completely against the rules to direct link to the dev tools installer and have MacPorts perform this install? Maybe Apple has the download locked inside the walled login/pass garden.
I doubt that would be legally OK, even if it technically worked -- which it doesn't; it redirects to a login page.
> I was just wondering, if there is any way to have MacPorts be fully self contained. The ability to decide you want MAMP, download a tiny installer, run 'sudo port install mamp-stuff', and be done. This could be very powerful for good word of mouth of a great experience.
If your definition of self-contained here is that you want MacPorts to contain Xcode, then I don't think that's realistic. It also would not be small. (The Xcode installer is about a gigabyte.)
> On Linux they were stating in IRC:
> sudo apt-get whatever
That's because they already have the apt package manager installed. AFAIK it's installed by default for them.
> On Mac: ( how I do it at least )
> Reg/login with apple.com
> Download Developer Tools
> Software Update
> Install MacPorts
> Update MacPorts
This is the process of installing the package manager.
> sudo port install whatever
>
> It would be really cool to have parity on those two cases.
Once the package manager is installed, we do have parity.
> This question is one of pure curiosity with regards to specifically what's in /Developer. With so much of it being based on OSS, that to me implies there has to be ways to get it all, and bypass registration.
>
> I'm not at all asking that this idea be persued, but it's something I've wanted to understand for a while.
>
> P.S. Why doesn't a new first time install of MacPorts perform 'selfupdate' for the user? Or does it and I'm not aware of this already happening?
It does. Use the Show Log feature in the installer (and set it to show everything, not just errors) to see this happen.
More information about the macports-users
mailing list