[uClibc] 'strcat' should be found in uClibc !?!

Manuel Novoa III mjn3 at codepoet.org
Thu Jan 29 15:36:15 UTC 2004


On Thu, Jan 29, 2004 at 04:08:57PM +0100, Mario Premke wrote:
> Hello,
> I am trying to compile pppd [2.4.2] for a firewall project. I didn't
> compile the toolchain, but modified the 'Makefile' to link the sources
> against uClibc. So far I was successful compiling 'iptables' [and a few
> other, smaller utilities] using this procedure. The pppd *.c files are
> compiling well, but when linking them together I get the error below ...
> the function 'strcat' should be in libc.a, shouldn't it?
> 
> gcc -O3 -march=pentium-mmx -pipe -Wall -g -DHAVE_PATHS_H -DIPX_CHANGE -DHAV
> E_MMAP -nostdlib -I../include -I~/build/firewall/uClibc/include -I/usr/incl
> ude/pcap/ -DHAVE_CRYPT_H=1 -DHAVE_MULTILINK -DUSE_TDB=1 -static -nostdlib -
> lc -lm ~/build/firewall/uClibc/lib/crt0.o -o pppd main.o magic.o fsm.o
> lcp.o ipcp.o upap.o chap-new.o md5.o ccp.o ecp.o auth.o options.o demand.o
> utils.o sys-linux.o ipxcp.o tty.o eap.o chap-md5.o sha1.o multilink.o tdb.o
> ~/build/firewall/uClibc/lib/lib* -lcrypt
> ~/build/firewall/uClibc/lib/libcrypt.a(md5.o)(.text+0x472): In function
> `__md5_crypt':
> : undefined reference to `strcat'
> collect2: ld returned 1 exit status
> make: *** [pppd] Error 1
> 
> 
> Any ideas?

Your link order is wrong.  If you don't want to build a toolchain,
then I'd suggest looking at the (no longer supported) gcc wrapper.
But realize that there are good reasons why we require building a
toolchain and that you are on your own if you choose not to.

Manuel



More information about the uClibc mailing list