Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Commit

Permalink
Fix compilation issue caused by recent thrift changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
yliang6 committed Oct 15, 2010
1 parent fe63cb0 commit 31fc444
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
14 changes: 3 additions & 11 deletions README
@@ -1,6 +1,6 @@
Scribe

Last Modified: 2010-Jun-18
Last Modified: 2010-Oct-14


Introduction
Expand Down Expand Up @@ -65,8 +65,8 @@ Requirements

[libevent] Event Notification library
[boost] Boost C++ library (version 1.36 or later)
[thrift] Thrift framework
[fb303] Facebook Bassline (included in thrift/contrib/fb303/)
[thrift] Thrift framework (version 0.5.0 or later)
[fb303] Facebook Bassline (included in contrib/fb303/)
fb303 r697294 or later is required.
[hadoop] optional. version 0.19.1 or higher (http://hadoop.apache.org)

Expand All @@ -82,14 +82,6 @@ Helpful tips:
scribe or fb303, try setting the environment variable PYTHONPATH to the
location of the installed packages. This path gets output during
'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
=========
Expand Down
8 changes: 7 additions & 1 deletion contrib/fb303/cpp/Makefile.am
Expand Up @@ -74,7 +74,13 @@ 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),$(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

Expand Down
2 changes: 1 addition & 1 deletion if/bucketupdater.thrift
@@ -1,4 +1,4 @@
#!/usr/local/bin/thrift --cpp --php
#!/usr/local/bin/thrift --gen cpp:pure_enums --gen php

## Copyright (c) 2009- Facebook
##
Expand Down
4 changes: 2 additions & 2 deletions if/scribe.thrift
@@ -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
##
Expand All @@ -17,7 +17,7 @@
## See accompanying file LICENSE or visit the Scribe site at:
## http://developers.facebook.com/scribe/

include "fb303.thrift"
include "fb303/if/fb303.thrift"

namespace cpp scribe.thrift
namespace java scribe.thrift
Expand Down
10 changes: 6 additions & 4 deletions src/Makefile.am
Expand Up @@ -33,6 +33,8 @@ all:
# hadoop_home
#
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

# User defined conditionals and conditonal statements set up in configure.ac.
Expand All @@ -51,7 +53,7 @@ endif


# 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
if USE_SCRIBE_HDFS
EXTERNAL_LIBS += -lhdfs -ljvm
Expand All @@ -63,7 +65,7 @@ endif
# 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$(fb303_home)/cpp/gen-cpp
AM_CPPFLAGS += -I$(fb303_home)/include/thrift/fb303
AM_CPPFLAGS += -I$(hadoop_home)/include
AM_CPPFLAGS += $(BOOST_CPPFLAGS)
AM_CPPFLAGS += $(THRIFT_CPPFLAGS)
Expand Down Expand Up @@ -114,8 +116,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)/if/ --gen cpp --gen py --gen php --gen java))
$(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/scribe.thrift,$(THRIFT_OPTS)))
$(eval $(call thrift_template,.,$(srcdir)/../if/bucketupdater.thrift,$(THRIFT_OPTS)))

if FACEBOOK
$(eval $(call thrift_template,.,$(smc_home)/if/ServiceManager.thrift,--gen cpp))
Expand Down

0 comments on commit 31fc444

Please sign in to comment.