Skip to contentSkip to conversation

libpjsip: depend on libsrtp

PATCH New Luca Ceresoli 2 participants 2 messages Mar 8, 2016 – Mar 9, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 libpjsip: depend on libsrtp

libpjsip needs libsrtp to build, but it bundles a libsrtp version in case one is not found during the configure step. The Buildroot policy in such cases is to force using the external package, so forcibly depend on libsrtp.

Adding --with-external-srtp also fixes libpjsip not correctly the libsrtp installed in staging, which shows up with the 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 many other similar autobuild failures.

Cc Thomas Petazzoni <[email protected]>
---
 package/libpjsip/Config.in   | 1 +
 package/libpjsip/libpjsip.mk | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
package/libpjsip/Config.in +1 -0
index 980fada3d5fb..727d2ec3d06c 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_LIBPJSIP
 	bool "libpjsip"
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_LIBSRTP
 	help
 	  PJSIP is a free and open source multimedia communication
 	  library written in C language implementing standard based
package/libpjsip/libpjsip.mk +3 -1
index ee250f5b11ef..49abd744e59d 100644
@@ -7,6 +7,7 @@
 LIBPJSIP_VERSION = 2.4.5
 LIBPJSIP_SOURCE = pjproject-$(LIBPJSIP_VERSION).tar.bz2
 LIBPJSIP_SITE = http://www.pjsip.org/release/$(LIBPJSIP_VERSION)
+LIBPJSIP_DEPENDENCIES = libsrtp
 LIBPJSIP_LICENSE = GPLv2+
 LIBPJSIP_LICENSE_FILES = COPYING
 LIBPJSIP_INSTALL_STAGING = YES
@@ -22,7 +23,8 @@ LIBPJSIP_CONF_OPTS = \
 	--disable-speex-aec \
 	--disable-resample \
 	--disable-video \
-	--disable-opencore-amr
+	--disable-opencore-amr \
+	--with-external-srtp=$(STAGING_DIR)/usr
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 LIBPJSIP_DEPENDENCIES += openssl
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/1 libpjsip: depend on libsrtp

Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Luca" == Luca Ceresoli <[email protected]> writes:

libpjsip needs libsrtp to build, but it bundles a libsrtp version in case one is not found during the configure step. The Buildroot policy in such cases is to force using the external package, so forcibly depend on libsrtp.

Adding --with-external-srtp also fixes libpjsip not correctly the libsrtp installed in staging, which shows up with the symptom:

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

Quoted 7 lines

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

Cc Thomas Petazzoni <[email protected]>

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard