[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Problems resolving names in ld, even though libs specified  in -L

Posted on 2006-06-26
4
Medium Priority
?
313 Views
Last Modified: 2010-04-15
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 libXtst.so, and the line:

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:

$(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?

FYI: using gcc 4.0.2, ld 2.16.91 and kdrive X libs, cross-compiling for GP2X handheld. I don't think these are the cause of the problem: I think it's some linker option(s) that I haven't managed to set.

Edit: I'm not even sure that C is the right place to host this question ... perhaps platforms/Linux would be better?
0
Comment
Question by:bpmurray
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 46

Accepted Solution

by:
Kent Olsen earned 750 total points
ID: 16984504

This looks like a fairly common 64-bit/32-bit conflict error.  You probably have libXext.so.5 (or other version) in /usr/lib but not .6.  See if it is in the filesystem anywhere and create a link to it from /usr/lib.

Is the file there?  If it's not there you'll have to install it.


Kent

0
 
LVL 15

Author Comment

by:bpmurray
ID: 16984559
All the libs are present & accounted for. The X libs are in the X11R6/lib dir which is included as a -L param. Do you think I should link from /usr/lib to these, even though they should be visible by virtue of the -L? BTW, I also tried LD_RUN_PATH and that didn't work either.
0
 
LVL 46

Expert Comment

by:Kent Olsen
ID: 16984581

Links are easy to create and delete.  :)   It can't hurt to try.

BTW, I find these 64/32 bit conflicts a complete PITA.  I'll certainly be glad when the 64 bit environments are more complete.


Kent
0
 
LVL 15

Author Comment

by:bpmurray
ID: 16984744
Found it! Your idea about it being in /usr/lib pushed me to thinking about how it might find the libs. I simply changed the use of -rpath <dir> to -rpath-link <dir-list> and it found the libs.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question