[PATCH] Add shared libraries needed for link

Gery Kahn geryk at ti.com
Wed Nov 10 04:30:14 EST 2010


On 11/10/2010 01:28 AM, Thomas Graf wrote:
> On Tue, Nov 09, 2010 at 02:57:01PM +0200, Gery Kahn wrote:
>> Needed to find shared libraries during linkage
>>
>> Signed-off-by: Gery Kahn<geryk at ti.com>
>> ---
>>   src/Makefile.am |   78 +++++++++++++++++++++++++++---------------------------
>>   1 files changed, 39 insertions(+), 39 deletions(-)
>>
>> diff --git a/src/Makefile.am b/src/Makefile.am
>> index 895c8ae..db293da 100644
>> --- a/src/Makefile.am
>> +++ b/src/Makefile.am
>> @@ -29,97 +29,97 @@ noinst_PROGRAMS = \
>>   	nl-util-addr
>>
>>   genl_ctrl_list_SOURCES = genl-ctrl-list.c
>> -genl_ctrl_list_LDADD = -lnl-genl -lnl-route
>> +genl_ctrl_list_LDADD = -lnl-genl -lnl-route -lnl -lnl-nf
>
> This does not make sense. nl-cli should link to the libraries
> instead.
>
> What kind of error do you get that you think this patch is required?

This is  cross compilation done on latest git w/
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2010q1-202) 4.4.1

Follows the error:

make[2]: Entering directory `/home/gxk/blds/libnl/src'
depbase=`echo genl-ctrl-list.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
          arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../lib  -Wall
-I../include -I../include -D_GNU_SOURCE   -g -O2 -MT genl-ctrl-list.o -MD -MP
-MF $depbase.Tpo -c -o genl-ctrl-list.o genl-ctrl-list.c &&\
          mv -f $depbase.Tpo $depbase.Po
/bin/sh ../libtool --tag=CC   --mode=link arm-none-linux-gnueabi-gcc  -g -O2
-L../lib -L../src/lib -lnl-cli  -o genl-ctrl-list genl-ctrl-list.o -lnl-genl
-lnl-route -lm
libtool: link: arm-none-linux-gnueabi-gcc -g -O2 -o .libs/genl-ctrl-list
genl-ctrl-list.o  -L/home/gxk/blds/libnl/lib -L/home/gxk/blds/libnl/src/lib
/home/gxk/blds/libnl/src/lib/.libs/libnl-cli.so
/home/gxk/blds/libnl/lib/.libs/libnl-genl.so
/home/gxk/blds/libnl/lib/.libs/libnl-route.so -lm
/opt/CodeSourcery/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: 

warning: libnl.so.3, needed by /home/gxk/blds/libnl/src/lib/.libs/libnl-cli.so,
not found (try using -rpath or -rpath-link)
/opt/CodeSourcery/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: 

warning: libnl-nf.so.3, needed by
/home/gxk/blds/libnl/src/lib/.libs/libnl-cli.so, not found (try using -rpath or
-rpath-link)
genl-ctrl-list.o: In function `main':
/home/gxk/blds/libnl/src/genl-ctrl-list.c:66: undefined reference to `nl_cache_dump'
/home/gxk/blds/libnl/lib/.libs/libnl-route.so: undefined reference to
`nl_data_clone'




More information about the libnl mailing list