Bug 1221870 - leveldb: Fails to build with googletest 1.14.0
Summary: leveldb: Fails to build with googletest 1.14.0
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: David Disseldorp
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-22 15:07 UTC by Ana Guerrero
Modified: 2024-03-25 10:26 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
leveldb with googletest 1.14.0 (192.92 KB, text/plain)
2024-03-22 15:07 UTC, Ana Guerrero
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ana Guerrero 2024-03-22 15:07:37 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.
Comment 1 Nathan Cutler 2024-03-23 10:29:11 UTC
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
Comment 2 David Disseldorp 2024-03-25 06:56:21 UTC
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(?)
Comment 3 David Disseldorp 2024-03-25 08:01:02 UTC
(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.
Comment 4 Nathan Cutler 2024-03-25 10:26:48 UTC
OK, merged and forwarded to Factory as SR#1161359