Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-12-2005, 09:59 AM   #1
Mike Davies
Registered: Jul 2004
Distribution: Custom Linux 4/Busybox. Fedora 22, Raspberry Pi
Posts: 98

Rep: Reputation: 15
Unhappy Problem with shared libraries (uClibc) on small embedded system. Help !

Iím trying to get a small embedded system running with shared libraries. It all works when I build my programs with ďĖstaticĒ, but to save room I now need to share libraries. But Iím having no joy. Iíve read the Program Library HOWTO and done everything that seems relevant

Development is on a 2.2.16 kernel, and the embedded system is a 2.4.8. Iím using uClibc which may be in odd place, but it works.

Iím creating a file system image for my embedded system in a subdirectory called tiny-linux, then generate a rom file system, and gzip the result into an initrd image. It all works OK until I try to build/run a program using shared libraries.

Build on the development system goes like Ö

[mike@local mapit]$ make
gcc -Wall -g -isystem/usr/i386-linux-uclibc/usr/include/ -O -c mapit.c
gcc -Wall -o mapit mapit.o -nostdlib -nostartfiles /usr/i386-linux-uclibc/usr/li
b/crt0.o -L/usr/i386-linux-uclibc/usr/lib/ -lc -lm
[mike@local mapit]$ ldd mapit
/lib/ => /lib/ (0x40017000) => /usr/i386-linux-uclibc/lib/ (0x40022000) => /usr/i386-linux-uclibc/lib/ (0x4005f000) => /lib/ (0x40066000)
/lib/ => /lib/ (0x40000000)
[mike@local mapit]$

[root@local work]# ldconfig -p -r./tiny-linux
9 libs found in cache `/etc/' (ELF) => /lib/ (ELF) => /lib/ (ELF) => /lib/ (ELF) => /lib/ (ELF) => /lib/ (ELF) => /lib/ (ELF) => /lib/ (ELF) => /lib/ (ELF) => /lib/
[root@local work]#

When I run it on the target system all I get is

# ls -l /bin/mapit
-rwxr-xr-x 1 root root 27161 Jan 1 1970 /bin/mapit
# ./bin/mapit
./bin/mapit: No such file or directory

As I said, if I build the program with ď-staticĒ everything is OK.

It seems to me that itís down to the libraries needed to resolve stuff when I build the program. I assume is the loader, can I simply copy the loader from my development system, or should I be using, in which case how do I tell the linker to use that rather then

Also libNoVersion. Whatís that for ? Is there some way I can discover why thatís being linked to.

And, why is it using that rather than

Any help appreciated.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Will more shared libraries slow down my system? Yalla-One Slackware 5 04-20-2005 04:01 PM
shared libraries problem after install shadow- oluijks Linux From Scratch 0 05-11-2004 05:10 PM
Problem with shared libraries(gtk) k0ljat Linux - Software 1 04-12-2004 02:25 PM
Idraw shared libraries problem sicone Linux - Software 2 03-16-2004 09:49 PM
problem with shared libraries when printing blinux1 Linux - Newbie 4 03-25-2003 06:03 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:22 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration