diff mbox

[2/2] libpjsip: fix optional dependency on libsrtp

Message ID 1457387805-4084-2-git-send-email-luca@lucaceresoli.net
State Changes Requested
Headers show

Commit Message

Luca Ceresoli March 7, 2016, 9:56 p.m. UTC
libpjsip does not correctly detect whether libsrtp is installed in staging.

Symptom:
  .../libpjmedia.so: undefined reference to `srtp_deinit'
  collect2: error: ld returned 1 exit status

Fixes:
  http://autobuild.buildroot.org/results/305/305fdc8442cd2e8f51b90485be0dca83ffa36603/
  http://autobuild.buildroot.org/results/a2f/a2f407c1361ac5c24af122445e84645e9aee309d/
  ...and other similar failures.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 package/libpjsip/libpjsip.mk | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Thomas Petazzoni March 8, 2016, 8:15 p.m. UTC | #1
Dear Luca Ceresoli,

On Mon,  7 Mar 2016 22:56:45 +0100, Luca Ceresoli wrote:

> +ifeq ($(BR2_PACKAGE_LIBSRTP),y)
> +LIBPJSIP_DEPENDENCIES += libsrtp
> +LIBPJSIP_CONF_OPTS += --with-external-srtp=$(STAGING_DIR)/usr
> +endif

The --with-external-srtp seems to imply that there is also an
"internal/bundled" srtp.

If pjsip indeed needs srtp unconditionally, then we should always
depend on it and use the external libsrtp rather than the bundled one.

Can you confirm how libsrtp is used by pjsip?

Thanks,

Thomas
Luca Ceresoli March 8, 2016, 11:01 p.m. UTC | #2
On 08/03/2016 21:15, Thomas Petazzoni wrote:
> Dear Luca Ceresoli,
> 
> On Mon,  7 Mar 2016 22:56:45 +0100, Luca Ceresoli wrote:
> 
>> +ifeq ($(BR2_PACKAGE_LIBSRTP),y)
>> +LIBPJSIP_DEPENDENCIES += libsrtp
>> +LIBPJSIP_CONF_OPTS += --with-external-srtp=$(STAGING_DIR)/usr
>> +endif
> 
> The --with-external-srtp seems to imply that there is also an
> "internal/bundled" srtp.
> 
> If pjsip indeed needs srtp unconditionally, then we should always
> depend on it and use the external libsrtp rather than the bundled one.

Uh, indeed libpjsip always links libsrtp, and ships the internal copy in
case the no external one is found.

Updated patch incoming.
diff mbox

Patch

diff --git a/package/libpjsip/libpjsip.mk b/package/libpjsip/libpjsip.mk
index ee250f5b11ef..9316dd7998e6 100644
--- a/package/libpjsip/libpjsip.mk
+++ b/package/libpjsip/libpjsip.mk
@@ -31,6 +31,11 @@  else
 LIBPJSIP_CONF_OPTS += --disable-ssl
 endif
 
+ifeq ($(BR2_PACKAGE_LIBSRTP),y)
+LIBPJSIP_DEPENDENCIES += libsrtp
+LIBPJSIP_CONF_OPTS += --with-external-srtp=$(STAGING_DIR)/usr
+endif
+
 ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
 LIBPJSIP_DEPENDENCIES += util-linux
 endif