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

Simon Lees simon.lees at codan.com.au
Tue Jul 9 06:57:26 CEST 2013

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,



More information about the Development mailing list