Bugzilla – Bug 1221870
leveldb: Fails to build with googletest 1.14.0
Last modified: 2024-03-25 10:26:48 UTC
Created attachment 873732 [details] leveldb with googletest 1.14.0 leveldb fails to build with googletest 1.14.0, you can see the issue in the attached log.
Here is the issue, I guess: [ 16s] In file included from /usr/include/gmock/internal/gmock-port.h:57, [ 16s] from /usr/include/gmock/internal/gmock-internal-utils.h:49, [ 16s] from /usr/include/gmock/gmock-actions.h:145, [ 16s] from /usr/include/gmock/gmock.h:56, [ 16s] from /home/abuild/rpmbuild/BUILD/leveldb-1.23/./util/testutil.h:8, [ 16s] from /home/abuild/rpmbuild/BUILD/leveldb-1.23/util/testutil.cc:5: [ 16s] /usr/include/gtest/internal/gtest-port.h:279:2: error: #error C++ versions less than C++14 are not supported. [ 16s] 279 | #error C++ versions less than C++14 are not supported. [ 16s] | ^~~~~ I see leveldb is a Google project now (?) https://github.com/google/leveldb
Thanks for the report. (In reply to Nathan Cutler from comment #1) > Here is the issue, I guess: > > [ 16s] In file included from /usr/include/gmock/internal/gmock-port.h:57, > [ 16s] from > /usr/include/gmock/internal/gmock-internal-utils.h:49, > [ 16s] from /usr/include/gmock/gmock-actions.h:145, > [ 16s] from /usr/include/gmock/gmock.h:56, > [ 16s] from > /home/abuild/rpmbuild/BUILD/leveldb-1.23/./util/testutil.h:8, > [ 16s] from > /home/abuild/rpmbuild/BUILD/leveldb-1.23/util/testutil.cc:5: > [ 16s] /usr/include/gtest/internal/gtest-port.h:279:2: error: #error C++ > versions less than C++14 are not supported. > [ 16s] 279 | #error C++ versions less than C++14 are not supported. > [ 16s] | ^~~~~ It looks as though -DCMAKE_CXX_STANDARD=14 does the trick here. Will submit a spec change to use it. > > I see leveldb is a Google project now (?) > > https://github.com/google/leveldb I think it always has been. You might be thinking of rocksdb(?)
(In reply to David Disseldorp from comment #2) ... > > [ 16s] 279 | #error C++ versions less than C++14 are not supported. > > [ 16s] | ^~~~~ > > It looks as though -DCMAKE_CXX_STANDARD=14 does the trick here. Will submit > a spec change to use it. Submitted via https://build.opensuse.org/request/show/1161298 . @Nathan: please merge if you're okay with the change.
OK, merged and forwarded to Factory as SR#1161359