installing uclibc runtime on target system

Matthias Hofmann matthias.hofmann at tu-dortmund.de
Sun Apr 18 23:01:51 UTC 2010


Hello,

thank you very much for your advice, i am new to this field and some
things are not so good documented or scattered over the whole internet...

while compiling uClibc-0.9.30.2 with the command "make hostutils" i rn
into the following error:

In file included from ../utils/chroot_realpath.c:23:
../utils/porting.h:37:18: error: link.h: No such file or directory
make[1]: *** [../utils/ldconfig.host] Error 1
make: *** [hostutils] Error 2

I would like to build it under cygwin-1.7.1. is there an additional
dev-package which i need?

---
So what i did before on my target system is to copy the uclibc lib into
/lib/uclibc, editing /etc/ld.so.conf to search in that directory as well.
after that i ran "ldconfig". the library seems to run, but crashes in the
method which uses the ftruncate... functions. a shared library compiled
with glibc runs without any problems so it looks to me that it is either
an compatibility-problem concerning shared memory (unlikely) or a faulty
uclibc runtime.
so what i have to do now is simply copying the libraries into /lib and the
ld-uclibc file into /usr. But there are some libraries with the same name
in the directory (likely glibc-versions) which i did not want to
overwrite.

Best reagrds and many thanks,
Matthias

> On Sunday 18 April 2010 11:47:34 Matthias Hofmann wrote:
>> Hello,
>>
>> i use a uclibc crosscompiler toolchain to build programs for my target
>> system which is based on embedded linux, but my  programs are not
>> running
>> properly there, especially shared libraries.
>>
>> how to install uclibc on my embedded target system?
>
> You need to copy the *.so files it generates to your target's /lib
> directory.
> (libcrypt, libdl, libm, libpthread, librt, libutil, and of course
> libuClibc
> itself).  You may also need some symlinks pointing to them (such as
> libc.so.0
> pointing to libuClibc-0.9.31.so), and you'll also need to grab the shared
> library loader (ld-uClibc-0.9.31.so) which has to be installed at an
> absolute
> path (in /usr) so the
>
> uClibc builds an "ldd" command that's fairly useful, if you do "make
> utils".
> (Or is it "make hostutils"?)  That command lists the libraries a shared
> binary
> links against, and where they can be found if they're in the current
> search
> path.  The ldd that comes with glibc doesn't work on uClibc binaries
> (because
> the glibc version is stupid and badly designed, if you ask me), the uClibc
> one
> works on both.  The readelf -a command also gives you this info (and a lot
> more), you just have to dig through a lot of noise to get the shared
> library
> list when using that tool...
>
> My Firmware Linux project has prebuilt root filesystem and system image
> tarballs you can download and investigate, if you like:
>
>   http://impactlinux.com/fwl/downloads/binaries
>
> (The root filesystems are a tarball of files you can chroot into on an
> appropriate target, the system images are packaged to boot under qemu with
> the
> included run-emulator.sh script.  The reason they're so big is they
> contain
> native development tools, and there's not a lot you can do to get gcc down
> under 12 megs.  Next release I'll probably split out base and development
> tarballs.)
>
> The Linux From Scratch project is a marvelous way to learn all this stuff.
>  You
> might actually want to grab one of the _old_ versions from back when it
> was
> much simpler:
>
>   http://archive.linuxfromscratch.org/lfs-museum/3.0/LFS-BOOK-3.0-HTML/
>
> The modern book is about twice the size of that, and goes into great
> detail
> about the gnu tools that you don't need if you're doing uClibc and
> BusyBox.
> (I need to write an embedded linux from scratch, I just haven't yet...)
>
> Rob
> --
> Latency is more important than throughput. It's that simple. - Linus
> Torvalds
>




More information about the uClibc mailing list