[uClibc]uclibc-0.9.10 : undefined references to dlopen and dlerror

Sander Klein s.klein at quicknet.nl
Tue Mar 26 16:43:03 UTC 2002


Hiya,

On 26 Mar 2002, Julien Herfurth wrote:

> cc -O2 -DNDEBUG -Wall -Wunused
> -I/home/julien/router/linux-2.4.17/include -Iinclude/
> -DNETFILTER_VERSION=\"1.2.5\"  -DIPT_LIB_DIR=\"/usr/lib/iptables\"
> -rdynamic -o iptables iptables-standalone.c iptables.o libiptc/libiptc.a
> -ldl
> iptables.o: In function `find_match':
> iptables.o(.text+0x828): undefined reference to `dlopen'
> iptables.o(.text+0x85e): undefined reference to `dlerror'
> iptables.o: In function `find_target':
> iptables.o(.text+0xf6f): undefined reference to `dlopen'
> iptables.o(.text+0xfa7): undefined reference to `dlerror'
> collect2: ld returned 1 exit status
> make: *** [iptables] Error 1
> rm libiptc/libip6tc.o libiptc/libip4tc.o

This problem was already reported on the list by me. The solution is verry
simple and was also reported by Erik.

Go in your uclibc directory to ./extra/gcc-uClibc/
In there there is the file gcc-uClibc.c open this in your favourite editor
and goto line 246 and 247. Those lines contain the following:

//snap//
                                case 'r':               /* partial-link */
                                case 'i':               /* partial-link */
//snap//

If you remove these two lines and rebuild uClibc iptables will build fine.

Greets,

Sander Klein




More information about the uClibc mailing list