Permalink
Browse files

Fix compilation issue caused by recent thrift changes.

  • Loading branch information...
yliang6 committed Oct 14, 2010
1 parent fe63cb0 commit 31fc4441383946740fc85d427f0024313652401e
Showing with 19 additions and 19 deletions.
  1. +3 −11 README
  2. +7 −1 contrib/fb303/cpp/Makefile.am
  3. +1 −1 if/bucketupdater.thrift
  4. +2 −2 if/scribe.thrift
  5. +6 −4 src/Makefile.am
View
14 README
@@ -1,6 +1,6 @@
Scribe Scribe
Last Modified: 2010-Jun-18 Last Modified: 2010-Oct-14
Introduction Introduction
@@ -65,8 +65,8 @@ Requirements
[libevent] Event Notification library [libevent] Event Notification library
[boost] Boost C++ library (version 1.36 or later) [boost] Boost C++ library (version 1.36 or later)
[thrift] Thrift framework [thrift] Thrift framework (version 0.5.0 or later)
[fb303] Facebook Bassline (included in thrift/contrib/fb303/) [fb303] Facebook Bassline (included in contrib/fb303/)
fb303 r697294 or later is required. fb303 r697294 or later is required.
[hadoop] optional. version 0.19.1 or higher (http://hadoop.apache.org) [hadoop] optional. version 0.19.1 or higher (http://hadoop.apache.org)
@@ -82,14 +82,6 @@ Helpful tips:
scribe or fb303, try setting the environment variable PYTHONPATH to the scribe or fb303, try setting the environment variable PYTHONPATH to the
location of the installed packages. This path gets output during location of the installed packages. This path gets output during
'make install'. (Eg: PYTHONPATH='/usr/lib/python2.5/site-packages'). 'make install'. (Eg: PYTHONPATH='/usr/lib/python2.5/site-packages').
-The current version of scribe_cat does not work with the stable version of
thrift, as of 5th March 2010. To get it to work change
log_entry = scribe.LogEntry(category=category, message=sys.stdin.read())
to
log_entry = scribe.LogEntry(dict(category=category, message=sys.stdin.read()))
The current scribe_cat works with latest thrift code if you clone their dev
repository.
Resources Resources
========= =========
@@ -74,7 +74,13 @@ endif
# Set up Thrift specific activity here. # Set up Thrift specific activity here.
# We assume that a <name>+types.cpp will always be built from <name>.thrift. # We assume that a <name>+types.cpp will always be built from <name>.thrift.
$(eval $(call thrift_template,$(srcdir),$(IFDIR)/fb303.thrift,--gen cpp )) $(eval $(call thrift_template,$(srcdir),$(IFDIR)/fb303.thrift,--gen cpp:pure_enums))
include_fb303dir = $(includedir)/thrift/fb303
include_fb303_HEADERS = FacebookBase.h ServiceTracker.h gen-cpp/FacebookService.h gen-cpp/fb303_constants.h gen-cpp/fb303_types.h
include_fb303ifdir = $(prefix)/share/fb303/if
include_fb303if_HEADERS = ../if/fb303.thrift
BUILT_SOURCES = fb303style BUILT_SOURCES = fb303style
View
@@ -1,4 +1,4 @@
#!/usr/local/bin/thrift --cpp --php #!/usr/local/bin/thrift --gen cpp:pure_enums --gen php
## Copyright (c) 2009- Facebook ## Copyright (c) 2009- Facebook
## ##
View
@@ -1,4 +1,4 @@
#!/usr/local/bin/thrift --cpp --php #!/usr/local/bin/thrift --gen cpp:pure_enums --gen php
## Copyright (c) 2007-2008 Facebook ## Copyright (c) 2007-2008 Facebook
## ##
@@ -17,7 +17,7 @@
## See accompanying file LICENSE or visit the Scribe site at: ## See accompanying file LICENSE or visit the Scribe site at:
## http://developers.facebook.com/scribe/ ## http://developers.facebook.com/scribe/
include "fb303.thrift" include "fb303/if/fb303.thrift"
namespace cpp scribe.thrift namespace cpp scribe.thrift
namespace java scribe.thrift namespace java scribe.thrift
View
@@ -33,6 +33,8 @@ all:
# hadoop_home # hadoop_home
# #
THRIFT = $(thrift_home)/bin/thrift THRIFT = $(thrift_home)/bin/thrift
THRIFT_INCLUDES = -I $(fb303_home)/share/
THRIFT_OPTS = $(THRIFT_INCLUDES) --gen cpp:pure_enums --gen py --gen php --gen java
THRIFT_CPPFLAGS = -I$(thrift_home)/include -I$(thrift_home)/include/thrift THRIFT_CPPFLAGS = -I$(thrift_home)/include -I$(thrift_home)/include/thrift
# User defined conditionals and conditonal statements set up in configure.ac. # User defined conditionals and conditonal statements set up in configure.ac.
@@ -51,7 +53,7 @@ endif
# Set libraries external to this component. # Set libraries external to this component.
EXTERNAL_LIBS = -L$(thrift_home)/lib -L$(fb303_home)/cpp -L$(hadoop_home)/lib -lfb303 -lthrift -lthriftnb EXTERNAL_LIBS = -L$(thrift_home)/lib -L$(fb303_home)/lib -L$(hadoop_home)/lib -lfb303 -lthrift -lthriftnb
EXTERNAL_LIBS += -levent -lpthread EXTERNAL_LIBS += -levent -lpthread
if USE_SCRIBE_HDFS if USE_SCRIBE_HDFS
EXTERNAL_LIBS += -lhdfs -ljvm EXTERNAL_LIBS += -lhdfs -ljvm
@@ -63,7 +65,7 @@ endif
# USE flags AM_CXXFLAGS, AM_CFLAGS, AM_CPPFLAGS, AM_LDFLAGS, LDADD in this section. # USE flags AM_CXXFLAGS, AM_CFLAGS, AM_CPPFLAGS, AM_LDFLAGS, LDADD in this section.
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/contrib AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/contrib
AM_CPPFLAGS += -I$(fb303_home)/cpp/gen-cpp AM_CPPFLAGS += -I$(fb303_home)/include/thrift/fb303
AM_CPPFLAGS += -I$(hadoop_home)/include AM_CPPFLAGS += -I$(hadoop_home)/include
AM_CPPFLAGS += $(BOOST_CPPFLAGS) AM_CPPFLAGS += $(BOOST_CPPFLAGS)
AM_CPPFLAGS += $(THRIFT_CPPFLAGS) AM_CPPFLAGS += $(THRIFT_CPPFLAGS)
@@ -114,8 +116,8 @@ endif
# Set up Thrift specific activity here. # Set up Thrift specific activity here.
# We assume that a <name>+types.cpp will always be built from <name>.thrift. # 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)/if/ --gen cpp --gen py --gen php --gen java)) $(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift,$(THRIFT_OPTS)))
$(eval $(call thrift_template,.,$(srcdir)/../if/bucketupdater.thrift, -I $(fb303_home)/if/ --gen cpp --gen py --gen php --gen java)) $(eval $(call thrift_template,.,$(srcdir)/../if/bucketupdater.thrift,$(THRIFT_OPTS)))
if FACEBOOK if FACEBOOK
$(eval $(call thrift_template,.,$(smc_home)/if/ServiceManager.thrift,--gen cpp)) $(eval $(call thrift_template,.,$(smc_home)/if/ServiceManager.thrift,--gen cpp))

0 comments on commit 31fc444

Please sign in to comment.