[texworks] [MacTeX] Call for Help: Mac builds
source at sharpsteen.net
Wed Feb 16 20:24:03 CET 2011
On Tue, Feb 15, 2011 at 11:44 PM, Bruno Voisin <bvoisin at me.com> wrote:
> > 3) What to do about universal binaries
> Several problems arise:
> - You need to relaunch the Xcode installer and select an option to install
> the 10.4 SDK, if the plan is to provide a version running on Tiger. I don't
> remember how the option is spelled out.
I would suggest putting Tiger on hold for the moment and getting something
that runs on ppc, i386 and x86_64 that works for Leopard and above. This
combination would probably be enough to cover the majority of Apple
hardware/software combinations. If Tiger support turns out to be easy to
add, the it should be added. If it turns out to be a pain in the rear, then
someone who really, really wants TeXworks to run on Tiger will have to step
up and demonstrate exactly how much they want it by supporting a Tiger
Another possibility is to produce two binaries: one ppc for 10.4/10.5 and
one i386/x86_64 for 10.5/10.6.
> - You need to have access to Macs allowing 32- and 64-bit builds. I don't
> remember if the plan is to provide PPC builds; if this is the case, you need
> a PPC Mac.
Shouldn't be necessary for building. The gcc compiler included in XCode is
capable of generating ppc, ppc64, i386 and x86_64 binaries regardless of the
architecture of the host machine. Access to a PPC mac would still be nice,
and I would say necessary, for testing purposes.
- Jonathan mentioned "passing appropriate configure options or setting
> environment variables", such that the builds are universal, and Adam Maxwell
> on the MacTeX list was more specific: "you'll have to build the libraries
> for all architectures, then lipo them together (or take a chance and use the
> -arch option to gcc with multiple architectures)". This is far, far, far
> from trivial.
> For example, here's how Dick Koch described to me, in an off-list message,
> the way he builds Ghostscript for inclusion in MacTeX. I don't think Dick
> will mind my posting his description here:
> > As others reported, the standard
> > configure
> > make
> > sudo make install
> > works fine. I "blow away" my old /usr/local before doing this. Afterward,
> > I only keep the contents of /usr/local/bin,
> /usr/local/share/ghostscript/8.71, and
> > /usr/local/share/man. Ghostscript fonts aren't part of the standard
> distribution, so
> > I find those separately on the internet and install in
> > The only tricky thing is something which won't interest you. I compile
> ghostscript eight times:
> > Intel Leopard (with X11)
> > PPC Leopard (with X11)
> > Intel Leopard (without X11)
> > PPC Leopard (without X11)
> > Intel Tiger (with X11)
> > PPC Panther (with X11)
> > Intel Tiger (without X11)
> > PPC Panther (without X11)
> > Then I lipo these together in pairs, and install the four binary files in
> > At installation time, I determine whether the machine has Leopard or an
> earlier system, and remove
> > two of the four pairs. The end result is gs-X11 and gs-noX11 in
> > At install time, the symbolic link gs is created pointing to the correct
> binary depending
> > on whether X11 is installed.
> Not trivial!
> On top of this (without the X11 or not X11 stuff, which is irrelevant for
> TeXworks), you'd need to also take care of providing both 32- and 64-bit
> binaries on architectures which support them (or choose between the two).
TeXworks may get lucky in this area in that it's dependency list is small
which minimizes the potential for problems. For Universal binaries:
Qt: Explicitly supported by the build system
Poppler: Includes a CMake-based build system. CMake includes explicit
support for generating universal binaries via the CMAKE_OSX_ARCHITECTURES.
fontconfig (if needed, which is the current state of things):
Appear to build fine following the procedures laid out in Technical Note
Namely, the following works:
export CFLAGS='-arch ppc -arch i386 -arch x86_64'
export CXXFLAGS='-arch ppc -arch i386 -arch x86_64'
export CPPFLAGS='-arch ppc -arch i386 -arch x86_64'
./configure --disable-dependency-tracking $OTHER_CONFIG_ARGS
The `--disable-dependency-tracking` is the important bit as it prevents the
makefiles from passing `-M` flags to the compiler which are not supported
during universal builds. When build in the above manner, I get universal
binaries that pass `make check`. Whether the results are portable is an
Hope this helps.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the texworks