Re: [Audacity-devel] Mac Xcode project
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Paul L. <pau...@bo...> - 2013-01-16 14:06:33
|
I'll try and answer as much as I can but I'm on a client site and away from anything that looks like a Mac. On 16 Jan 2013, at 01:44, Martyn Shaw <mar...@gm...> wrote: > Thanks Paul! That is very informative! I don't have a Mac, but if I > did it would be difficult for me to become a devel, I feel. > > On 16/01/2013 00:46, Vaughan Johnson wrote: >> Thanks, Paul. The important thing for 2.0.3 is, I think, will there be >> any impact on the Mac release (candidates) if we don't release tarballs >> this time around? > > That really is a good question, but may not be exactly the right > question. A better question may be 'would there be an impact on the > Mac release if all the Linux stuff ('automake' etc.) wasn't up-to-date?'. The configure scripts are needed for the Mac build so if things aren't up to date they need to be generated. By default Macs come with the automake tools but they're not necessarily that recent. Historically they've needed a little tweaking in system config files to get them working but I think that's no longer necessary. >> >> >> On 1/15/2013 5:30 AM, Paul Livesey wrote: >>> On 15 Jan 2013, at 01:38, Martyn Shaw wrote: >>> >>>> Hi Paul >>>> >>>> Out of interest (and I'm mostly Win-only), how dependent is the Mac >>>> build on the various linux build process stuff? That is, on 'config' >>>> and all those *nix things that I do not understand. Is the x-code >>>> stuff independent of that? >>>> >>>> Thanks >>>> Martyn >>> >>> Hi Martyn, >>> >>> The Xcode project is a bit of a halfway house or worst of all worlds type affair! It is ofttimes not for the faint of heart, especially if you're trying to support a variety of OSX platforms. > > That sounds like a nightmare! Why do we do it like that? Most of this comes from or is related to building universal binaries. There are a lot of very serviceable Macs out there with a PPC processor (running Tiger or Leopard) that would like to run Audacity. In an ideal world the build process would be the same as on Linux but many of the libraries don't natively support multiple architectures/cross compiling so we use Xcode to deal with it and the resulting mess. > >>> The configure scripts are required > > Do they just stay the same, mostly? Once generated we don't touch them but do modify the files they produce. > > and are used to generate config.h, Makefiles and sometimes other > things. The Makefiles (which are useful in setting up the Xcode > project when things fail) are ignored, the config.h files are often > modified on the fly afterwards and then Xcode build things as it sees > fit (with a few pointers and a bit of help from us). >>> >>> In a similar way to Visual Studio all the source files need to be added to the Xcode project as we don't use the Configure generated Makefiles and so any files added or removed from the project (or any of the used libraries) causes a build failure. It's a little bit fragile truth be told. > > And many thanks for keeping it up to date! A pleasure. > >>> One of the biggest problems is building universal binaries (binaries that run on both Intel and PPC platforms). Intel is little endian but PPC is big. The preprocessor defines macros for whether it's in Intel or PPC mode but most of the configure scripts for the used libraries do not support universal builds so we have to modify their output after they've finished. The latest version of Xcode (4.x) doesn't support PPC or any version of the OS pre 10.5 (I think, might even be 10.6) (PPC was last supported on 10.5 and Intel first appeared on 10.4) so we're stuck with using Xcode 3.x which from memory doesn't work on Lion or Mountain Lion (or at least doesn't support PPC on those platforms without a *lot* of hand waving). > > I hear you, and sympathise. It sounds like a complete pain! I assume > that the problems are in supporting older versions of OS, but how old > are they and is it really worth the bother? Would it be better to > ditch the older versions and have more people who could compile for > later/current versions of the OS, using the later OS? I think that > means dropping support for PPC (and you have to appreciate that I > don't know what that means). > Supporting older versions of the OS is not a problem, at least once wxMac is built (but that can be an entirely different world of pain). Currently everything back to Tiger is supported. The problem is supporting multiple architectures. We currently build a "fat" Audacity binary that contains PPC and x86 binaries. It's theoretically possible to add in x86_64 and PPC64 binaries as well but I'm not touching that can of worms. > We have to drop older / less supported versions of operating systems > as time goes by, as we have dropped 98/ME support after 2.0.0 (long > overdue). > > http://en.wikipedia.org/wiki/OS_X#Version_10.6:_.22Snow_Leopard.22 > has it that they dropped support for PPC in 2009. So why are we > there? Could we move into the new decade and have a system that > allows people to compile Audacity themselves on a modern machine, with > no reference to PPC? What would that take? To convert the project file to the latest version of Xcode, remove the PPC stuff and give it a general tidy up is probably a few hours work. However, there are a *lot* of PPC Macs out there. The alternative is to try and use the configure script to build everything. It's possible but nowhere near as nice from a development point of view where the Xcode IDE is very useful. > > From what I understand, if I went out today and bought a new Mac I > couldn't become an Audacity devel without downgrading my OS and > investigating older versions of stuff. That does not seem like a > position we should be in. How do we get out of that? > After a few pointers from Leland earlier in the week I see it's now relatively easy to trick Lion/Mountain Lion into installing Xcode 3. This is the last version of the compiler that can build for PPC. So with a brand new Mac you can install Xcode 3 with only a small wave of the hand and build everything. I haven't tested this but Leland thinks that it works. Certainly the x86 side of things does. The PPC side is on my list of things to test this weekend. Building wxMac correctly is still a trial though. It's tricky on Snow Leopard and I've no idea what Lion/Mountain Lion are like. I've posted a few tips on the forums as to what's required but still everybody gets it wrong as there's so much to go wrong! > I'm 'Mr. More Questions Than Answers' tonight, me! > Please, ask away. The more people who know about the intricacies of the Mac build system the better. At least then if a recurrence of the events of November 1st 2011 happen the building of Mac binaries can continue in my absence. Paul |