svn commit: r513148 - head/databases/rocksdb
Sunpoet Po-Chuan Hsieh
sunpoet at FreeBSD.org
Sat Sep 28 20:02:34 UTC 2019
Author: sunpoet
Date: Sat Sep 28 20:02:33 2019
New Revision: 513148
URL: https://svnweb.freebsd.org/changeset/ports/513148
Log:
Allow build with Clang 8
Clang 8 detects shadow enums and stops the build. This workaround adds -Wno-error=shadow to bypass it.
In file included from db/builder.cc:19:
./db/internal_stats.h:112:5: error: declaration shadows a variable in namespace 'rocksdb' [-Werror,-Wshadow]
WAL_FILE_BYTES,
^
./include/rocksdb/statistics.h:196:3: note: previous declaration is here
WAL_FILE_BYTES, // Number of bytes written to WAL
^
In file included from db/builder.cc:19:
./db/internal_stats.h:113:5: error: declaration shadows a variable in namespace 'rocksdb' [-Werror,-Wshadow]
WAL_FILE_SYNCED,
^
./include/rocksdb/statistics.h:195:3: note: previous declaration is here
WAL_FILE_SYNCED, // Number of times WAL sync is done
^
In file included from db/builder.cc:19:
./db/internal_stats.h:114:5: error: declaration shadows a variable in namespace 'rocksdb' [-Werror,-Wshadow]
BYTES_WRITTEN,
^
./include/rocksdb/statistics.h:131:3: note: previous declaration is here
BYTES_WRITTEN,
^
In file included from db/builder.cc:19:
./db/internal_stats.h:115:5: error: declaration shadows a variable in namespace 'rocksdb' [-Werror,-Wshadow]
NUMBER_KEYS_WRITTEN,
^
./include/rocksdb/statistics.h:124:3: note: previous declaration is here
NUMBER_KEYS_WRITTEN,
^
In file included from db/builder.cc:19:
./db/internal_stats.h:116:5: error: declaration shadows a variable in namespace 'rocksdb' [-Werror,-Wshadow]
WRITE_DONE_BY_OTHER,
^
./include/rocksdb/statistics.h:201:3: note: previous declaration is here
WRITE_DONE_BY_OTHER, // Equivalent to writes done for others
^
In file included from db/builder.cc:19:
./db/internal_stats.h:117:5: error: declaration shadows a variable in namespace 'rocksdb' [-Werror,-Wshadow]
WRITE_DONE_BY_SELF,
^
./include/rocksdb/statistics.h:200:3: note: previous declaration is here
WRITE_DONE_BY_SELF,
^
In file included from db/builder.cc:19:
./db/internal_stats.h:118:5: error: declaration shadows a variable in namespace 'rocksdb' [-Werror,-Wshadow]
WRITE_WITH_WAL,
^
./include/rocksdb/statistics.h:203:3: note: previous declaration is here
WRITE_WITH_WAL, // Number of Write calls that request WAL
^
7 errors generated.
gmake[1]: *** [Makefile:683: shared-objects/db/builder.o] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/databases/rocksdb/work/rocksdb-6.2.2'
*** Error code 1
Stop.
make: stopped in /usr/ports/databases/rocksdb
PR: 236213
Reported by: jbeich
Reference: https://github.com/facebook/rocksdb/issues/4946
Modified:
head/databases/rocksdb/Makefile
Modified: head/databases/rocksdb/Makefile
==============================================================================
--- head/databases/rocksdb/Makefile Sat Sep 28 20:02:28 2019 (r513147)
+++ head/databases/rocksdb/Makefile Sat Sep 28 20:02:33 2019 (r513148)
@@ -72,6 +72,10 @@ PLIST_SUB+= LITE=${PKGNAMESUFFIX}
.if ${CHOSEN_COMPILER_TYPE} == clang
CXXFLAGS+= -Wno-inconsistent-missing-override
+# Clang 8 detects shadow enums and stops the build. This workaround adds -Wno-error=shadow to bypass it.
+.if ${COMPILER_VERSION} >= 80
+CXXFLAGS+= -Wno-error=shadow
+.endif
.endif
post-patch:
More information about the svn-ports-all
mailing list