Having trouble compiling scribe

181 views
Skip to first unread message

Nick Le Mouton

unread,
Oct 10, 2010, 11:38:46 PM10/10/10
to Scribe Server
I've been trying to compile and use scribe with the latest stable
versions of thrift, fb303 and boost. Whenever I try to compile it I
get these messages:

[root@wwwdev2 facebook-scribe-3f14e93]# make
make all-recursive
make[1]: Entering directory `/usr/src/facebook-scribe-3f14e93'
Making all in .
make[2]: Entering directory `/usr/src/facebook-scribe-3f14e93'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/usr/src/facebook-scribe-3f14e93'
Making all in src
make[2]: Entering directory `/usr/src/facebook-scribe-3f14e93/src'
/usr/local/bin/thrift -o . -I /usr/local/share/ --cpp --py --php --
java ../if/scribe.thrift
[WARNING:arguments:1] -cpp is deprecated. Use --gen cpp
[WARNING:arguments:1] -java is deprecated. Use --gen java
[WARNING:arguments:1] -py is deprecated. Use --gen py
[WARNING:arguments:1] -php is deprecated. Use --gen php
/usr/local/bin/thrift -o . -I /usr/local/share/ --cpp --py --php --
java ../if/bucketupdater.thrift
[WARNING:arguments:1] -cpp is deprecated. Use --gen cpp
[WARNING:arguments:1] -java is deprecated. Use --gen java
[WARNING:arguments:1] -py is deprecated. Use --gen py
[WARNING:arguments:1] -php is deprecated. Use --gen php
make all-am
make[3]: Entering directory `/usr/src/facebook-scribe-3f14e93/src'
if g++ -DPACKAGE_NAME=\"scribe\" -DPACKAGE_TARNAME=\"scribe\" -
DPACKAGE_VERSION=\"1.5.0\" -DPACKAGE_STRING=\"scribe\ 1.5.0\" -
DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"scribe\" -
DVERSION=\"1.5.0\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -
DHAVE_BOOST_FILESYSTEM=/\*\*/ -I. -I. -I.. -I/usr/local/include -I/
usr/local/include/thrift -I/usr/local/include/thrift -I/usr/local/
include/thrift/fb303 -I/usr/local/include -I/usr/local/include -
Wall -O3 -MT scribe.o -MD -MP -MF ".deps/scribe.Tpo" -c -o scribe.o
`test -f 'gen-cpp/scribe.cpp' || echo './'`gen-cpp/scribe.cpp; \
then mv -f ".deps/scribe.Tpo" ".deps/scribe.Po"; else rm -f
".deps/scribe.Tpo"; exit 1; fi
if g++ -DPACKAGE_NAME=\"scribe\" -DPACKAGE_TARNAME=\"scribe\" -
DPACKAGE_VERSION=\"1.5.0\" -DPACKAGE_STRING=\"scribe\ 1.5.0\" -
DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"scribe\" -
DVERSION=\"1.5.0\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -
DHAVE_BOOST_FILESYSTEM=/\*\*/ -I. -I. -I.. -I/usr/local/include -I/
usr/local/include/thrift -I/usr/local/include/thrift -I/usr/local/
include/thrift/fb303 -I/usr/local/include -I/usr/local/include -
Wall -O3 -MT scribe_types.o -MD -MP -MF ".deps/scribe_types.Tpo" -c -o
scribe_types.o `test -f 'gen-cpp/scribe_types.cpp' || echo './'`gen-
cpp/scribe_types.cpp; \
then mv -f ".deps/scribe_types.Tpo" ".deps/scribe_types.Po";
else rm -f ".deps/scribe_types.Tpo"; exit 1; fi
if g++ -DPACKAGE_NAME=\"scribe\" -DPACKAGE_TARNAME=\"scribe\" -
DPACKAGE_VERSION=\"1.5.0\" -DPACKAGE_STRING=\"scribe\ 1.5.0\" -
DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"scribe\" -
DVERSION=\"1.5.0\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -
DHAVE_BOOST_FILESYSTEM=/\*\*/ -I. -I. -I.. -I/usr/local/include -I/
usr/local/include/thrift -I/usr/local/include/thrift -I/usr/local/
include/thrift/fb303 -I/usr/local/include -I/usr/local/include -
Wall -O3 -MT scribe_constants.o -MD -MP -MF ".deps/
scribe_constants.Tpo" -c -o scribe_constants.o `test -f 'gen-cpp/
scribe_constants.cpp' || echo './'`gen-cpp/scribe_constants.cpp; \
then mv -f ".deps/scribe_constants.Tpo" ".deps/
scribe_constants.Po"; else rm -f ".deps/scribe_constants.Tpo"; exit 1;
fi
rm -f libscribe.a
/usr/bin/ar cru libscribe.a scribe.o scribe_types.o scribe_constants.o
ranlib libscribe.a
if g++ -DPACKAGE_NAME=\"scribe\" -DPACKAGE_TARNAME=\"scribe\" -
DPACKAGE_VERSION=\"1.5.0\" -DPACKAGE_STRING=\"scribe\ 1.5.0\" -
DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"scribe\" -
DVERSION=\"1.5.0\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -
DHAVE_BOOST_FILESYSTEM=/\*\*/ -I. -I. -I.. -I/usr/local/include -I/
usr/local/include/thrift -I/usr/local/include/thrift -I/usr/local/
include/thrift/fb303 -I/usr/local/include -I/usr/local/include -
Wall -O3 -MT BucketStoreMapping.o -MD -MP -MF ".deps/
BucketStoreMapping.Tpo" -c -o BucketStoreMapping.o `test -f 'gen-cpp/
BucketStoreMapping.cpp' || echo './'`gen-cpp/BucketStoreMapping.cpp; \
then mv -f ".deps/BucketStoreMapping.Tpo" ".deps/
BucketStoreMapping.Po"; else rm -f ".deps/BucketStoreMapping.Tpo";
exit 1; fi
if g++ -DPACKAGE_NAME=\"scribe\" -DPACKAGE_TARNAME=\"scribe\" -
DPACKAGE_VERSION=\"1.5.0\" -DPACKAGE_STRING=\"scribe\ 1.5.0\" -
DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"scribe\" -
DVERSION=\"1.5.0\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -
DHAVE_BOOST_FILESYSTEM=/\*\*/ -I. -I. -I.. -I/usr/local/include -I/
usr/local/include/thrift -I/usr/local/include/thrift -I/usr/local/
include/thrift/fb303 -I/usr/local/include -I/usr/local/include -
Wall -O3 -MT bucketupdater_constants.o -MD -MP -MF ".deps/
bucketupdater_constants.Tpo" -c -o bucketupdater_constants.o `test -f
'gen-cpp/bucketupdater_constants.cpp' || echo './'`gen-cpp/
bucketupdater_constants.cpp; \
then mv -f ".deps/bucketupdater_constants.Tpo" ".deps/
bucketupdater_constants.Po"; else rm -f ".deps/
bucketupdater_constants.Tpo"; exit 1; fi
if g++ -DPACKAGE_NAME=\"scribe\" -DPACKAGE_TARNAME=\"scribe\" -
DPACKAGE_VERSION=\"1.5.0\" -DPACKAGE_STRING=\"scribe\ 1.5.0\" -
DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"scribe\" -
DVERSION=\"1.5.0\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -
DHAVE_BOOST_FILESYSTEM=/\*\*/ -I. -I. -I.. -I/usr/local/include -I/
usr/local/include/thrift -I/usr/local/include/thrift -I/usr/local/
include/thrift/fb303 -I/usr/local/include -I/usr/local/include -
Wall -O3 -MT bucketupdater_types.o -MD -MP -MF ".deps/
bucketupdater_types.Tpo" -c -o bucketupdater_types.o `test -f 'gen-cpp/
bucketupdater_types.cpp' || echo './'`gen-cpp/bucketupdater_types.cpp;
\
then mv -f ".deps/bucketupdater_types.Tpo" ".deps/
bucketupdater_types.Po"; else rm -f ".deps/bucketupdater_types.Tpo";
exit 1; fi
rm -f libdynamicbucketupdater.a
/usr/bin/ar cru libdynamicbucketupdater.a BucketStoreMapping.o
bucketupdater_constants.o bucketupdater_types.o
ranlib libdynamicbucketupdater.a
if g++ -DPACKAGE_NAME=\"scribe\" -DPACKAGE_TARNAME=\"scribe\" -
DPACKAGE_VERSION=\"1.5.0\" -DPACKAGE_STRING=\"scribe\ 1.5.0\" -
DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"scribe\" -
DVERSION=\"1.5.0\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -
DHAVE_BOOST_FILESYSTEM=/\*\*/ -I. -I. -I.. -I/usr/local/include -I/
usr/local/include/thrift -I/usr/local/include/thrift -I/usr/local/
include/thrift/fb303 -I/usr/local/include -I/usr/local/include -
Wall -O3 -MT store.o -MD -MP -MF ".deps/store.Tpo" -c -o store.o
store.cpp; \
then mv -f ".deps/store.Tpo" ".deps/store.Po"; else rm -f
".deps/store.Tpo"; exit 1; fi
scribe_server.h:44: error: conflicting return type specified for
âvirtual scribe::thrift::ResultCode scribeHandler::Log(const
std::vector<scribe::thrift::LogEntry,
std::allocator<scribe::thrift::LogEntry> >&)â
../src/gen-cpp/scribe.h:18: error: overriding âvirtual
scribe::thrift::ResultCode::type scribe::thrift::scribeIf::Log(const
std::vector<scribe::thrift::LogEntry,
std::allocator<scribe::thrift::LogEntry> >&)â
store.cpp: In member function âbool
FileStore::writeMessages(boost::shared_ptr<std::vector<boost::shared_ptr<scribe::thrift::LogEntry>,
std::allocator<boost::shared_ptr<scribe::thrift::LogEntry> > > >,
boost::shared_ptr<FileInterface>)â:
store.cpp:862: warning: format â%luâ expects type âlong unsigned intâ,
but argument 5 has type âsize_tâ
store.cpp: In member function âvirtual bool
FileStore::readOldest(boost::shared_ptr<std::vector<boost::shared_ptr<scribe::thrift::LogEntry>,
std::allocator<boost::shared_ptr<scribe::thrift::LogEntry> > > >,
tm*)â:
store.cpp:1012: warning: format â%luâ expects type âlong unsigned
intâ, but argument 5 has type âsize_tâ
store.cpp: In member function âvirtual void
BufferStore::periodicCheck()â:
store.cpp:1593: warning: format â%luâ expects type âlong unsigned
intâ, but argument 5 has type âsize_tâ
store.cpp: In member function âvoid
BufferStore::setNewRetryInterval(bool)â:
store.cpp:1673: warning: comparison between signed and unsigned
integer expressions
store.cpp:1685: warning: comparison between signed and unsigned
integer expressions
store.h: In constructor âNetworkStore::NetworkStore(StoreQueue*, const
std::string&, bool)â:
store.h:407: warning: âNetworkStore::openedâ will be initialized after
store.h:401: warning: âtime_t NetworkStore::lastServiceCheckâ
store.cpp:1735: warning: when initialized here
make[3]: *** [store.o] Error 1
make[3]: Leaving directory `/usr/src/facebook-scribe-3f14e93/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/facebook-scribe-3f14e93/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/facebook-scribe-3f14e93'
make: *** [all] Error 2

This is on CentOS 5.5 32bit

Does anyone have any ideas on what's going wrong?

Thanks
Nick

Ying-Yi Liang

unread,
Oct 11, 2010, 4:24:18 AM10/11/10
to Scribe Server
Hi Nick,

The most recent stable release of thrift (version 0.5.0 released on
10/07/2010) lets go some backward compatibilities. Unfortunately, enum
type generation is one of them. Before the scribe code is fixed, the
temporary workaround is to use thrift-0.4.0 (http://
mirror.cc.columbia.edu/pub/software/apache//incubator/thrift/0.4.0-
incubating/thrift-0.4.0.tar.gz). You would need to rebuild thrift,
fb303 and scribe all the way to get it to work.


Best,
Ying-Yi
> FileStore::writeMessages(boost::shared_ptr<std::vector<boost::shared_ptr<sc ribe::thrift::LogEntry>,
> std::allocator<boost::shared_ptr<scribe::thrift::LogEntry> > > >,
> boost::shared_ptr<FileInterface>)â:
> store.cpp:862: warning: format â%luâ expects type âlong unsigned intâ,
> but argument 5 has type âsize_tâ
> store.cpp: In member function âvirtual bool
> FileStore::readOldest(boost::shared_ptr<std::vector<boost::shared_ptr<scrib e::thrift::LogEntry>,

Nick Le Mouton

unread,
Oct 11, 2010, 5:03:00 PM10/11/10
to Scribe Server
Thanks Ying-Yi, that got it.

Nick
> ...
>
> read more »

Ying-Yi Liang

unread,
Oct 14, 2010, 8:06:36 PM10/14/10
to Scribe Server
Just realized that the new thrift has a "pure_enum" option when
generating cpp files. So another workaround is to apply this patch:

===================== CODE BEGINS ============================
diff --git a/src/Makefile.am b/src/Makefile.am
index 7a6ce48..e5c07c4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -112,8 +112,8 @@ endif
# Set up Thrift specific activity here.
# We assume that a <name>+types.cpp will always be built from
<name>.thrift.

-$(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift, -I $
(fb303_home)/share/ --cpp --py --php --java))
-$(eval $(call thrift_template,.,$(srcdir)/../if/bucketupdater.thrift,
-I $(fb303_home)/share/ --cpp --py --php --java))
+$(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift, -I $
(fb303_home)/share/ --gen cpp:pure_enums --gen py --gen php --gen
java))
+$(eval $(call thrift_template,.,$(srcdir)/../if/bucketupdater.thrift,
-I $(fb303_home)/share/ --gen cpp:pure_enums --gen py --gen php --gen
java))

if FACEBOOK
$(eval $(call thrift_template,.,$(smc_home)/if/
ServiceManager.thrift,--cpp))
========================= CODE ENDS ==========================

Ying-Yi
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages