thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Valderrama <>
Subject fb303 build error with Thrift 0.6.0
Date Wed, 09 Feb 2011 12:22:36 GMT
Hi folks, I just tried to build fb303 as included with Thrift 0.6.0.  I'm
running 64-bit Ubuntu 10.04.

Here's a snippet from the 'make' output:

g++ -DPACKAGE_NAME=\"libfb303\" -DPACKAGE_TARNAME=\"libfb303\"
-DPACKAGE_VERSION=\"20080209\" -DPACKAGE_STRING=\"libfb303\ 20080209\"
-Igen-cpp -I/usr/local/include/thrift -I/usr/include     -Wall -O3 -MT
fb303_types.o -MD -MP -MF .deps/fb303_types.Tpo -c -o fb303_types.o `test -f
'gen-cpp/fb303_types.cpp' || echo './'`gen-cpp/fb303_types.cpp
gen-cpp/fb303_types.cpp:11: error: ‘fb_status’ is not a class or namespace
gen-cpp/fb303_types.cpp:12: error: ‘fb_status’ is not a class or namespace
gen-cpp/fb303_types.cpp:13: error: ‘fb_status’ is not a class or namespace
gen-cpp/fb303_types.cpp:14: error: ‘fb_status’ is not a class or namespace
gen-cpp/fb303_types.cpp:15: error: ‘fb_status’ is not a class or namespace
gen-cpp/fb303_types.cpp:16: error: ‘fb_status’ is not a class or namespace
make[3]: *** [fb303_types.o] Error 1
make[3]: Leaving directory

It seems that Thrift has generated c++ code which is accessing enum values
as if they were static members of a class (or more likely enum constants
inside a wrapper class).  Here's the patch to the generated code which lets
it compile successfully:

$ diff cpp/gen-cpp/fb303_types.cpp{.old,} -u
--- cpp/gen-cpp/fb303_types.cpp.old    2011-02-09 13:13:32.616740084 +0100
+++ cpp/gen-cpp/fb303_types.cpp    2011-02-09 13:13:56.956744959 +0100
@@ -8,12 +8,12 @@
 namespace facebook { namespace fb303 {

 int _kfb_statusValues[] = {
-  fb_status::DEAD,
-  fb_status::STARTING,
-  fb_status::ALIVE,
-  fb_status::STOPPING,
-  fb_status::STOPPED,
-  fb_status::WARNING
+  DEAD,
 const char* _kfb_statusNames[] = {

Any suggestions?  I'm not familiar with the Thrift/fb303 codebase at all.
Is this somehow a configuration problem I can fix, or should I file a bug


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message