[uClibc] uClibc + C++, and dynamic linking issue

Rafal Gwizdala gwrafal at hotmail.com
Wed Nov 19 08:13:43 UTC 2003


Thanks for all hints.
It's a bit hard to start with uclibc, but I'm making some progress.
The main problem is that when i'm using the gcc provided with the uclibc
(probably this is the gcc wrapper mentioned by you),
i can't easily control which libraries it uses for linking. It doesn't
always link with uclibc libs, sometimes it picks
up some libs from /lib or /usr/lib on my development system - and those are
normal libc based binaries. So
I must very carefully set up the build environment to give gcc only the
uclibc libs, and then test it with ldd to see what
libs were linked this time :( - doesn't work always.

I'll try the toolchains and buildroot mentioned by you, hope this helps and
is not too hard to begin with.

BTW: I want to compile TCL 8.4 with uclibc and threading support. I had to
make some changes in TCL sources and Makefile, but still
the outcome is not what I want (mainly because of linking problems). Hope
this will be solved by using proper buildroot, but maybe someone
has done it before and could describe the procedure?

Regards,
Rafal Gwizdala


----- Original Message ----- 
From: "Manuel Novoa III" <mjn3 at codepoet.org>
To: "Rafa? Gwizda?a" <gwrafal at hotmail.com>
Cc: <uclibc at uclibc.org>
Sent: Tuesday, November 18, 2003 9:12 PM
Subject: Re: [uClibc] uClibc + C++, and dynamic linking issue


> On Tue, Nov 18, 2003 at 09:51:24AM +0100, Rafa? Gwizda?a wrote:
> > Hello,
> >
> > I'm trying to create a small linux package, based on uClibc - first of
all, I'd like to thank uClibc developers for this great product. I'm pretty
new in uClibc and have two problems with it that I can't solve, so I'd like
to ask for your help (hope this won't be too troublesome)
> >
> > Situation:
> > I'm developing on a RedHat 9 system, with uClibc compiled and
development tools installed in /usr/i386-linux-uclibc/.
> > The target filesystem is mounted in /mnt/hdd7 - this is the small linux
fs I'm creating and this partition will become the root of the small linux.
Every program compiled on a dev system goes to /mnt/hdd7/bin, and uClibc
libraries were installed to /mnt/hdd7/lib.
> >
> > Problem 1. linking against ucLibc
> > All programs compiled with uClibc tools are linked to uClibc libraries
in /usr/i386-linux-uclibc/lib, but I'd like them to be linked with the same
libraries in the /lib directory (since the target filesystem has libraries
installed in /lib). How can I achieve this without copying uClibc libraries
to /lib on my development system?
>
> You need to read the help text for the Library Installation Options
> when configuring uClibc.
>
> > Problem 2. uClibc and C++
> > I'm trying to compile some simple C++ programs and libraries. The
problem is that even if compiled with the gcc provided by uClibc, they are
linked with standard c++ library on my system , and sometimes they also have
a dependency on libc.so.6 (glibc on my dev system, which I'm trying to
avoid).
> > How to make C++ libraries depend only on libs provided by uClibc?
> >
>
> My guess is you are using the gcc wrapper, which is now deprecated.
> Also, you need a libstdc++ built against uClibc.  See the various
> toolchain and buildroot links on the uClibc web page.
>
> Manuel
>



More information about the uClibc mailing list