kraken + gcc7
diff mbox

Message ID CAF-wwdG6nhqFN85=ONTQ+XUc6mea3=QaqsaSfux_-pQvh2Wrsg@mail.gmail.com
State New
Headers show

Commit Message

Brad Hubbard July 26, 2017, 7:18 a.m. UTC
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.

Comments

Brad Hubbard July 26, 2017, 7:22 a.m. UTC | #1
Just to be anal, the ceph patch is applied to the ceph source tree and
the rocksdb patch should be applied in the src/rocksdb
 directory.

On Wed, Jul 26, 2017 at 5:18 PM, Brad Hubbard <bhubbard@redhat.com> wrote:
> 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

Patch
diff mbox

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"