[cairo] Autotools help? (linking to latest dev libglib)

Paul Fredrickson paul.fredrickson at gmail.com
Wed Jun 10 19:40:59 PDT 2009


Hi Great Cairo List,

Big fan of cairo; been using it (casually) for years.

I'm running into a build problem, though, trying to build the
development tip of gnome.  That is, I'm trying to build and develop
using the tip of the development branches for several gnome libraries,
while at the same time NOT mess with or replace the ones I have
installed as part of my distribution.  To do this I'm basically
following the steps outlined here:
http://www.gnome.org/~newren/tutorials/developing-with-gnome/html/ch04.html
 (I'd love to know how people do this normally, by the way.)

When it gets to pixman I get the following error:

/opt/gnome2/lib64/libgio-2.0.so: undefined reference to
`g_ptr_array_new_with_free_func'
/opt/gnome2/lib64/libgio-2.0.so: undefined reference to `g_error_new_valist'
/opt/gnome2/lib64/libgio-2.0.so: undefined reference to
`g_hostname_is_non_ascii'
/opt/gnome2/lib64/libgio-2.0.so: undefined reference to `g_hostname_to_ascii'
/opt/gnome2/lib64/libgio-2.0.so: undefined reference to `g_byte_array_unref'
/opt/gnome2/lib64/libgio-2.0.so: undefined reference to `g_byte_array_get_type'
collect2: ld returned 1 exit status

The nautilus list (the guys who own libgio) helped me determine that
these functions were introduced recently in libglib, and would be
coming up undefined if I were somehow linking to the original libglib
installed by my distribution (Ubuntu 9.04 - amd64).  That is, even
though ldd libgio-2.0.so shows it's linking to the latest libglib,
it's actually while trying to build pixman that it finds the one from
Ubuntu.  Sure enough, when I looked again, I found that my build
command looked something like this:

 gcc -g -O2  ... -L/usr/lib /usr/lib/libglib-2.0.so ...
/opt/gnome2/lib64/libglib-2.0.so

So... I sorta know what's going wrong here (I'm guessing that pixman's
autotools/configure step requires a minimum version of glib, it finds
one in /usr/lib, and adds it to the front of the list), but I have no
clue how to fix this! I wouldn't run into this if I was just building
cairo/pixman using the installed version of libglib.  Similarly, I
wouldn't run into this if I installed my dev versions over my
distribution's versions (but that makes me nervous).  In fact, I even
realize this is probably less a problem with your autoconf script than
a problem with the autoconf tools themselves, but I'm picking on you
guys for the following reasons:

 #1. It *is* your library that broke first. ;) (At least, I *hope*
pixman traffic comes here, too. Otherwise, that's a big load of egg on
my face!)
 #2. I'm hoping someone here has run into this before and already
knows how to tell autoconf or whatever to add the /usr/lib one *after*
the dev one.

Can anyone here help me?

Thanks!

--Paul


More information about the cairo mailing list