Skip to content

Commit

Permalink
fix edenfs oss build, ubuntu googletest is too old
Browse files Browse the repository at this point in the history
Summary:
Update the googletest manifest as ubuntu's LTS packages are too old. 22.10 on looks fine

Test Plan:

Build locally with ./build/fbcode_builder/getdeps.py --allow-system-packages build --src-dir=. eden

before, breaks at:
```
/usr/bin/c++  -DBOOST_ALL_NO_LIB -DFOLLY_XLOG_STRIP_PREFIXES=\"/home/alex/local/sapling:/home/alex/local/tmp/ubuntu-20.04/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/build/eden\" -DGFLAGS_IS_A_DLL=0 -I. -I/home/alex/local/sapling -I/home/alex/local/tmp/ubuntu-20.04/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/installed/blake3-lrolsLBeklWWBLYfMM4fF2TJGwCeReSgHBUbEgA3TFw/include -isystem /home/alex/local/tmp/ubuntu-20.04/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/installed/folly/include -isystem /home/alex/local/tmp/ubuntu-20.04/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/installed/fb303/include -isystem /home/alex/local/tmp/ubuntu-20.04/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/installed/fizz/include -isystem /home/alex/local/tmp/ubuntu-20.04/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/installed/wangle/include -isystem /home/alex/local/tmp/ubuntu-20.04/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/installed/fbthrift/include -isystem /home/alex/local/tmp/ubuntu-20.04/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/installed/fmt-_ZorQJC2eeu9K7XicUjMKUe54C8sh6ZsaDZIZfQ_QmE/include -isystem /home/alex/local/tmp/ubuntu-20.04/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/installed/mvfst/include -isystem /home/alex/local/tmp/ubuntu-20.04/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/installed/edencommon/include -isystem /home/alex/local/tmp/ubuntu-20.04/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/installed/cpptoml-_zeUSHY925tqbka8WnSRFSO5ZQbE56aQYsrCa6wv7mU/include -isystem /home/alex/local/tmp/ubuntu-20.04/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/installed/rocksdb-Y6wy710FNBv6sNEe4kCJ_-a3O5-tys4ivojRziE0GyM/include -g -Wall -Wextra -Wno-deprecated -Wno-deprecated-declarations -Wno-nullability-completeness -Wno-unknown-pragmas -O2 -g -DNDEBUG   -fsized-deallocation -pthread -std=gnu++17 -MD -MT eden/fs/utils/test/CMakeFiles/eden_utils_test.dir/SourceLocationTest.cpp.o -MF eden/fs/utils/test/CMakeFiles/eden_utils_test.dir/SourceLocationTest.cpp.o.d -o eden/fs/utils/test/CMakeFiles/eden_utils_test.dir/SourceLocationTest.cpp.o -c /home/alex/local/sapling/eden/fs/utils/test/SourceLocationTest.cpp
In file included from /usr/include/gmock/gmock-spec-builders.h:75,
                 from /usr/include/gmock/gmock-generated-function-mockers.h:47,
                 from /usr/include/gmock/gmock-function-mocker.h:39,
                 from /usr/include/gmock/gmock.h:61,
                 from /home/alex/local/tmp/ubuntu-20.04/fbcode_builder_getdeps-ZhomeZalexZlocalZsaplingZbuildZfbcode_builder/installed/folly/include/folly/portability/GMock.h:32,
                 from /home/alex/local/sapling/eden/fs/utils/test/SourceLocationTest.cpp:11:
/usr/include/gmock/gmock-matchers.h: In instantiation of ‘bool testing::internal::HasSubstrMatcher<StringType>::MatchAndExplain(const MatcheeStringType&, testing::MatchResultListener*) const [with MatcheeStringType = std::basic_string_view<char>; StringType = std::__cxx11::basic_string<char>]’:
/usr/include/gtest/gtest-matchers.h:484:47:   required from ‘bool testing::PolymorphicMatcher<Impl>::MonomorphicImpl<T>::MatchAndExplain(T, testing::MatchResultListener*) const [with T = const std::basic_string_view<char>&; Impl = testing::internal::HasSubstrMatcher<std::__cxx11::basic_string<char> >]’
/usr/include/gtest/gtest-matchers.h:483:18:   required from here
/usr/include/gmock/gmock-matchers.h:760:23: error: invalid initialization of reference of type ‘const std::__cxx11::basic_string<char>&’ from expression of type ‘const std::basic_string_view<char>’
  760 |     const StringType& s2(s);

```

after, works on ubuntu 20.04.  On 22.04 gets to the next problem, see the ImmediateFuture.h change later in this stack
  • Loading branch information
ahornby committed Jul 29, 2023
1 parent 774a587 commit 716b58b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/fbcode_builder/manifests/googletest
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ gtest_force_shared_crt=ON
[cmake.defines.os=windows]
BUILD_SHARED_LIBS=ON

# 18.04 googletest is too old
[debs.not(all(distro=ubuntu,distro_vers="18.04"))]
# packaged googletest is too old
[debs.not(all(distro=ubuntu,any(distro_vers="18.04",distro_vers="20.04",distro_vers="22.04")))]
libgtest-dev
libgmock-dev

0 comments on commit 716b58b

Please sign in to comment.