cURL / Mailing Lists / curl-library / Single Mail

curl-library

libcurl on Android colliding with other openssl in the same .so

From: JOHAN LANTZ <johan.lantz_at_telefonica.com>
Date: Mon, 14 Mar 2016 18:55:47 +0000

Hi everyone

I am trying to add curl to an existing Android project that is also using pjsip.

I had no issues precompiling libcurl.a but when adding it to my existing Android.mk I get a bunch of multiple definition errors like this one:
armeabi/libcurl.a(cryptlib.o): multiple definition of 'CRYPTO_get_new_lockid'

I assume this is because pjsip is also relying on openssl.

If I compile libcurl using -without-ssl it links fine into my existing .so.

(I also started to try and make an Android.mk for libcurl to see if I could include it in my existing build process but I got stuck right away.)

The other option I am considering is to wrap the libcurl.a into its own .so and then use if from my existing dynamic library. I guess that could work but it also means I am going to distribute two complete versions of openssl with my app.

Does anyone have any recommendation on how to solve this in a good way? Somehow it feels like both pjsip and libcurl should be able to share the openssl code. I guess the problem might come from them both being prebuilt and then introduced into the same .so in the end.

All suggestions are highly appreciated.

Johan

________________________________

Este mensaje y sus adjuntos se dirigen exclusivamente a su destinatario, puede contener información privilegiada o confidencial y es para uso exclusivo de la persona o entidad de destino. Si no es usted. el destinatario indicado, queda notificado de que la lectura, utilización, divulgación y/o copia sin autorización puede estar prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción.

The information contained in this transmission is privileged and confidential information intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this transmission in error, do not read it. Please immediately reply to the sender that you have received this communication in error and then delete it.

Esta mensagem e seus anexos se dirigem exclusivamente ao seu destinatário, pode conter informação privilegiada ou confidencial e é para uso exclusivo da pessoa ou entidade de destino. Se não é vossa senhoria o destinatário indicado, fica notificado de que a leitura, utilização, divulgação e/ou cópia sem autorização pode estar proibida em virtude da legislação vigente. Se recebeu esta mensagem por erro, rogamos-lhe que nos o comunique imediatamente por esta mesma via e proceda a sua destruição

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-03-14