kraken + gcc7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Today I needed to build the current Kraken HEAD using gcc7. Unfortunately, the
source of both ceph and the rocksdb submodule are incompatible with gcc7.

I came up with the attached patches which allow the sources to compile. I'm
posting them here as they may help someone make progress until the problems with
gcc7 are fixed in the kraken branch.

-- 
Cheers,
Brad
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 93963cf8be..86abc79b01 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -688,7 +688,10 @@ install(TARGETS ceph-mon DESTINATION bin)
 # OSD/ObjectStore
 # make rocksdb statically
 
-set(ROCKSDB_CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON)
+set(THE_FLAGS "-Wno-expansion-to-defined -Wno-implicit-fallthrough -Wno-format-truncation")
+set(ROCKSDB_CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON
+  -DCMAKE_CXX_FLAGS=${THE_FLAGS}
+  -DCMAKE_C_FLAGS=${THE_FLAGS})
 
 if(ALLOCATOR STREQUAL "jemalloc")
   list(APPEND ROCKSDB_CMAKE_ARGS -DWITH_JEMALLOC=ON)
diff --git a/src/os/FuseStore.h b/src/os/FuseStore.h
index bb9e59f5f4..04681e645c 100644
--- a/src/os/FuseStore.h
+++ b/src/os/FuseStore.h
@@ -7,6 +7,7 @@
 #include <string>
 #include <map>
 #include <mutex>
+#include <functional>
 
 #include "common/Thread.h"
 #include "include/buffer.h"
diff --git a/util/thread_local.h b/util/thread_local.h
index 5806b544..f0af7504 100644
--- a/util/thread_local.h
+++ b/util/thread_local.h
@@ -13,6 +13,7 @@
 #include <memory>
 #include <unordered_map>
 #include <vector>
+#include <functional>
 
 #include "util/autovector.h"
 #include "port/port.h"
diff --git a/utilities/persistent_cache/block_cache_tier.h b/utilities/persistent_cache/block_cache_tier.h
index 9330d053..baefca32 100644
--- a/utilities/persistent_cache/block_cache_tier.h
+++ b/utilities/persistent_cache/block_cache_tier.h
@@ -15,6 +15,7 @@
 #include <stdexcept>
 #include <string>
 #include <thread>
+#include <functional>
 
 #include "rocksdb/cache.h"
 #include "rocksdb/comparator.h"
diff --git a/utilities/persistent_cache/block_cache_tier_file.h b/utilities/persistent_cache/block_cache_tier_file.h
index c2311ffc..c77d1d7b 100644
--- a/utilities/persistent_cache/block_cache_tier_file.h
+++ b/utilities/persistent_cache/block_cache_tier_file.h
@@ -10,6 +10,7 @@
 #include <memory>
 #include <string>
 #include <vector>
+#include <functional>
 
 #include "rocksdb/comparator.h"
 #include "rocksdb/env.h"
diff --git a/utilities/persistent_cache/volatile_tier_impl.h b/utilities/persistent_cache/volatile_tier_impl.h
index a29c4ac3..f3ca79d6 100644
--- a/utilities/persistent_cache/volatile_tier_impl.h
+++ b/utilities/persistent_cache/volatile_tier_impl.h
@@ -12,6 +12,7 @@
 #include <sstream>
 #include <string>
 #include <vector>
+#include <functional>
 
 #include "rocksdb/cache.h"
 #include "utilities/persistent_cache/hash_table.h"

[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux