2010-11-30 18:42:03

by Heyendal, Carl

[permalink] [raw]
Subject: build error with iw-0.9.21


I'm getting a linker error when I compile the latest 'iw-0.9.21' package with 'libnl-2.0'.

Note: I'm cross compiling for an ARM platform using CodeSourcery tools.

Any help appreciated.

thanx
/carl

---------------------------------------------------------------------------------------------
heyendal@ubuntu1-carlh:~/projects/AM1808/wireless/iw-0.9.21$ make CC=arm-none-linux-gnueabi-gcc
CC iw.o
CC genl.o
CC event.o
CC info.o
CC phy.o
CC interface.o
CC ibss.o
CC station.o
CC survey.o
CC util.o
CC mesh.o
CC mpath.o
CC scan.o
CC reg.o
GEN version.c
CC version.o
CC reason.o
CC status.o
CC connect.o
CC link.o
CC offch.o
CC ps.o
CC cqm.o
CC bitrate.o
CC sections.o
CC iw
/home/heyendal/projects/AM1808/platform/sdk_1_10_00_00/fs/sd_fs_working/lib/libnl.a(utils.o): In function `nl_prob2int':
/home/heyendal/projects/AM1808/wireless/libnl-2.0/lib/utils.c:257: undefined reference to `lrint'
collect2: ld returned 1 exit status
make: *** [iw] Error 1


2010-11-30 18:44:44

by Johannes Berg

[permalink] [raw]
Subject: Re: build error with iw-0.9.21

On Tue, 2010-11-30 at 13:26 -0500, Heyendal, Carl wrote:

> Note: I'm cross compiling for an ARM platform using CodeSourcery tools.

> CC iw
> /home/heyendal/projects/AM1808/platform/sdk_1_10_00_00/fs/sd_fs_working/lib/libnl.a(utils.o): In function `nl_prob2int':
> /home/heyendal/projects/AM1808/wireless/libnl-2.0/lib/utils.c:257: undefined reference to `lrint'
> collect2: ld returned 1 exit status
> make: *** [iw] Error 1

Well, looks like you should be linking against libm, but that wasn't
usually necessary to explicitly specify.

johannes