[Development] Android missing SONAME in lib's causes issues with cmake

Charles Yin charles at mazymind.com
Tue Jul 9 07:33:58 CEST 2013


CMake automatically adds rpaths to all targets, which you are linking with
target_link_libraries().

To switch it off there is CMAKE_SKIP_RPATH option.

See http://www.cmake.org/Wiki/CMake_RPATH_handling for more details.




2013/7/9 Simon Lees <simon.lees at codan.com.au>

> Hi All,
> I have been trying to build our Medium to Large project using cmake for
> android as we already use cmake. I have hit a issue in that rather
> specifying NEEDED in the library i build as a relative path it specifies
> it as a full path.
> objdump -x libMyLib.so | grep "NEEDED"  returns
>      NEEDED    /opt/Qt5.1.0/5.1.0/lib/libQt5Widgets.so.5.1.0
>      NEEDED    /opt/Qt5.1.0/5.1.0/lib/llibQt5Gui.so.5.1.0
>      NEEDED    /opt/Qt5.1.0/5.1.0/lib/llibQt5Core.so.5.1.0
>      NEEDED    libm.so
>      NEEDED    libc.so
>      NEEDED    libdl.so
>
> instead of
>      NEEDED    libQt5Widgets.so
>      NEEDED    llibQt5Gui.so
>      NEEDED    llibQt5Core
>      NEEDED    libm.so
>      NEEDED    libc.so
>      NEEDED    libdl.so
>
>
> I asked about this on #cmake and someone said the most probable reason
> was that the Qt libraries don't contain SONAME. objdump -x
> libQt5Widgets.so | grep "SONAME" returns nothing.
>
> My first question is how do i build the android libraries with a SONAME
> so that i can check if that fixes it, secondly if there is a good reason
> not to have SONAME in libraries on android, how can the cmake files
> shipped with Qt work correctly for android? I have not had huge amounts
> of experience with qmake and cmake but i have tried fixing this issue
> for a couple of days.
>
> If anyone can point me in the right direction it would be much appreciated,
>
> Cheers
>
> Simon
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>



-- 
--
Yunqiao (Charles) Yin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130709/ebb88028/attachment.html>


More information about the Development mailing list