[uClibc] Link error with ARM tool chain

Hongbo Rong rong at mail.capsl.udel.edu
Tue Aug 5 13:22:47 UTC 2003


I just start to know uclibc, and really have no much to say. But I got
into some linking problems days ago, and the solution maybe helps in your
situation.  It seems that some header files correspoinding to libc are not included
correctly. You may try to add -L.../uclibc/../include before -lc.

Good luck.

Rong

On Fri, 1 Aug 2003, sampath wrote:

~> Hi,
>
> I have generated a shared library with following compile options
>
> /*******************/
> /usr/src/lsi/intoto/libs/uClibc/extra/gcc-uClibc/arm-uclibc-gcc
>  -shared -o libigwifconfig.so obj/af.o obj/ash.o obj/ether.o obj/frame.o
> obj/getargs.o obj/getroute.o
> obj/hw.o obj/inet.o obj/inet_gr.o obj/inet_sr.o obj/interface.o
> obj/loopback.o obj/nstrcmp.o
> obj/proc.o obj/setroute.o obj/sit.o obj/sockets.o obj/tr.o obj/unix.o
> obj/util.o -lc
>
> /*******************/
>
> As you can see , I also included stndard C Library ( -lc ).
>
> Then I tried to build an user mode application linking the above shared
> library, as shown below
>
> /*****************
> /usr/src/lsi/intoto/libs/uClibc/extra/gcc-uClibc/arm-uclibc-gcc
> -L../../../system/ar900/ifconfig -ligwifconfig obj/cliparse.o obj/clistub.o
> obj/clisess.o obj/cliutils.o obj/climain.o obj/mtestcmd.o obj/clicnf.o
> obj/cliparse.o: In function `CliGetWord':
> obj/cliparse.o(.text+0x1f0): undefined reference to `ctype_b'
> /********************/
>
> I get link error for '__ctype_b'
>
> When I ran arm-linux-nm on libc.a then it shows 'ctype_b' is defined. But
> when I run arm-linux-nm on
> libigwifconfig.so  ( my shared library) 'ctype_b' is undefined ??.
>
> I suspect my compilation options in generating the shared libaray are not
> good enough to include all
> functions from the libc.a .
>
> Can any one please help me in solving this problem.
>
> with regards,
> sampath.
>
>
>
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://uclibc.org/mailman/listinfo/uclibc
>




More information about the uClibc mailing list