Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix OSS build
Browse files Browse the repository at this point in the history
mcrouter currently does not compile, since the build system is out of
sync with recent changes.

Due to the use of `std::span` introduced in
9a24a4e, the project now requires C++20
to build. Update the `-std` flag accordingly, since the existing C++17
requirement was also introduced without much fanfare in
3181213 following a similar change.

Also update Automake files to reflect some newly added project files,
and link against `serverdbginfo` from fbthrift as it is now required.
mszabo-wikia committed Jul 9, 2024
1 parent 3befde1 commit 47987db
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions mcrouter/Makefile.am
Original file line number Diff line number Diff line change
@@ -135,7 +135,11 @@ libmcroutercore_a_SOURCES = \
routes/FailoverRoute-inl.h \
routes/FailoverRoute.h \
routes/FailoverWithExptimeRouteFactory.h \
routes/HashStopAllowListRoute.h \
routes/HashStopAllowListRoute.cpp \
routes/HostIdRouteFactory.h \
routes/KeyParseRoute.h \
routes/KeyParseRoute.cpp \
routes/KeySplitRoute-inl.h \
routes/KeySplitRoute.h \
routes/L1L2CacheRouteFactory.h \
@@ -254,6 +258,7 @@ mcrouter_LDADD = \
libmcroutercore.a \
lib/libmcrouter.a \
-lthriftcpp2 \
-lserverdbginfo \
-ltransport \
-lthriftanyrep \
-lthrifttype \
2 changes: 1 addition & 1 deletion mcrouter/configure.ac
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ AX_PYTHON_DEVEL()
AX_CXX_COMPILE_STDCXX_14([],[mandatory])
LT_INIT

CXXFLAGS="-fno-strict-aliasing -std=c++17 $CXXFLAGS"
CXXFLAGS="-fno-strict-aliasing -std=c++20 $CXXFLAGS"
CXXFLAGS="-W -Wall -Wextra -Wno-unused-parameter $CXXFLAGS"
CXXFLAGS=" -Wno-missing-field-initializers -Wno-deprecated $CXXFLAGS"
CXXFLAGS="-DLIBMC_FBTRACE_DISABLE -DDISABLE_COMPRESSION $CXXFLAGS"
3 changes: 2 additions & 1 deletion mcrouter/lib/network/test/Makefile.am
Original file line number Diff line number Diff line change
@@ -17,8 +17,9 @@ mock_mc_server_CPPFLAGS = -I$(top_srcdir)/..
mock_mc_server_LDADD = \
$(top_builddir)/lib/libmcrouter.a \
-lthriftcpp2 \
-lserverdbginfo \
-ltransport \
-lthriftanyrep \
-lthriftanyrep \
-lthrifttype \
-lthrifttyperep \
-lthriftprotocol \

0 comments on commit 47987db

Please sign in to comment.