mcrouter icon indicating copy to clipboard operation
mcrouter copied to clipboard

Errors when building release-33-0 on Ubuntu 12.04

Open panchenji opened this issue 8 years ago • 6 comments

I tried to run command as follows to build: bash scripts/install_ubuntu_12.04.sh /home/test/tool/mcrouter/mcrouter/build/ -j4

The first error I got is for add_compile_options in cmake which supports since 2.8.12 but when building wangle, the requires version in CMakeList is only 2.8. And the default version in ubuntu 12.04 is 2.8.7. I upgraded it to 2.8.12 and fix the issue.

The second error I got is related to the compile: routes/RateLimiter.cpp: In constructor ‘facebook::memcache::mcrouter::RateLimiter::RateLimiter(const folly::dynamic&)’: routes/RateLimiter.cpp:50:50: internal compiler error: in nothrow_spec_p, at cp/except.c:1272 auto now = folly::TokenBucket::defaultClockNow(); ^ Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-4.8/README.Bugs for instructions. mv -f routes/.deps/libmcroutercore_a-RandomRoute.Tpo routes/.deps/libmcroutercore_a-RandomRoute.Po g++ -DHAVE_CONFIG_H -I.. -I/home/test/tool/mcrouter/mcrouter/build/install/include -DLIBMC_FBTRACE_DISABLE -Wno-missing-field-initializers -Wno-deprecated -W -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -g -O2 -std=gnu++1y -MT routes/libmcroutercore_a-RouteHandleMap.o -MD -MP -MF rout In file included from /home/test/tool/mcrouter/mcrouter/build/install/include/folly/Bits.h:71:0, from /home/test/tool/mcrouter/mcrouter/build/install/include/folly/Hash.h:27, from /home/test/tool/mcrouter/mcrouter/build/install/include/folly/FBString.h:54, from /home/test/tool/mcrouter/mcrouter/build/install/include/folly/Range.h:22, from ../mcrouter/lib/carbon/RequestReplyUtil.h:15, from ../mcrouter/lib/network/gen/Memcache.h:18, from ../mcrouter/lib/Reply.h:16, from routes/RateLimitRoute.h:15, from routes/RateLimitRoute.cpp:10: ../mcrouter/routes/RateLimiter.h: In instantiation of ‘bool facebook::memcache::mcrouter::RateLimiter::canPassThrough(facebook::memcache::UpdateLikeT<Request>) [with Request = facebook::memcache::McPrependRequest; facebook::memcache::UpdateLikeT<Request> = void*]’: routes/RateLimitRoute.h:51:9: required from ‘facebook::memcache::ReplyT<Request> facebook::memcache::mcrouter::RateLimitRoute::route(const Request&) [with Request = facebook::memcache::McPrependRequest; facebook::memcache::ReplyT<Request> = facebook::memcache::McPrependReply]’ ../mcrouter/lib/RouteHandleIf.h:69:34: required from ‘facebook::memcache::ReplyT<Request> facebook::memcache::RouteHandle<Route, RouteHandleIf, carbon::List<Request, Requests ...> >::route(const Request&) [with Route = facebook::memcache::mcrouter::RateLimitRoute; RouteHandleIf = facebook::memcache::mcro routes/RateLimitRoute.cpp:37:3: required from here ../mcrouter/routes/RateLimiter.h:57:65: internal compiler error: in nothrow_spec_p, at cp/except.c:1272 setsTb->consume(1.0, folly::TokenBucket::defaultClockNow())); ^ /home/test/tool/mcrouter/mcrouter/build/install/include/folly/Likely.h:30:40: note: in definition of macro ‘LIKELY’ #define LIKELY(x) (__builtin_expect((x), 1)) ^ Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-4.8/README.Bugs for instructions. Preprocessed source stored into /tmp/cci9SOtZ.out file, please attach this to your bugreport. ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/_usr_lib_gcc_x86_64-linux-gnu_4.8_cc1plus.11636.crash' make[2]: *** [routes/libmcroutercore_a-RateLimiter.o] Error 1 make[2]: *** Waiting for unfinished jobs.... Preprocessed source stored into /tmp/ccNYCMVv.out file, please attach this to your bugreport. ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/usr_lib_gcc_x86_64-linux-gnu_4.8_cc1plus.11636.crash'

