<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Does /home/mgh/proj/test/lib/libfoo.so
      not have a SONAME while your native libfoo.so does?<br>
      <br>
      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?<br>
      <br>
      Nils<br>
      <br>
      On 07/19/2013 10:41 AM, Дмитрий Дороговцев wrote:<br>
    </div>
    <blockquote
cite="mid:CANowdiwM0X+YoSy6Jvp65NB9K6xu7qHswqyXs6Xvpvavw0mcAg@mail.gmail.com"
      type="cite">Hello.<br>
      I have a strange issue when cross compiling with CMake.<br>
      When i compile for host, in the resulting binary i have:<br>
      <br>
      readelf -d ./test<br>
      ...<br>
      0x00000001 (NEEDED)          Shared library: [libfoo.so]<br>
      0x0000000f (RPATH)              Library rpath:
      [$ORIGIN/../../lib/]<br>
      ...<br>
      <br>
      When i use CMake toolchain file (cmake -DCMAKE_TOOLCHAIN_FILE=arm_
      <div>test.cmake .) i have:<br>
        readelf -d ./test<br>
        ...<br>
        0x00000001 (NEEDED)          Shared library:
        [/home/mgh/proj/test/lib/libfoo.so]<br>
        0x0000000f (RPATH)              Library rpath:
        [$ORIGIN/../../lib/]<br>
        ...<br>
        <br>
        My toolchain file is very simple:<br>
        <br>
        set( CMAKE_SYSTEM_NAME armLinux )<br>
        <br>
        set( CMAKE_C_COMPILER arm-linux-gnueabi-gcc )<br>
        set( CMAKE_CXX_COMPILER arm-linux-gnueabi-g++ )<br>
        set( CMAKE_FIND_ROOT_PATH
        /home/mgh/toolchains/arm-linux-gnueabi/bin )<br>
        <br>
        So my question is why path to libfoo.so has been changed in
        executable after<br>
        cross compiling? Thank you.</div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">--

Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>

Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>

Please keep messages on-topic and check the CMake FAQ at: <a class="moz-txt-link-freetext" href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a>

Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a></pre>
    </blockquote>
    <br>
  </body>
</html>