apr: add apr_cv_mutex_recursive=yes to support meta-ros

Submitted by vmayoral on July 5, 2013, 12:38 p.m. | Patch ID: 53165


Message ID 1373027881-3518-1-git-send-email-v.mayoralv@gmail.com
State New
Headers show

Commit Message

vmayoral July 5, 2013, 12:38 p.m.
From: victor <v.mayoralv@gmail.com>

By default apr_cv_mutex_recursive in apr is set to "no" and this leads
to the APRENOTIMPL return value of apr_thread_mutex_create in thread_mutex.c when
APR_THREAD_MUTEX_NESTED is requested via flags which leads to a deadlock in applications
using apr, as observed in an application with log4cxx.

This commit adds CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes" to apr_1.4.6.bb
and removes this variable in powerpc32-linux to address this issue.

We detected this issue while working at the meta-ros project https://github.com/bmwcarit/meta-ros

Signed-off-by: VĂ­ctor Mayoral Vilches <v.mayoralv@gmail.com>
 meta/recipes-support/apr/apr_1.4.6.bb |    3 +++
 meta/site/powerpc32-linux             |    1 -
 2 files changed, 3 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-support/apr/apr_1.4.6.bb b/meta/recipes-support/apr/apr_1.4.6.bb
index 896f79f..ba59639 100644
--- a/meta/recipes-support/apr/apr_1.4.6.bb
+++ b/meta/recipes-support/apr/apr_1.4.6.bb
@@ -23,6 +23,9 @@  inherit autotools lib_package binconfig multilib_header
 OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
+# Added to fix some issues with cmake. Refer to https://github.com/bmwcarit/meta-ros/issues/68#issuecomment-19896928
+CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes"
 do_configure_prepend() {
 	cd ${S}
diff --git a/meta/site/powerpc32-linux b/meta/site/powerpc32-linux
index 4550df3..b3973c9 100644
--- a/meta/site/powerpc32-linux
+++ b/meta/site/powerpc32-linux
@@ -203,7 +203,6 @@  apr_cv_use_lfs64=${apr_cv_use_lfs64=yes}