glib2 and gcc

Ryan Schmidt ryandesign at
Mon Apr 11 12:15:33 PDT 2011

On Apr 11, 2011, at 08:58, Paul C wrote:
> My first post to this list. I'm mostly using MacPorts to control my G5
> as a development web server and that side of things works really well.
> However I've tried installing some additional applications that I used
> to use under Debian (PPC) but cannot get to compile.
> The main one I'm interested in is kdenlive for video editing,
> unfortunately I've hit a brick wall in glib2, I cannot get this to
> compile with the arch set to ppc64. I posted a bug on the Gnome bug
> tracker here:

Is there a particular reason you need the ppc64 architecture? There is no version of Mac OS X or MacPorts where ppc64 is used by default, so by using it you are likely to run into problems nobody has seen before. The only reason to use ppc64 would be if you need to run programs that need to access more than 4GB of memory.

> It seems that the problem with glib2 might be the version of gcc being
> used. I thought I would then have a go at using a version of gcc from
> MacPorts to see if a later version would work ok.

Ports build using the compiler the port author specified. Usually this is the version of gcc provided by Xcode. It is not supported for users to change this. If you insist on trying this, then you could use the following incantation:

sudo port clean glib2
sudo port install glib2 configure.compiler=macports-gcc-4.5

A list of available compilers is coincidentally contained in this unrelated document:

> However both gcc44 and
> gcc45 fail with the following errors:
> "checking for the correct version of the gmp/mpfr/mpc libraries... no
> configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC
> 0.8.0+.
> Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
> their locations.
> and
> If you obtained GMP, MPFR and/or MPC from a vendor distribution package,
> make sure that you have installed both the libraries and the header
> files.  They may be located in separate packages."

This looks like this bug report:

I guess we don't yet know why it's happening.

> As far as I can tell the correct packages are installed:
> gmp @5.0.1
> mpfr @3.0.1
> libmpc @0.9
> So my first question is if these MacPort installs pull down the header
> files and the libraries or do I need to install separate ports for the
> headers?

MacPorts does not use the separate-ports-for-headers packaging strategy that some other package managers use. The headers are already included if you've installed the ports.

More information about the macports-users mailing list