facebook / mcrouter

Mcrouter is a memcached protocol router for scaling memcached deployments.
MIT License
3.26k stars 535 forks source link

Add new Dockerfile for ubuntu 20.04 #437

Open filipenf opened 1 year ago

filipenf commented 1 year ago

I tried building mcrouter using the existing dockerfile but it is not working with Ubuntu 20.04 currently - it seems others are facing similar issues: https://github.com/facebook/mcrouter/issues/413 and https://github.com/facebook/mcrouter/issues/411

To get it to work, I started a new dockerfile using multi-stage build so there's no need to run a clean-up at the end of the process, it also takes advantage of docker cache so builds are faster and removes the need for maintaining several scripts for install/cleanup

Please let me know if there's interest in getting this merged or if I'm on the wrong path :-)

facebook-github-bot commented 1 year ago

Hi @filipenf!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

bmm-alc commented 7 months ago

Hi @filipenf

Thansk for the docker file. For information, the build because of an error in folly I'm not able to troubleshoot but I saw some people pins the dependencies version because of the moving pieces involve in the build (see https://github.com/facebook/mcrouter/issues/394#issuecomment-1624018493)

[  6%] Building CXX object CMakeFiles/folly_base.dir/ScopeGuard.cpp.o
In file included from /usr/local/mcrouter/install/include/fmt/format.h:54,
                 from /usr/local/mcrouter/pkgs/folly/folly/FBString.h:34,
                 from /usr/local/mcrouter/pkgs/folly/folly/IPAddressV4.h:34,
                 from /usr/local/mcrouter/pkgs/folly/folly/IPAddress.h:38,
                 from /usr/local/mcrouter/pkgs/folly/folly/IPAddress.cpp:17:
/usr/local/mcrouter/install/include/fmt/base.h: In instantiation of 'constexpr fmt::v10::detail::value<Context> fmt::v10::detail::make_arg(T&) [with bool PACKED = true; Context = fmt::v10::context; T = folly::Range<const char*>; typename std::enable_if<PACKED, int>::type <anonymous> = 0]':
/usr/local/mcrouter/install/include/fmt/base.h:2007:74:   required from 'constexpr fmt::v10::detail::format_arg_store<Context, NUM_ARGS, 0, DESC> fmt::v10::make_format_args(T& ...) [with Context = fmt::v10::context; T = {folly::Range<const char*>}; long unsigned int NUM_ARGS = 1; long unsigned int NUM_NAMED_ARGS = 0; long long unsigned int DESC = 15; typename std::enable_if<(NUM_NAMED_ARGS == 0), int>::type <anonymous> = 0]'
/usr/local/mcrouter/install/include/fmt/format.h:4386:44:   required from 'std::string fmt::v10::format(fmt::v10::format_string<T ...>, T&& ...) [with T = {folly::Range<const char*>&}; std::string = std::__cxx11::basic_string<char>; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, folly::Range<const char*>&>]'
/usr/local/mcrouter/pkgs/folly/folly/IPAddress.cpp:102:20:   required from here
/usr/local/mcrouter/install/include/fmt/base.h:1599:17: error: static assertion failed: Mixing character types is disallowed.
 1599 |   static_assert(formattable_char, "Mixing character types is disallowed.");
      |                 ^~~~~~~~~~~~~~~~
