X Link Error


bpmurray

Still Fresh
Joined
Mar 5, 2006
Messages
38
Age
68
Location
Ireland
Website
louthanglers.8k.com
I'm trying to build a package, using configure, and it all works fine with the single exception of the X libraries. There's a step to locate the Xtst lib, and the line:

Code:
gp2x-gcc -o conftest -O3 -Wall --fast-math -I$(GP2XDEV)/gp2x/include -I$(GP2XDEV)/include -lpthread -ldl conftest.c -lXtst  -L$(GP2XDEV)/X11R6/lib -L$(GP2XDEV)/lib -L$(GP2XDEV)/gp2x/lib >&5

fails with a bunch of messages which are of the form:
Code:
$(GP2XDEV)/lib/gcc/gp2x/4.0.2/../../../../gp2x/bin/ld: warning: libXext.so.6, needed by $(GP2XDEV)/X11R6/lib/libXtst.so, not found (try using -rpath or -rpath-link)

When I update my LDFLAGS to include -Xlinker -rpath -Xlinker $(GP2XDEV)/X11R6/lib, I still get the error. Any ideas?

Edit: The required libs are all present in X11R6/lib, so I don't understand why it's failing.
 
The libraries were built with GP2XDEV set to /usr/local/gp2xdev with oopo's toolchain (GCC4.0)

Have you tried adding -lXext?

Or you could statically link and specify all the libraries
 
The libraries were built with GP2XDEV set to /usr/local/gp2xdev with oopo's toolchain (GCC4.0)

Have you tried adding -lXext?

Or you could statically link and specify all the libraries

Ahh - I found it. I added -Xlinker -rpath-link -Xlinker "${GP2XDEV}/X11R6/lib:${GP2XDEV}/lib:${GP2XDEV}/gp2x/lib" to the LDFLAGS, i.e. setting -rpath-link to the linker. However, I've now hit another problem - it's looking for GTK+. I know you did some work on the X libs - do you know if GTK+ is available?
 
Last edited by a moderator:
They're in the X11 libs archive under X11R6/lib/pkgconfig, you may need to edit the paths they contain if you're not using /usr/local/gp2xdev and set PKG_CONFIG_PATH to point to X11R6/lib/pkgconfig
 
Back
Top