Did anyone meet this problem before?

panchenji avatar Nov 09 '16 02:11 panchenji

The build issue is fixed after I upgrade my g++ to 4.9. But after I do make check, it failed bunch of tests and I have attached the test-suite.log test-suite.log.txt

panchenji avatar Nov 09 '16 22:11 panchenji

Hi @panchenji, I'm glad you were able to resolve the build issue by upgrading to gcc-4.9. I will look further into the issues with cmake and gcc-4.8 on Ubuntu 12.04.

Regarding the tests, many (all?) failing tests seem to fail at this line: https://github.com/facebook/mcrouter/blob/master/mcrouter/McrouterInstance.cpp#L175. What are the exact commands you are using to run the tests? All tests pass on Ubuntu 14.04 for me by running

git clone https://github.com/facebook/mcrouter
./mcrouter/mcrouter/scripts/install_ubuntu_14.04.sh /home/$USER/mcrouter-install/ -j2
make -C mcrouter/ check

jmswen avatar Nov 10 '16 00:11 jmswen

@jmswen I just ran "make check". Another thing I realized is that after build mcrouter with 4.9. I cannot start the service anymore. Here is the error it gave: I1109 21:25:24.839907 11118 main.cpp:335] build/install/bin/mcrouter --config-str={"pools":{"A":{"servers":["127.0.0.1:11211"]}},"route":"PoolRoute|A"} -p 23000 I1109 21:25:24.839982 11118 main.cpp:419] 33.0.0 mcrouter startup (11118) I1109 21:25:24.840019 11118 server.cpp:117] Spawning AsyncMcServer F1109 21:25:24.840447 11118 dynamic.cpp:130] Check failed: 0 *** Check failure stack trace: *** @ 0x7f273666222d google::LogMessage::Fail() @ 0x7f2736664168 google::LogMessage::SendToLog() @ 0x7f2736661dc3 google::LogMessage::Flush() @ 0x7f2736664a9e google::LogMessageFatal::~LogMessageFatal() @ 0x7f2737201bbb folly::dynamic::operator=() @ 0x7f27372b2700 folly::json::(anonymous namespace)::Printer::operator()() @ 0x7f27372b3227 folly::json::serialize() @ 0x4832ae facebook::memcache::mcrouter::McrouterInstance::createRaw() @ 0x483cd9 _ZZN8facebook8memcache8mcrouter16McrouterInstance6createENS0_15McrouterOptionsERKSt6vectorIPN5folly9EventBaseESaIS7_EEENUlvE_clEv @ 0x490dca facebook::memcache::mcrouter::McrouterManager::mcrouterGetCreate() @ 0x483f87 facebook::memcache::mcrouter::McrouterInstance::init() @ 0x434fa5 facebook::memcache::mcrouter::runServer() @ 0x423057 main @ 0x7f2734e297ed __libc_start_main @ 0x425ced (unknown) Aborted

panchenji avatar Nov 10 '16 02:11 panchenji

Hi @panchenji, were you ever able to resolve your issue or at least find more information on what the issue could be?

jmswen avatar Dec 22 '16 05:12 jmswen

I'm seeing the same thing in master still. Anyone come across a fix for this yet?

bmorton avatar Mar 01 '17 22:03 bmorton

This bug report makes it seem like its a bug in GCC 4.8.1, which is the only GCC 4.8 package available for Ubuntu 12.04 as far as I can find. I tried getting GCC 4.8.5 working on 12.04, but gave up after dependency hell.

If anyone knows an easy way to get a version of GCC 4.8 newer than 4.8.1 on 12.04 easily, I'm happy to give that a try to see if that fixes this.

bmorton avatar Mar 01 '17 23:03 bmorton