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

Simon Lees simon.lees at codan.com.au
Tue Jul 9 08:36:13 CEST 2013


On 07/09/2013 03:03 PM, Charles Yin wrote:
>
> 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.
>
>
I just tried set (CMAKE_SKIP_RPATH TRUE) again, it has no effect.
>
>
> 2013/7/9 Simon Lees <simon.lees at codan.com.au 
> <mailto: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 <mailto: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/63c5b436/attachment.html>


More information about the Development mailing list