Date: Sat, 28 Sep 2019 20:02:33 +0000 (UTC) From: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r513148 - head/databases/rocksdb Message-ID: <201909282002.x8SK2Xlf035334@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909282002.x8SK2Xlf035334>