Re: Trouble building gtk+-2.0 - undefined reference to `g_intern_static_string'



On 2/12/06, Don Rozenberg <don rozenberg gmail com> wrote:
> Hi,
>
> I am trying to build pygtk and it requires gtk+-2.0 >= 2.7 and so I am
> trying to build gtk+-2.8.12 and keep running into the following
> error:
>
> gcc -g -O2 -Wall -o .libs/gtk-query-immodules-2.0 queryimmodules.o
> ./.libs/libgtk-x11-2.0.so -L/usr/local/lib
> /home/rozen/pkg/gtk+-2.8.12/gdk/.libs/libgdk-x11-2.0.so -L/usr/X11R6/lib
> /usr/lib/libatk-1.0.so ../gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so
> ../gdk/.libs/libgdk-x11-2.0.so -lXrandr -lXinerama -lXext
> /usr/local/lib/libpangocairo-1.0.so /usr/lib/libcairo.so
> /usr/local/lib/libpangoft2-1.0.so /usr/local/lib/libpango-1.0.so
> /usr/lib/libgobject-2.0.so /usr/lib/libgmodule-2.0.so
> /usr/lib/libglib-2.0.so /usr/local/lib/libcairo.so -lpng12
> /usr/lib/libfreetype.so -lz -lfontconfig /usr/lib/libXcursor.so
> /usr/lib/libXrender.so -lX11
> /home/rozen/pkg/gtk+-2.8.12/gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so
> /usr/local/lib/libgmodule-2.0.so -ldl /usr/local/lib/libgobject-2.0.so
> /usr/local/lib/libglib-2.0.so -lm
> ./.libs/libgtk-x11-2.0.so: undefined reference to `g_intern_static_string'
> ./.libs/libgtk-x11-2.0.so: undefined reference to `g_object_compat_control'
> collect2: ld returned 1 exit status
>
> I previously build and installed glib-2.9.6 with no apparent problem.
>
> When I look at libraries in /usr/local/lib, I see the following:
>
> Bash ajax rozen [~] ->nm /usr/local/lib/libglib-2.0.so |grep
> g_intern_static_string
> 00012d60 t IA__g_intern_static_string
> 00012d60 T g_intern_static_string
>
> and
>
> Bash ajax rozen [~] ->nm /usr/local/lib/libgobject-2.0.so | grep
> g_object_compat_control
> 0000f690 T g_object_compat_control
>
> It looks to me as though the references are indeed defined. So I am
> missing something fundamental. I would certainly appreciate some
> guidance.
>

For some reason GTK+ tries to link against your system GLib instead
of the one in /usr/local/lib

Matthias



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