From owner-svn-ports-head@freebsd.org Sat Sep 28 20:02:34 2019 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4CE0B12EC13; Sat, 28 Sep 2019 20:02:34 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46gfhp0sfPz4WrM; Sat, 28 Sep 2019 20:02:34 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 012AA6A12; Sat, 28 Sep 2019 20:02:34 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8SK2XQa035335; Sat, 28 Sep 2019 20:02:33 GMT (envelope-from sunpoet@FreeBSD.org) Received: (from sunpoet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8SK2Xlf035334; Sat, 28 Sep 2019 20:02:33 GMT (envelope-from sunpoet@FreeBSD.org) Message-Id: <201909282002.x8SK2Xlf035334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sunpoet set sender to sunpoet@FreeBSD.org using -f From: Sunpoet Po-Chuan Hsieh Date: Sat, 28 Sep 2019 20:02:33 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r513148 - head/databases/rocksdb X-SVN-Group: ports-head X-SVN-Commit-Author: sunpoet X-SVN-Commit-Paths: head/databases/rocksdb X-SVN-Commit-Revision: 513148 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Sep 2019 20:02:34 -0000 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: