Opened 14 years ago
Last modified 3 years ago
#29172 new enhancement
remove dependency on Xcode
Reported by: | joshmoz@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | |
Keywords: | Cc: | mfeiri, internetzel, kaioless@…, cooljeanius (Eric Gallager), c.herbig@…, schwern@…, m@…, PerMildner, alexkowel@…, llamafilm, macports@…, mmpestorich (Mike M Pestorich), larryv (Lawrence Velázquez), dliessi (Davide Liessi), isviridov, Dave-Allured (Dave Allured) | |
Port: |
Description
I realize this would be a pretty significant change but I'd like for MacPorts to not depend on Xcode. Xcode now costs money, which means that MacPorts depends on non-free (as in beer) software. As far as I know there is no convenient and free developer toolchain on Mac OS X any more. The MacPorts project is probably in the best position of any project to provide that.
(Mozilla, the project I'm most heavily involved with, would appreciate it)
Change History (26)
comment:1 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 14 years ago by mfeiri
Cc: | mfeiri@… added |
---|
Well, it is doable though and it would be nice-to-have in any case. Assuming we use the clang toolchain we'd just need binaries of clang, ld64, and a make tool. Additionally we'd have to provide headers from xnu and Libc. That should be all thats necessary to bootstrap macports. Everything else can be built from there.
comment:3 Changed 14 years ago by jmroot (Joshua Root)
You should theoretically be able to run MacPorts without Xcode right now, provided your toolchain is installed in the same places as Xcode's. The only thing that actually requires it is the base installer pkg preflight check (and you could fool that with any old executable installed as /usr/bin/xcodebuild). Individual ports may of course rely on all kinds of things from Xcode, most obviously xcodebuild itself.
comment:4 follow-up: 7 Changed 14 years ago by internetzel
Replying to joshmoz@…:
I realize this would be a pretty significant change but I'd like for MacPorts to not depend on Xcode. Xcode now costs money, which means that MacPorts depends on non-free (as in beer) software. As far as I know there is no convenient and free developer toolchain on Mac OS X any more. The MacPorts project is probably in the best position of any project to provide that.
Did you ever realize there is Gentoo Prefix?
http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-macos.xml
I didn't know of it's existence until a fews days ago but they seem to provide exactly what you're looking for. It needs Xcode only for bootstrapping. After that everything gets compiled by it's own toolchain.
Although I didn't test it they seem to provide clang 2.9 as well as llvm-gcc-4.2 ready to be built and used on Tiger, Leopard and Snow Leopard.
comment:7 Changed 14 years ago by joshmoz@…
Replying to tobias.netzel@…:
Did you ever realize there is Gentoo Prefix?
http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-macos.xml
I didn't know of it's existence until a fews days ago but they seem to provide exactly what you're looking for. It needs Xcode only for bootstrapping. After that everything gets compiled by it's own toolchain.
Although I didn't test it they seem to provide clang 2.9 as well as llvm-gcc-4.2 ready to be built and used on Tiger, Leopard and Snow Leopard.
That's really no better than MacPorts for what I want. I am only interested in getting a developer toolchain on my machine without having to have Xcode myself. I don't care how the toolchain itself is compiled.
comment:9 Changed 14 years ago by kaioless@…
Also I'd like to ask why is it not possible to make binary macports package?
comment:10 Changed 12 years ago by skymoo (Adam Mercer)
Cc: | ram@… removed |
---|
comment:12 follow-up: 13 Changed 12 years ago by cooljeanius (Eric Gallager)
This came up again on the mailing lists here: https://lists.macosforge.org/pipermail/macports-dev/2013-March/022374.html
Also I'd like MacPorts to go even further than this: I'd like it to be entirely self-hosting some day.
comment:13 Changed 12 years ago by larryv (Lawrence Velázquez)
Replying to egall@…:
Also I'd like MacPorts to go even further than this: I'd like it to be entirely self-hosting some day.
I don't think this is something worth pursuing, to be perfectly frank. The bang for the buck just isn't there.
comment:14 Changed 11 years ago by larryv (Lawrence Velázquez)
Cc: | c.herbig@… added |
---|
Has duplicate #39789.
comment:15 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | schwern@… m@… Per.Mildner@… added |
---|---|
Version: | 1.9.2 |
comment:18 Changed 10 years ago by mfeiri
After a batch of changes we now have something like a pure open source SDK in ${destroot}${prefix}/Developer/SDKs/Darwin${os.major}.sdk. The relevant ports are CarbonHeaders, csu, libc-headers, libm-headers, libunwind-headers, and xnu-headers. I didn't yet try to uninstall Xcode to really verify this, but it appears possible now to build basic applications without Xcode. This works for me on my machine (OS X 10.9):
clang-mp-3.5 helloworld.c -isysroot /opt/local/Developer/SDKs/Darwin13.sdk --sysroot /
Plenty of work/opportunities for future enhancements exist:
- Package open source headers for 10.10 SDK if and when Apple provides them
- Improve coverage relative to the official OS X SDK, e.g. provide libraries and more headers
- Offer versioned DarwinXX.sdk ports instead of a bunch of header ports for the current host system, e.g. to enable cross-compilation
- Provide substitutes for xcodebuild (e.g. xctool) and other relevant developer tools.
- Introduce a way for ports to indicate if they can be built with a pure open source SDK or if proprietary frameworks are required.
comment:23 Changed 6 years ago by isviridov
Cc: | isviridov added |
---|
comment:24 Changed 6 years ago by Dave-Allured (Dave Allured)
Cc: | Dave-Allured added |
---|
comment:25 Changed 4 years ago by mascguy (Christopher Nielsen)
Cc: | mascguy added |
---|
comment:26 Changed 3 years ago by mascguy (Christopher Nielsen)
Cc: | mascguy removed |
---|
Xcode 3 is still free and still works fine on Snow Leopard. Since Lion is not released we don't know what will happen with that yet.
This wish is probably best discussed at length on the mailing list first; it's not a ticket than can be easily resolved with a couple lines of code. This is a major major change. It's probably not realistic to expect MacPorts to ever be free of the Xcode dependency -- not for all variants of all ports, anyway.