Skip to contentSkip to conversation

package/boost: disable boost-log with bfin uClibc 2014R1 toolchain

PATCH New Romain Naour 2 participants 4 messages Apr 9, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 package/boost: disable boost-log with bfin uClibc 2014R1 toolchain

pthread_spin_* functions are not implemented in the uClibc used by this toolchain.

In file included from libs/log/src/threadsafe_queue.cpp:33:
./boost/log/detail/spin_mutex.hpp: In constructor ?boost::log::v2_mt_posix::aux::spin_mutex::spin_mutex()?:
./boost/log/detail/spin_mutex.hpp:198: error: ?pthread_spin_init? was not declared in this scope ./boost/log/detail/spin_mutex.hpp: In destructor ?boost::log::v2_mt_posix::aux::spin_mutex::~spin_mutex()?:
./boost/log/detail/spin_mutex.hpp:205: error: ?pthread_spin_destroy? was not declared in this scope ./boost/log/detail/spin_mutex.hpp: In member function ?bool boost::log::v2_mt_posix::aux::spin_mutex::try_lock()?:
./boost/log/detail/spin_mutex.hpp:210: error: ?pthread_spin_trylock? was not declared in this scope ./boost/log/detail/spin_mutex.hpp: In member function ?void boost::log::v2_mt_posix::aux::spin_mutex::lock()?:
./boost/log/detail/spin_mutex.hpp:220: error: ?pthread_spin_lock? was not declared in this scope ./boost/log/detail/spin_mutex.hpp: In member function ?void boost::log::v2_mt_posix::aux::spin_mutex::unlock()?:
./boost/log/detail/spin_mutex.hpp:227: error: ?pthread_spin_unlock? was not declared in this scope

Fixes:
http://autobuild.buildroot.net/results/8cd/8cdac9cc67394aaae09ee816a9adddec762e3bd0/

---
 package/boost/Config.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/boost/Config.in +2 -1
index a004fd8..8e99324 100644
@@ -88,7 +88,8 @@ comment "boost-locale needs a toolchain w/ wchar"
 	depends on !BR2_USE_WCHAR
 
 config BR2_PACKAGE_BOOST_LOG
-        bool "boost-log"
+	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1 # missing pthread_spin_* in uClibc.
+	bool "boost-log"
 
 config BR2_PACKAGE_BOOST_MATH
 	bool "boost-math"
Signature · 1 line
1.9.3
#1 lore raw

PATCH 2/3 package/boost: disable boost-log with bfin uClibc 2013R1 toolchain

---
 package/boost/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/boost/Config.in +1 -0
index 8e99324..1c51a8b 100644
@@ -89,6 +89,7 @@ comment "boost-locale needs a toolchain w/ wchar"
 
 config BR2_PACKAGE_BOOST_LOG
 	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1 # missing pthread_spin_* in uClibc.
+	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1 # missing pthread_spin_* in uClibc.
 	bool "boost-log"
 
 config BR2_PACKAGE_BOOST_MATH
Signature · 1 line
1.9.3
#2 lore raw

PATCH 3/3 package/boost: disable boost-log with bfin uClibc 2012R2 toolchain

In reply to Romain Naour
---
 package/boost/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/boost/Config.in +1 -0
index 1c51a8b..7a151fc 100644
@@ -90,6 +90,7 @@ comment "boost-locale needs a toolchain w/ wchar"
 config BR2_PACKAGE_BOOST_LOG
 	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1 # missing pthread_spin_* in uClibc.
 	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1 # missing pthread_spin_* in uClibc.
+	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 # missing pthread_spin_* in uClibc.
 	bool "boost-log"
 
 config BR2_PACKAGE_BOOST_MATH
Signature · 1 line
1.9.3
#3 lore raw

PATCH 1/3 package/boost: disable boost-log with bfin uClibc 2014R1 toolchain

In reply to Romain Naour

Dear Romain Naour,

Quoted 13 lines · Romain Naour

pthread_spin_* functions are not implemented in the uClibc used by this toolchain.

In file included from libs/log/src/threadsafe_queue.cpp:33:
./boost/log/detail/spin_mutex.hpp: In constructor ?boost::log::v2_mt_posix::aux::spin_mutex::spin_mutex()?:
./boost/log/detail/spin_mutex.hpp:198: error: ?pthread_spin_init? was not declared in this scope ./boost/log/detail/spin_mutex.hpp: In destructor ?boost::log::v2_mt_posix::aux::spin_mutex::~spin_mutex()?:
./boost/log/detail/spin_mutex.hpp:205: error: ?pthread_spin_destroy? was not declared in this scope ./boost/log/detail/spin_mutex.hpp: In member function ?bool boost::log::v2_mt_posix::aux::spin_mutex::try_lock()?:
./boost/log/detail/spin_mutex.hpp:210: error: ?pthread_spin_trylock? was not declared in this scope ./boost/log/detail/spin_mutex.hpp: In member function ?void boost::log::v2_mt_posix::aux::spin_mutex::lock()?:
./boost/log/detail/spin_mutex.hpp:220: error: ?pthread_spin_lock? was not declared in this scope ./boost/log/detail/spin_mutex.hpp: In member function ?void boost::log::v2_mt_posix::aux::spin_mutex::unlock()?:
./boost/log/detail/spin_mutex.hpp:227: error: ?pthread_spin_unlock? was not declared in this scope

I believe a better option is probably to make this option depend on BR2_TOOLCHAIN_HAS_THREADS_NPTL. pthread_spin_* are available in linuxthreads, but not linuxthreads.old apparently, linuxthreads is very rarely used. So I believe limiting to NPTL thread implementation is a good enough approximation.

Also, it's probably a bit heavy to do one patch per toolchain version.

package/boost/Config.in comment "boost-locale needs a toolchain w/ wchar" · line 92

Quoted 4 lines

config BR2_PACKAGE_BOOST_LOG

package/boost/Config.in +2 -1
-        bool "boost-log"
+	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1 # missing pthread_spin_* in uClibc.
+	bool "boost-log"

I've fixed up the indentation as a separate commit. The 'depends on' line should be after the 'bool' line.

Thomas

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