All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brad Hubbard <bhubbard@redhat.com>
To: ceph-devel <ceph-devel@vger.kernel.org>
Subject: kraken + gcc7
Date: Wed, 26 Jul 2017 17:18:58 +1000	[thread overview]
Message-ID: <CAF-wwdG6nhqFN85=ONTQ+XUc6mea3=QaqsaSfux_-pQvh2Wrsg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 366 bytes --]

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

[-- Attachment #2: ceph-kraken.patch --]
[-- Type: text/plain, Size: 914 bytes --]

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"

[-- Attachment #3: rocksdb-kraken.patch --]
[-- Type: text/plain, Size: 1561 bytes --]

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"

             reply	other threads:[~2017-07-26  7:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-26  7:18 Brad Hubbard [this message]
2017-07-26  7:22 ` kraken + gcc7 Brad Hubbard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAF-wwdG6nhqFN85=ONTQ+XUc6mea3=QaqsaSfux_-pQvh2Wrsg@mail.gmail.com' \
    --to=bhubbard@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.