Compiling gtk+ for DirectFB



Hi everyone,

I'm trying to compile GTK+ 2.18.9 using the DirectFB backend only.  My goal is to use GTK+ to build static DirectFB-only programs, but GTK+ keeps getting built with undefined X11 symbols in it.

First, my configure line:

PKG_CONFIG_LIBDIR=/home/ersin/
vorpo/toolchain/usr/lib/pkgconfig FFLAGS="-Os" CXXFLAGS="-Os" CFLAGS="-Os" ./configure --prefix=/home/ersin/vorpo/toolchain/usr --host=i386-linux --enable-static --disable-xkb --disable-xinerama --disable-glibtest --with-gdktarget=directfb --without-x --cache-file=config.cache --without-xinput --disable-xim --disable-modules

(config.cache is a file that contains gio_can_sniff=${gio_can_sniff=yes}, which I need for cross compiling)

Everything builds fine, but when I try to compile the GTK+ tutorial hello world program, I get this error:

[ersin basmati test]$ PKG_CONFIG_LIBDIR=/home/ersin/vorpo/toolchain/usr/lib/pkgconfig i386-linux-gcc -Wall -g gtktest.c -o gtktest `pkg-config --cflags gtk+-2.0` `pkg-config --libs gtk+-2.0`
/home/ersin/vorpo/build/buildroot-2010.02/output/staging/usr/bin-ccache/../lib/gcc/i386-linux-uclibc/4.3.4/../../../../i386-linux-uclibc/bin/ld: cannot find -lgtk-x11-2.0
collect2: ld returned 1 exit status

Hmm.  I move to my toolchain's /usr/lib dir and grep for "x11":

[ersin basmati lib]$ grep "x11" -R ./*
Binary file ./libgtk-directfb-2.0.a matches
Binary file ./libgtk-directfb-2.0.so matches
Binary file ./libgtk-directfb-2.0.so.0 matches
Binary file ./libgtk-directfb-2.0.so.0.1800.9 matches
Binary file ./libjpeg.a matches
Binary file ./libjpeg.so matches
Binary file ./libjpeg.so.8 matches
Binary file ./libjpeg.so.8.0.1 matches
Binary file ./terminfo/z/ztx11 matches
Binary file ./terminfo/z/zt-1 matches
Binary file ./terminfo/z/ztx matches
Binary file ./terminfo/z/ztx-1-a matches
Binary file ./terminfo/h/htx11 matches

(BTW, grep "X11" -R ./* pulls up nothing relevant)

What???  X11 is getting built into the DirectFB component of GTK+??  nm libgtk-directfb-2.0.a reveals:

gtkstatusicon.o:
...
0000001a T IA__gtk_status_icon_get_x11_window_id
...
0000001a T gtk_status_icon_get_x11_window_id
...

Are these measly two status icon symbols causing the gtk-x11-2.0 dependency?  Stranger still, I grep in my toolchain's /usr/lib dir to see if any pc or la files actually have -lgtk-x11-2.0, and none do:

[ersin basmati lib]$ grep -R "gtk-x11-2.0" ./*
[ersin basmati lib]$

Does anyone have any idea what's going on and how I can get rid of X11 completely?  I might add that I'm almost certain that no libraries or include files outside of my toolchain are being searched.  I've been using a custom specs file that's pretty thorough and hasn't had problems yet.

Thanks,
Ersin


--
What Digital Revolution? -- www.whatdigitalrevolution.com
Thinking critically about digital worlds.


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