Mailinglist Archive: opensuse-packaging (206 mails)

< Previous Next >
[opensuse-packaging] Help with stupid link error
Hi,

Working on packaging OpenStack as part of my Hackweek 6 endeavor. Nova
(one part of OpenStack) needs a newer version of redis than is available
in OBS, thus I am sticking a copy into Virtualization:Cloud:OpenStack
for now.

I have run into a stupid link error that makes no sense to me, thus help
is much appreciated.

/usr/src/packages/BUILD/redis-2.0.4/redis.c:9293: undefined reference to
 `log'

The math library is on the link line:

cc -o redis-server -std=c99 -pedantic -O2 -Wall -W   
-fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 
-fstack-protector -funwind-tables -fasynchronous-unwind-tables -lm 
-pthread  -fomit-frame-pointer -fmessage-length=0 -O2 -Wall 
-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables 
-fasynchronous-unwind-tables -g -rdynamic -ggdb  adlist.o ae.o anet.o 
dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o


This happens when building locally and in the build service. A log file
can be found here:

https://build.opensuse.org/package/live_build_log?arch=i586&package=redis&project=Virtualization%3ACloud%3AOpenStack&repository=openSUSE_11.3

The offending source line is:

return (double)age*log(1+asize);

don't see anything wrong wit that. This produces

-> nm -Bg /var/tmp/build-root/usr/src/packages/BUILD/redis-2.0.4/redis.o
| grep log
U log

in the object file and of course:

-> nm -Bg /var/tmp/build-root//lib64/libm.so.6 | grep log
000000000001a520 T __clog10
0000000000027ca0 T __clog10f
0000000000030410 T __clog10l
0000000000019020 W clog
000000000001a520 W clog10
0000000000027ca0 W clog10f
0000000000030410 W clog10l
00000000000263c0 W clogf
000000000002eb50 W clogl
0000000000010670 W ilogb
000000000001fb20 W ilogbf
000000000002c140 W ilogbl
0000000000014230 W log
00000000000146c0 W log10
0000000000022fb0 W log10f
000000000002d5e0 W log10l
0000000000010720 W log1p
000000000001fb90 W log1pf
000000000002c170 W log1pl
000000000001aaa0 W log2
0000000000028100 W log2f
00000000000307b0 W log2l
0000000000010ad0 W logb
000000000001feb0 W logbf
000000000002c1b0 W logbl
0000000000022bf0 W logf
000000000002d530 W logl

shows that log is defined in the math library. As a weak symbol, but
never the less that should be good enough at link time.

Help is much appreciated.
Thanks,
Robert

--
Robert Schweikert MAY THE SOURCE BE WITH YOU
Software Engineer Consultant LINUX
rschweikert@xxxxxxxxxx
781-464-8147

Novell
Making IT Work As One
--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx

< Previous Next >