How to compile on OS X with *alternate* freetype?



Hi folks-

I posted this on the main list yesterday, but since there
hasn't been even a nibble in the last 24 hours, I thought
I'd check with the experts on the source/config.

Quick version:

Is there a way to get GTK (and PyGTK) to build on OS X
against freetype in /usr/local rather than Apple's (leaving
Apple's in place for whatever use Apple makes of it)?
I looked for a config option via "./configure --help" but
didn't find one.

Also (just out of curiousity), what is the OS X branch?
Is this for a version of GTK+ that won't need an X server?

Details:

I've had a heck of a time getting GTK to play nicely with
OS X (Panther).  The source of the difficulty is freetype.
I use Python a lot, including its most popular plotting
package, matplotlib ("mpl", http://matplotlib.sourceforge.net/).
The mpl developers say that Apple's freetype (under /usr/X11R6)
has unique quirks (peculiar versioning and other issues) and
so mpl requires a "standard" freetype.  It's easy enough to
install freetype in /usr/local from source or via i-Installer,
or to use fink's version (I'm doing it from source).  mpl
then builds and executes quite happily.  Many OS X users
work this way.  But they aren't also trying to use GTK/PyGTK.

The problem is that freetype appears to be the source of GTK
complications for me.  I eventually got GTK+ 2.4 to build 
after many hours of iterating.  To do so, I had to remove
freetype from /usr/local.  This of course broke mpl, so I
put it back afterward.

I just upgraded to GTK+ 2.6, and was determined to try to
find a way to build without removing freetype from /usr/local.
A straightforward install fails the way the 2.4 originally
failed---it builds and installs fine, but gtk-demo crashes
with a bus error (that I tracked down to freetype).  During
the install, there are messages from ld like this:

 ld: warning suggest use of -bind_at_load, as lazy binding may result in 
 errors or different symbols being used
 symbol __nl_load_domain used from dynamic library 
 /usr/local/lib/libintl.2.dylib(loadmsgcat.o) not from earlier dynamic 
 library /usr/local/lib/libintl.1.dylib(loadmsgcat.o)

This and some googling led to try building GTK+ with these
flags:

% setenv CPPFLAGS "-no-cpp-precomp"
% setenv LDFLAGS "-bind_at_load"

This worked!  gtk-demo runs, and the main GTK apps I'm after
(gEDA) appear to work.

Emboldened, I then tried installing PyGTK.  It builds fine
but again I get a bus error if I try to use it.  I note that
its log to stderr includes "-I/usr/X11R6/include/freetype2"
making me suspect freetype conflicts are again the issue.

So... is there a way to get GTK and PyGTK to build on OS X
against freetype in /usr/local rather than Apple's (leaving
Apple's in place for whatever use Apple makes of it)?
I looked for a config option via "./configure --help" but
didn't find one.

Thanks,
Tom Loredo



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]