[osm2pgsql] 01/02: Add patch to not use Boost lockfree queues even for Boost >= 1.53.
Bas Couwenberg
sebastic at xs4all.nl
Fri Dec 12 00:45:04 UTC 2014
This is an automated email from the git hooks/post-receive script.
sebastic-guest pushed a commit to branch master
in repository osm2pgsql.
commit a0791c0f765996ba6943490efbaf7149ba7bc24c
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Fri Dec 12 01:37:56 2014 +0100
Add patch to not use Boost lockfree queues even for Boost >= 1.53.
---
debian/changelog | 7 +++
debian/patches/boost-atomic-get_lock_for.patch | 71 ++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 79 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 5ede6bf..6cfcd98 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+osm2pgsql (0.87.0-1~exp2) UNRELEASED; urgency=medium
+
+ * Add patch to not use Boost lockfree queues even for Boost >= 1.53,
+ hopefully fixes the FTBFS on arm64, armel, powerpc, ppc64el & s390x.
+
+ -- Bas Couwenberg <sebastic at xs4all.nl> Fri, 12 Dec 2014 01:35:51 +0100
+
osm2pgsql (0.87.0-1~exp1) experimental; urgency=medium
* New upstream release.
diff --git a/debian/patches/boost-atomic-get_lock_for.patch b/debian/patches/boost-atomic-get_lock_for.patch
new file mode 100644
index 0000000..a2a2769
--- /dev/null
+++ b/debian/patches/boost-atomic-get_lock_for.patch
@@ -0,0 +1,71 @@
+Description: Don't use lockfree queues even for Boost >= 1.53
+Author: Paul Norman
+Bug: https://github.com/openstreetmap/osm2pgsql/issues/231
+
+--- a/osmdata.cpp
++++ b/osmdata.cpp
+@@ -10,7 +10,7 @@
+ #include <stdexcept>
+ #include <utility>
+
+-#if BOOST_VERSION < 105300
++#if true
+ #else
+ #include <boost/atomic.hpp>
+ #endif
+@@ -167,7 +167,7 @@ struct pending_threaded_processor : publ
+ typedef std::vector<boost::shared_ptr<output_t> > output_vec_t;
+ typedef std::pair<boost::shared_ptr<const middle_query_t>, output_vec_t> clone_t;
+
+-#if BOOST_VERSION < 105300
++#if true
+ static void do_jobs(output_vec_t const& outputs, pending_queue_t& queue, size_t& ids_done, boost::mutex& mutex, int append, bool ways) {
+ while (true) {
+ //get the job off the queue synchronously
+@@ -209,7 +209,7 @@ struct pending_threaded_processor : publ
+
+ //starts up count threads and works on the queue
+ pending_threaded_processor(boost::shared_ptr<middle_query_t> mid, const output_vec_t& outs, size_t thread_count, size_t job_count, int append)
+-#if BOOST_VERSION < 105300
++#if true
+ //note that we cant hint to the stack how large it should be ahead of time
+ //we could use a different datastructure like a deque or vector but then
+ //the outputs the enqueue jobs would need the version check for the push(_back) method
+@@ -256,7 +256,7 @@ struct pending_threaded_processor : publ
+
+ //make the threads and start them
+ for (size_t i = 0; i < clones.size(); ++i) {
+-#if BOOST_VERSION < 105300
++#if true
+ workers.create_thread(boost::bind(do_jobs, boost::cref(clones[i].second), boost::ref(queue), boost::ref(ids_done), boost::ref(mutex), append, true));
+ #else
+ workers.create_thread(boost::bind(do_jobs, boost::cref(clones[i].second), boost::ref(queue), boost::ref(ids_done), append, true));
+@@ -307,7 +307,7 @@ struct pending_threaded_processor : publ
+
+ //make the threads and start them
+ for (size_t i = 0; i < clones.size(); ++i) {
+-#if BOOST_VERSION < 105300
++#if true
+ workers.create_thread(boost::bind(do_jobs, boost::cref(clones[i].second), boost::ref(queue), boost::ref(ids_done), boost::ref(mutex), append, false));
+ #else
+ workers.create_thread(boost::bind(do_jobs, boost::cref(clones[i].second), boost::ref(queue), boost::ref(ids_done), append, false));
+@@ -353,7 +353,7 @@ private:
+ //job queue
+ pending_queue_t queue;
+
+-#if BOOST_VERSION < 105300
++#if true
+ //how many ids within the job have been processed
+ size_t ids_done;
+ //so the threads can manage some of the shared state
+--- a/output.hpp
++++ b/output.hpp
+@@ -20,7 +20,7 @@
+ #include <utility>
+
+ typedef std::pair<osmid_t, size_t> pending_job_t;
+-#if BOOST_VERSION < 105300
++#if true
+ #include <stack>
+ typedef std::stack<pending_job_t> pending_queue_t;
+ #else
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..a4ea8d5
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+boost-atomic-get_lock_for.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osm2pgsql.git
More information about the Pkg-grass-devel
mailing list