[Replicant] Build libsamsung-ipc for android using NDK

Vahid Moslemi vahidhwp at gmail.com
Sun Dec 8 09:25:48 UTC 2019


Dear Denis,
Thanks for your help.
I finally build the library using the attached script (this is a modified
version of autogen.sh script).
I used NDK-version-10 instead of 20 and the shared lib (.so) was built
successfully.
I have  attached the script so that it could help other developers in the
future.
Best regards
Vahid Moslemi

On Sun, Dec 8, 2019 at 3:38 AM Denis 'GNUtoo' Carikli <
GNUtoo at cyberdimension.org> wrote:

> On Sat, 30 Nov 2019 10:14:40 +0330
> Vahid Moslemi <vahidhwp at gmail.com> wrote:
> > and about the Android.mk file: When I tried to use ndk-build with
> > Android.mk. I faced the error:
> >
> > Android NDK: Trying to define local module 'samsung-ipc' in
> > /external_libsamsung-ipc/app/jni/Android.mk.
> > Android NDK: But this module was already defined by
> > /external_libsamsung-ipc/app/jni/Android.mk.
> > NKD_PATH/build/core/build-module.mk:34: *** Android NDK: Aborting.
> > . Stop.
> > Android NDK: Trying to define local module 'samsung-ipc' in
> > /external_libsamsung-ipc/app/jni/Android.mk.
> > Android NDK: But this module was already defined by
> > /external_libsamsung-ipc/app/jni/Android.mk.
> > NKD_PATH/build/core/build-module.mk:34: *** Android NDK: Aborting.
> > . Stop.
> That looks easier to fix.
>
> In Android.mk we have the following being defined twice:
> > LOCAL_MODULE := libsamsung-ipc
>
> This is why it complains.
>
> I defined it twice to build both a static library and a dynamic library.
>
> A way to fix it would be to make sure that it works fine as a dynamic
> library with all the Replicant versions that use samsung-ipc master or
> something based on it.
>
> In the meantime you could remove (inside that Android.mk) either the
> "Shared library version of libsamsung-ipc" or the "Static library
> version of libsamsung-ipc" section and look if it works.
>
> Denis.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/replicant/attachments/20191208/78382ced/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ndk10_autogen.sh
Type: application/x-shellscript
Size: 780 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/replicant/attachments/20191208/78382ced/attachment.bin>


More information about the Replicant mailing list