This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Issue about 'skipping incompatible lib' in Arm app linker

Hi, I'm building a remote application for the ARM. Seems that the build needs information from the linked library on the remote server (imglib2_elf.lib). The application finds the library (I checked the path myself) but skip it due to incompatibility. 

# lnkv5T bin/ti_platforms_evmTI816X/app_remote.xv5T ...
rm -f package/cfg/bin/ti_platforms_evmTI816X/app_remote.xv5T.map
/opt/codesourcery/arm-2009q1//bin/arm-none-linux-gnueabi-gcc -g -o bin/ti_platforms_evmTI816X/app_remote.xv5T package/cfg/bin/ti_platforms_evmTI816X/app_remote_pv5T.ov5T package/cfg/bin/ti_platforms_evmTI816X/app_remote/app.ov5T package/cfg/bin/ti_platforms_evmTI816X/app_remote/main_native.ov5T -Wl,-T,package/cfg/bin/ti_platforms_evmTI816X/app_remote_pv5T.xdl -Wl,-Map=package/cfg//bin/ti_platforms_evmTI816X/app_remote.xv5T.map -L/opt/codesourcery/arm-2009q1/arm-none-linux-gnueabi/lib -lpthread -lrt -ldl
/opt/codesourcery/arm-2009q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /home/jlopez/devdirs/DM8168-EVM-march19_2013/rpeFramework_0_00/rpeRepo/libraries/rr/imglib2_elf/lib_img/imglib2_elf.lib when searching for /home/jlopez/devdirs/DM8168-EVM-march19_2013/rpeFramework_0_00/rpeRepo/libraries/rr/imglib2_elf/lib_img/imglib2_elf.lib
/opt/codesourcery/arm-2009q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: cannot find /home/jlopez/devdirs/DM8168-EVM-march19_2013/rpeFramework_0_00/rpeRepo/libraries/rr/imglib2_elf/lib_img/imglib2_elf.lib
collect2: ld returned 1 exit status


I found out that this error comes when a 64 based system (Ubuntu 12 64-bit) builds with a 32 built library (imglib). So In the config.bld file i set for the linkOpts:

"gnu.targets.arm.GCArmv5T"        : "-m32 -L/usr/lib32 -lpthread -lrt -ldl ",.


Running make:

# lnkv5T bin/ti_platforms_evmTI816X/app_remote.xv5T ...
rm -f package/cfg/bin/ti_platforms_evmTI816X/app_remote.xv5T.map
/opt/codesourcery/arm-2009q1//bin/arm-none-linux-gnueabi-gcc -g -o bin/ti_platforms_evmTI816X/app_remote.xv5T package/cfg/bin/ti_platforms_evmTI816X/app_remote_pv5T.ov5T package/cfg/bin/ti_platforms_evmTI816X/app_remote/app.ov5T package/cfg/bin/ti_platforms_evmTI816X/app_remote/main_native.ov5T -Wl,-T,package/cfg/bin/ti_platforms_evmTI816X/app_remote_pv5T.xdl -Wl,-Map=package/cfg//bin/ti_platforms_evmTI816X/app_remote.xv5T.map -L/opt/codesourcery/arm-2009q1/arm-none-linux-gnueabi/lib -m32 -L/usr/lib32 -lpthread -lrt -ldl
/opt/codesourcery/arm-2009q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: library search path "/usr/lib32" is unsafe for cross-compilation
/opt/codesourcery/arm-2009q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /home/jlopez/devdirs/DM8168-EVM-march19_2013/rpeFramework_0_00/rpeRepo/libraries/rr/imglib2_elf/lib_img/imglib2_elf.lib when searching for /home/jlopez/devdirs/DM8168-EVM-march19_2013/rpeFramework_0_00/rpeRepo/libraries/rr/imglib2_elf/lib_img/imglib2_elf.lib
/opt/codesourcery/arm-2009q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: cannot find /home/jlopez/devdirs/DM8168-EVM-march19_2013/rpeFramework_0_00/rpeRepo/libraries/rr/imglib2_elf/lib_img/imglib2_elf.lib
collect2: ld returned 1 exit status

Again complains as if -m32 option wasnt taken into the build.  Comes into my mind that xdctools access only /usr/lib/ by default and haven't figured out where i can omit this access, like some override. Is their a workaround for this? My software: ezsdk-5_05_01_04. Thanks, 

- Jose L