Source: leveldb
Severity: important

Hi,

I've tried building Ceph 16.2.x, though it fails because RTTI support has
been disabled in leveldb 1.23. Please re-enable support for it, as per
attached patch. Please see related Ceph bug report:

https://tracker.ceph.com/issues/53060

Note the issues opened against leveldb on Github:

https://github.com/google/leveldb/issues?q=is%3Aissue+is%3Aopen+rtti

Note that the issue is also in snappy for which I'll send another bug
report (though this one is runtime, not at Ceph build time).

Cheers,

Thomas Goirand (zigo)
diff -Nru leveldb-1.23/debian/changelog leveldb-1.23/debian/changelog
--- leveldb-1.23/debian/changelog       2021-10-12 08:01:25.000000000 +0200
+++ leveldb-1.23/debian/changelog       2021-10-27 11:40:18.000000000 +0200
@@ -1,3 +1,10 @@
+leveldb (1.23-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Add RTTI support.
+
+ -- Thomas Goirand <z...@debian.org>  Wed, 27 Oct 2021 11:40:18 +0200
+
 leveldb (1.23-2) unstable; urgency=medium
 
   * Upload to Sid.
diff -Nru leveldb-1.23/debian/patches/enable-rtti.patch 
leveldb-1.23/debian/patches/enable-rtti.patch
--- leveldb-1.23/debian/patches/enable-rtti.patch       1970-01-01 
01:00:00.000000000 +0100
+++ leveldb-1.23/debian/patches/enable-rtti.patch       2021-10-27 
11:40:09.000000000 +0200
@@ -0,0 +1,21 @@
+Description: Enable rtti
+ We need RTTI support because of Ceph
+Author: Thomas Goirand <z...@debian.org>
+Forwarded: no
+Last-Update: 2021-10-27
+
+--- leveldb-1.23.orig/CMakeLists.txt
++++ leveldb-1.23/CMakeLists.txt
+@@ -71,9 +71,9 @@ else(CMAKE_CXX_COMPILER_ID STREQUAL "MSV
+   string(REGEX REPLACE "-fexceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
+ 
+-  # Disable RTTI.
+-  string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
++  # We need RTTI support if code that uses leveldb uses typeid (e.g. ceph).
++#  string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
++#  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
+ endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+ 
+ # Test whether -Wthread-safety is available. See
diff -Nru leveldb-1.23/debian/patches/series leveldb-1.23/debian/patches/series
--- leveldb-1.23/debian/patches/series  2021-07-18 07:36:30.000000000 +0200
+++ leveldb-1.23/debian/patches/series  2021-10-27 11:39:29.000000000 +0200
@@ -2,3 +2,4 @@
 0113-cmake_memenv.patch
 0120-external_testing.patch
 1001-fix_bloom_test.patch
+enable-rtti.patch

Reply via email to