<div class="gmail_quote">On Tue, Mar 31, 2009 at 10:11 PM, Alexander Neundorf <span dir="ltr"><<a href="mailto:a.neundorf-work@gmx.net">a.neundorf-work@gmx.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Tuesday 31 March 2009, Adolfo Rodríguez wrote:<br>
> 2009/3/30 Alexander Neundorf <<a href="mailto:a.neundorf-work@gmx.net">a.neundorf-work@gmx.net</a>><br>
><br>
</div>...<br>
<div class="im">> [1] In case you think it helps, these are my rpath settings:<br>
><br>
> # Use, i.e. don't skip the full RPATH for the build tree<br>
> set(CMAKE_SKIP_BUILD_RPATH FALSE)<br>
><br>
> # When building, don't use the install RPATH already<br>
> # (but later on when installing)<br>
> set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)<br>
<br>
<br>
> # The RPATH to be used when installing<br>
> set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")<br>
><br>
> # Add the automatically determined parts of the RPATH<br>
> # which point to directories outside the build tree to the install RPATH<br>
> set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)<br>
<br>
</div>I'm not sure these two settings are good for cross compiling.<br>
At least when I did cross compiling for really different targets, I usually<br>
installed the executables e.g. to ~/arm/inst/, but on the target platform<br>
this would be a different location, e.g. /opt or /usr/local (which could be<br>
NFS-mounted just from the local directory).<br>
So while the files where installed, but on the host system the RPATH<br>
was "wrong", but once they were moved to their final location the RPATH was<br>
then the correct one.<br>
This is also the case for you with the libc here. The executable doesn't have<br>
the RPATH set for the libc, so while it is on the build host system, ldd will<br>
show you the build host libc. Once you move it to the target system, ldd will<br>
automatically find the system libc there.<br>
<br>
If this is not what you want, I would suggest to<br>
1) not use CMAKE_INSTALL_RPATH_USE_LINK_PATH when cross compiling<br>
2) set CMAKE_INSTALL_RPATH explicitely to the directories you want on the<br>
target platform<br>
</blockquote><div><br>What you're saying really makes sense. I'll give it a try. Thanks again for all your help.<br><br>Adolfo<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Alex<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Adolfo Rodríguez Tsouroukdissian<br><br>Robotics engineer<br>PAL ROBOTICS S.L<br><a href="http://www.pal-robotics.com">http://www.pal-robotics.com</a><br>Tel. +34.93.414.53.47<br>
Fax.+34.93.209.11.09<br>