/usr/local/mcrouter/install/include/fmt/base.h: In instantiation of 'constexpr fmt::v10::detail::value<Context> fmt::v10::detail::make_arg(T&) [with bool PACKED = true; Context = fmt::v10::context; T = const folly::Range<const char*>; typename std::enable_if<PACKED, int>::type <anonymous> = 0]':
/usr/local/mcrouter/install/include/fmt/base.h:2007:74:   required from 'constexpr fmt::v10::detail::format_arg_store<Context, NUM_ARGS, 0, DESC> fmt::v10::make_format_args(T& ...) [with Context = fmt::v10::context; T = {const folly::Range<const char*>}; long unsigned int NUM_ARGS = 1; long unsigned int NUM_NAMED_ARGS = 0; long long unsigned int DESC = 15; typename std::enable_if<(NUM_NAMED_ARGS == 0), int>::type <anonymous> = 0]'
/usr/local/mcrouter/install/include/fmt/format.h:4386:44:   required from 'std::string fmt::v10::format(fmt::v10::format_string<T ...>, T&& ...) [with T = {const folly::Range<const char*>&}; std::string = std::__cxx11::basic_string<char>; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, const folly::Range<const char*>&>]'
/usr/local/mcrouter/pkgs/folly/folly/IPAddress.cpp:113:57:   required from here
/usr/local/mcrouter/install/include/fmt/base.h:1599:17: error: static assertion failed: Mixing character types is disallowed.
In file included from /usr/local/mcrouter/install/include/fmt/format.h:54,
                 from /usr/local/mcrouter/pkgs/folly/folly/FBString.h:34,
                 from /usr/local/mcrouter/pkgs/folly/folly/IPAddressV6.h:37,
                 from /usr/local/mcrouter/pkgs/folly/folly/IPAddressV6.cpp:17:
/usr/local/mcrouter/install/include/fmt/base.h: In instantiation of 'constexpr fmt::v10::detail::value<Context> fmt::v10::detail::make_arg(T&) [with bool PACKED = true; Context = fmt::v10::context; T = folly::Range<const char*>; typename std::enable_if<PACKED, int>::type <anonymous> = 0]':
/usr/local/mcrouter/install/include/fmt/base.h:2007:74:   required from 'constexpr fmt::v10::detail::format_arg_store<Context, NUM_ARGS, 0, DESC> fmt::v10::make_format_args(T& ...) [with Context = fmt::v10::context; T = {folly::Range<const char*>}; long unsigned int NUM_ARGS = 1; long unsigned int NUM_NAMED_ARGS = 0; long long unsigned int DESC = 15; typename std::enable_if<(NUM_NAMED_ARGS == 0), int>::type <anonymous> = 0]'
/usr/local/mcrouter/install/include/fmt/format.h:4386:44:   required from 'std::string fmt::v10::format(fmt::v10::format_string<T ...>, T&& ...) [with T = {folly::Range<const char*>&}; std::string = std::__cxx11::basic_string<char>; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, folly::Range<const char*>&>]'
/usr/local/mcrouter/pkgs/folly/folly/IPAddressV6.cpp:216:53:   required from here
/usr/local/mcrouter/install/include/fmt/base.h:1599:17: error: static assertion failed: Mixing character types is disallowed.
 1599 |   static_assert(formattable_char, "Mixing character types is disallowed.");
      |                 ^~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/folly_base.dir/build.make:258: CMakeFiles/folly_base.dir/IPAddressV4.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/folly_base.dir/build.make:271: CMakeFiles/folly_base.dir/IPAddressV6.cpp.o] Error 1
make[2]: *** [CMakeFiles/folly_base.dir/build.make:245: CMakeFiles/folly_base.dir/IPAddress.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:197: CMakeFiles/folly_base.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
filipenf commented 7 months ago

@bmm-alc yeah that makes sense, I'll look into pinning the version when I have some time

bmm-alc commented 7 months ago

Great ! thanks

On Fri, Mar 29, 2024 at 1:27 AM Filipe Felisbino @.***> wrote:

@bmm-alc https://github.com/bmm-alc yeah that makes sense, I'll look into pinning the version when I have some time

— Reply to this email directly, view it on GitHub https://github.com/facebook/mcrouter/pull/437#issuecomment-2026370170, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATF2SCVQ7TJSYZUYXWHAEQTY2SYNPAVCNFSM6AAAAAA5ZPQDESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRWGM3TAMJXGA . You are receiving this because you were mentioned.Message ID: @.***>