views:

227

answers:

1

Hi All, I'm trying to compile libjingle on Mac OSX Snow Leopard. The INSTALL file said to './configure', 'make' and 'make install', as usual. But make fails for me. Initially it gave some messages indicating that I didn't have pkg-config installed (I guess OSX doesn't come with it installed?), so I downloaded pkg-config from http://pkgconfig.freedesktop.org/releases/

Now I get this message:

Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found

I tried to install gtk by using the script at SourceForge: http://sourceforge.net/projects/gtk-osx/

(this is the website pointed to by the gtk website)

Running the script didn't really seem to do anything, here is the output:

$./gtk-osx-build-setup.sh
Checking out jhbuild (2.27.3) from git...
From git://git.gnome.org/jhbuild
 * tag               2.27.3     -> FETCH_HEAD
Installing jhbuild...
Installing jhbuild configuration...
Installing gtk-osx moduleset files...
Done.
$

And I still get that error message about "Package gtk+-2.0 not found" while make-ing libjingle. Help will be appreciated, thanks!

A: 

The best way to compile GTK programs on OS X is to install MacPorts and then use that to install GTK by typing:

sudo port install gtk2

in a Terminal. Install any other packages you end up needing in the same fashion. When all that's done, set your path as follows:

export PATH=/opt/local:$PATH

and you should be able to compile your program.

ptomato
One thing to keep in mind with MacPorts and OSX is that by default it compiles everything for X11 which is probably not what you want. I had to do this: sudo port install gtk2 +no_x11 +quartz +universalThe +universal part was needed for Snow Leopard which is 64-bit by default.
jcoffland