I am building an android shared library, and the problem is that android does not seem to support shared library versioning. The .so libs on an android phone do not seem to contain their version number in their name.
When I am doing my build ( ndk r6 with my own toolchain ), the .so I am creating seems to be adding dependencies to other .so libs with their version number on the end.
My question is can I build my .so with it's dependancies not listing their version number.
I may be able to explain better by showing what I think I expect to see. At the moment my dll is not loading and when I do a readelf I see this:
$ arm-linux-androideabi-readelf.exe -d libthis.so
Dynamic section at offset 0x188fc contains 30 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [lib1.so.3]
0x00000001 (NEEDED) Shared library: [lib2.so.3]
0x00000001 (NEEDED) Shared library: [lib3.so.3]
0x00000001 (NEEDED) Shared library: [lib4.so.3]
0x00000001 (NEEDED) Shared library: [lib5.so.3]
0x00000001 (NEEDED) Shared library: [lib6.so.3]
0x00000001 (NEEDED) Shared library: [liblog.so]
0x0000000e (SONAME) Library soname: [libthis.so.3]
0x00000010 (SYMBOLIC) 0x0
When I would expect to see this
$ arm-linux-androideabi-readelf.exe -d libthis.so
Dynamic section at offset 0x188fc contains 30 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [lib1.so]
0x00000001 (NEEDED) Shared library: [lib2.so]
0x00000001 (NEEDED) Shared library: [lib3.so]
0x00000001 (NEEDED) Shared library: [lib4.so]
0x00000001 (NEEDED) Shared library: [lib5.so]
0x00000001 (NEEDED) Shared library: [lib6.so]
0x00000001 (NEEDED) Shared library: [liblog.so]
0x0000000e (SONAME) Library soname: [libthis.so]
0x00000010 (SYMBOLIC) 0x0
In case anyone drops by here, it seems I needed to manually alter the configure file so that the variable soname_spec does not reference any version information.
There's probably a better way of doing it but this works.
User contributions licensed under CC BY-SA 3.0