Does /home/mgh/proj/test/lib/libfoo.so not have a SONAME while your native libfoo.so does?

The linker may use the SONAME when available and might fall back to the path as seen on the command line (/home/mgh/proj/test/lib/libfoo.so) otherwise?

Nils

On 07/19/2013 10:41 AM, Дмитрий Дороговцев wrote:
Hello.
I have a strange issue when cross compiling with CMake.
When i compile for host, in the resulting binary i have:

readelf -d ./test
...
0x00000001 (NEEDED)          Shared library: [libfoo.so]
0x0000000f (RPATH)              Library rpath: [$ORIGIN/../../lib/]
...

When i use CMake toolchain file (cmake -DCMAKE_TOOLCHAIN_FILE=arm_
test.cmake .) i have:
readelf -d ./test
...
0x00000001 (NEEDED) Shared library: [/home/mgh/proj/test/lib/libfoo.so]
0x0000000f (RPATH)              Library rpath: [$ORIGIN/../../lib/]
...

My toolchain file is very simple:

set( CMAKE_SYSTEM_NAME armLinux )

set( CMAKE_C_COMPILER arm-linux-gnueabi-gcc )
set( CMAKE_CXX_COMPILER arm-linux-gnueabi-g++ )
set( CMAKE_FIND_ROOT_PATH /home/mgh/toolchains/arm-linux-gnueabi/bin )

So my question is why path to libfoo.so has been changed in executable after
cross compiling? Thank you.


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to