This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: undefined symbol : pow arm gcc compiler


Andrew

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.

Abdul

On Tue, Sep 4, 2012 at 12:00 PM, Andrew Haley <aph@redhat.com> wrote:
> On 09/04/2012 11:51 AM, Abdul Wahid Memon wrote:
>> Yes, its included. I can successfully use this plugin with native GCC
>> but the problem occurs only with cross compiler.
>>
>> I have checked the search directories for cross compiler and libm.so
>> can easily be found by the cross compiler, but I don't understand why
>> it is complaining.
>
> Try LD_DEBUG=all arm-none-linux-gnueabi-gcc -fplugin=./plugin.so hello.c ...
>
> That will tell you which libraries are being searched.
>
> Also ldd arm-none-linux-gnueabi-gcc, ldd plugin.so, etc.
>
> Andrew.
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]