diff options
| -rw-r--r-- | meta-oe/recipes-extended/minifi-cpp/files/remove_const_due_to_std_lock_guard.patch | 38 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb | 3 |
2 files changed, 41 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/minifi-cpp/files/remove_const_due_to_std_lock_guard.patch b/meta-oe/recipes-extended/minifi-cpp/files/remove_const_due_to_std_lock_guard.patch new file mode 100644 index 0000000000..2d66576f6e --- /dev/null +++ b/meta-oe/recipes-extended/minifi-cpp/files/remove_const_due_to_std_lock_guard.patch | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | From bfce136fa9ff1e955928539484ba4dd55f98f05b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Willem Jan Withagen <wjw@digiware.nl> | ||
| 3 | Date: Sun, 16 Aug 2020 23:38:55 +0200 | ||
| 4 | Subject: [PATCH] Update channel.h | ||
| 5 | |||
| 6 | Compiling this on FreeBSD with CLang fails due to: | ||
| 7 | ```In file included from /usr/ports/net/ceph15/work/ceph-15.2.4/src/rocksdb/utilities/backupable/backupable_db.cc:16: | ||
| 8 | /usr/ports/net/ceph15/work/ceph-15.2.4/src/rocksdb/util/channel.h:35:33: error: no matching constructor for initialization of 'std::lock_guard<std::mutex>' | ||
| 9 | std::lock_guard<std::mutex> lk(lock_); | ||
| 10 | ^ ~~~~~ | ||
| 11 | /usr/include/c++/v1/__mutex_base:90:14: note: candidate constructor not viable: 1st argument ('const std::mutex') would lose const qualifier | ||
| 12 | explicit lock_guard(mutex_type& __m) _LIBCPP_THREAD_SAFETY_ANNOTATION(acquire_capability(__m)) | ||
| 13 | ^ | ||
| 14 | /usr/include/c++/v1/__mutex_base:100:5: note: candidate constructor not viable: no known conversion from 'const std::mutex' to 'const std::__1::lock_guard<std::__1::mutex>' for 1st argument | ||
| 15 | lock_guard(lock_guard const&) _LIBCPP_EQUAL_DELETE; | ||
| 16 | ^ | ||
| 17 | /usr/include/c++/v1/__mutex_base:94:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided | ||
| 18 | lock_guard(mutex_type& __m, adopt_lock_t) _LIBCPP_THREAD_SAFETY_ANNOTATION(requires_capability(__m)) | ||
| 19 | ^ | ||
| 20 | 1 error generated. | ||
| 21 | ``` | ||
| 22 | --- | ||
| 23 | thirdparty/rocksdb/util/channel.h | 2 +- | ||
| 24 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 25 | |||
| 26 | diff --git a/thirdparty/rocksdb/util/channel.h b/thirdparty/rocksdb/util/channel.h | ||
| 27 | index 705fa2d28f..993bef5bc0 100644 | ||
| 28 | --- a/thirdparty/rocksdb/util/channel.h | ||
| 29 | +++ b/thirdparty/rocksdb/util/channel.h | ||
| 30 | @@ -31,7 +31,7 @@ class channel { | ||
| 31 | return buffer_.empty() && eof_; | ||
| 32 | } | ||
| 33 | |||
| 34 | - size_t size() const { | ||
| 35 | + size_t size() { | ||
| 36 | std::lock_guard<std::mutex> lk(lock_); | ||
| 37 | return buffer_.size(); | ||
| 38 | } | ||
diff --git a/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb index 150d1fa53c..92baa98314 100644 --- a/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb +++ b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb | |||
| @@ -19,6 +19,7 @@ SRC_URI = "git://github.com/apache/nifi-minifi-cpp.git \ | |||
| 19 | file://fix-osspuuid-cross-compile.patch \ | 19 | file://fix-osspuuid-cross-compile.patch \ |
| 20 | file://fix-osspuuid-musl-compile.patch \ | 20 | file://fix-osspuuid-musl-compile.patch \ |
| 21 | file://fix-rocksdb-cross-compile.patch \ | 21 | file://fix-rocksdb-cross-compile.patch \ |
| 22 | file://remove_const_due_to_std_lock_guard.patch \ | ||
| 22 | file://minifi.service \ | 23 | file://minifi.service \ |
| 23 | file://systemd-volatile.conf \ | 24 | file://systemd-volatile.conf \ |
| 24 | file://sysvinit-volatile.conf \ | 25 | file://sysvinit-volatile.conf \ |
| @@ -37,6 +38,8 @@ EXTRA_OECMAKE += " \ | |||
| 37 | -DHOST_SYS=${HOST_SYS} -DBUILD_SYS=${BUILD_SYS} \ | 38 | -DHOST_SYS=${HOST_SYS} -DBUILD_SYS=${BUILD_SYS} \ |
| 38 | -DSKIP_TESTS=ON \ | 39 | -DSKIP_TESTS=ON \ |
| 39 | " | 40 | " |
| 41 | EXTRA_OECMAKE_append_toolchain-clang = " -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib" | ||
| 42 | LDFLAGS_append_toolchain-clang = " -fuse-ld=lld" | ||
| 40 | 43 | ||
| 41 | # There are endian issues when communicating with the x86 nifi on the the mips and the ppc machines. | 44 | # There are endian issues when communicating with the x86 nifi on the the mips and the ppc machines. |
| 42 | COMPATIBLE_MACHINE_mips = "(!.*mips).*" | 45 | COMPATIBLE_MACHINE_mips = "(!.*mips).*" |
