Search code examples
linuxgtkdebianglib

Symbol lookup error when using custom .xinitrc


I've built an application in C for a small touchscreen panel running Debian Squeeze. It compiles and runs fine on the panel in the default icewm Window Manager, but I would like the application to launch at boot with no taskbar or anything. So I made a custom .xinitrc file with only my application on it:

exec cowboys

Now, when I run startx, I get the following error:

cowboys: symbol lookup error: /usr/lib/libgdk-x11-2.0.so.0: undefined symbol: g_malloc_n

Can anyone tell me what I'm doing wrong here?

Thanks!


Solution

  • It seems as if your libgdk-x11-2.0.so file either 1. does not have a DT_NEEDED entry (cf. readelf -a for libglib-2.0.so.0) or 2. has been built against a sufficient glib-2.0, but runtime resolution yields a too-old glib. Check that you do not have any odd LD_LIBRARY_PATH variable. Run ldd on the gdk-x11 file, see where it locates glib, use nm -D on glib to check for g_malloc_n presence. Check for any odd glib installations in your system as well perhaps.