Re: undefined symbol : pow arm gcc compiler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/04/2012 01:33 PM, Abdul Wahid Memon wrote:

> I did the compilation with LD_DEBUG=symbols and got the following
> output. I don't understand that why it is not looking for math
> library.
> 
> $ LD_DEBUG=symbols arm-none-linux-gnueabi-gcc
> -fplugin=/home/abdul/plugin_v4.so hello.c -lm
> -L/home/abdul/cross-tools/rootfs/arm-none-linux-gnueabi/libc/usr/lib/
> 
> symbol=pow;  lookup in
> file=/home/abdul/cross-tools/rootfs/bin/../libexec/gcc/arm-none-linux-gnueabi/4.6.2/cc1
> [0]
>      30679:	symbol=pow;  lookup in
> file=/home/abdul/cross-tools/rootfs/lib/libmpc.so.2 [0]
>      30679:	symbol=pow;  lookup in
> file=/home/abdul/cross-tools/rootfs/lib/libmpfr.so.1 [0]
>      30679:	symbol=pow;  lookup in
> file=/home/abdul/cross-tools/rootfs/lib/libgmp.so.3 [0]
>      30679:	symbol=pow;  lookup in file=/usr/lib/libdl.so.2 [0]
>      30679:	symbol=pow;  lookup in file=/usr/lib/libc.so.6 [0]
>      30679:	symbol=pow;  lookup in file=/lib64/ld-linux-x86-64.so.2 [0]
>      30679:	symbol=pow;  lookup in file=/home/abdul/plugin_v4.so [0]
>      30679:	symbol=pow;  lookup in file=/usr/lib/libc.so.6 [0]
>      30679:	symbol=pow;  lookup in file=/lib64/ld-linux-x86-64.so.2 [0]
>      30679:	/home/abdul/plugin_v4.so: error: symbol lookup error:
> undefined symbol: pow (fatal)
> 
> And for the plugin I got
> 
> 	linux-vdso.so.1 (0x00007fffb3ba2000)
> 	libc.so.6 => /usr/lib/libc.so.6 (0x00007f8e03274000)
> 	/usr/lib/ld-linux-x86-64.so.2 (0x00007f8e03843000)
> 
> Any further suggestions.

I don't really understand what difficult you are having.  Clearly
something need to be linked with -lm.  It's whatever object uses
pow().  I don't know which object that is, because you haven't told
me.  It may be your plugin, in which case your plugin needs to be
linked with -lm.  This is just normal C programming, nothing to do
with GCC.

Andrew.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux