Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] libpjsip: needs threads
@ 2016-03-07 21:56 Luca Ceresoli
  2016-03-07 21:56 ` [Buildroot] [PATCH 2/2] libpjsip: fix optional dependency on libsrtp Luca Ceresoli
  2016-03-08 20:14 ` [Buildroot] [PATCH 1/2] libpjsip: needs threads Thomas Petazzoni
  0 siblings, 2 replies; 5+ messages in thread
From: Luca Ceresoli @ 2016-03-07 21:56 UTC (permalink / raw)
  To: buildroot

Builds without thread support fail with the following error:

  ../src/pj/os_core_unix.c:45:21: fatal error: pthread.h: No such file or directory
   #include <pthread.h>
                       ^
  compilation terminated.

Fixes:
  http://autobuild.buildroot.org/results/744/744431e1b47d22222c4d0b48d5d20649dfeed929/
  http://autobuild.buildroot.org/results/a10/a10aca9139054502e055cb61f3925637fc515e12/

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

diff --git a/package/libpjsip/Config.in b/package/libpjsip/Config.in
index 45387c4b39b9..980fada3d5fb 100644
--- a/package/libpjsip/Config.in
+++ b/package/libpjsip/Config.in
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_LIBPJSIP
 	bool "libpjsip"
 	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS
 	help
 	  PJSIP is a free and open source multimedia communication
 	  library written in C language implementing standard based
@@ -8,5 +9,5 @@ config BR2_PACKAGE_LIBPJSIP
 
 	  http://www.pjsip.org
 
-comment "libpjsip needs a toolchain w/ C++"
-	depends on !BR2_INSTALL_LIBSTDCPP
+comment "libpjsip needs a toolchain w/ C++, threads"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 2/2] libpjsip: fix optional dependency on libsrtp
  2016-03-07 21:56 [Buildroot] [PATCH 1/2] libpjsip: needs threads Luca Ceresoli
@ 2016-03-07 21:56 ` Luca Ceresoli
  2016-03-08 20:15   ` Thomas Petazzoni
  2016-03-08 20:14 ` [Buildroot] [PATCH 1/2] libpjsip: needs threads Thomas Petazzoni
  1 sibling, 1 reply; 5+ messages in thread
From: Luca Ceresoli @ 2016-03-07 21:56 UTC (permalink / raw)
  To: buildroot

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(+)

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
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/2] libpjsip: needs threads
  2016-03-07 21:56 [Buildroot] [PATCH 1/2] libpjsip: needs threads Luca Ceresoli
  2016-03-07 21:56 ` [Buildroot] [PATCH 2/2] libpjsip: fix optional dependency on libsrtp Luca Ceresoli
@ 2016-03-08 20:14 ` Thomas Petazzoni
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2016-03-08 20:14 UTC (permalink / raw)
  To: buildroot

Dear Luca Ceresoli,

On Mon,  7 Mar 2016 22:56:44 +0100, Luca Ceresoli wrote:
> Builds without thread support fail with the following error:
> 
>   ../src/pj/os_core_unix.c:45:21: fatal error: pthread.h: No such file or directory
>    #include <pthread.h>
>                        ^
>   compilation terminated.
> 
> Fixes:
>   http://autobuild.buildroot.org/results/744/744431e1b47d22222c4d0b48d5d20649dfeed929/
>   http://autobuild.buildroot.org/results/a10/a10aca9139054502e055cb61f3925637fc515e12/
> 
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> ---
>  package/libpjsip/Config.in | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 2/2] libpjsip: fix optional dependency on libsrtp
  2016-03-07 21:56 ` [Buildroot] [PATCH 2/2] libpjsip: fix optional dependency on libsrtp Luca Ceresoli
@ 2016-03-08 20:15   ` Thomas Petazzoni
  2016-03-08 23:01     ` Luca Ceresoli
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2016-03-08 20:15 UTC (permalink / raw)
  To: buildroot

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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 2/2] libpjsip: fix optional dependency on libsrtp
  2016-03-08 20:15   ` Thomas Petazzoni
@ 2016-03-08 23:01     ` Luca Ceresoli
  0 siblings, 0 replies; 5+ messages in thread
From: Luca Ceresoli @ 2016-03-08 23:01 UTC (permalink / raw)
  To: buildroot

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.

-- 
Luca

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-08 23:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-07 21:56 [Buildroot] [PATCH 1/2] libpjsip: needs threads Luca Ceresoli
2016-03-07 21:56 ` [Buildroot] [PATCH 2/2] libpjsip: fix optional dependency on libsrtp Luca Ceresoli
2016-03-08 20:15   ` Thomas Petazzoni
2016-03-08 23:01     ` Luca Ceresoli
2016-03-08 20:14 ` [Buildroot] [PATCH 1/2] libpjsip: needs threads Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox