Thanks a lot Dan. Now i have compiled thrift successfully.
On Tue, Aug 31, 2010 at 11:26 PM, Dan Kuebrich <dan.kuebr...@gmail.com>wrote: > Looks like you don't have python-dev installed? > > src/protocol/fastbinary.c:20: > > > > 20: error: Python.h: No such file or directory > > src/protocol/fastbinary.c:21:23: error: cStringIO.h: No such file or > > > > > On Tue, Aug 31, 2010 at 1:42 PM, cassam read <cassamr...@gmail.com> wrote: > > > I am getting this error. Can any one pls help me what is d problem? I > using > > 64bit ubuntu > > ................................................ > > libtool: link: (cd ".libs" && rm -f "libthrift.so" && ln -s > > "libthrift.so.0.0.0" "libthrift.so") > > libtool: link: ar cru .libs/libthrift.a Thrift.o Mutex.o Monitor.o > > PosixThreadFactory.o ThreadManager.o TimerManager.o Util.o > > TBinaryProtocol.o > > TCompactProtocol.o TDebugProtocol.o TDenseProtocol.o TJSONProtocol.o > > TBase64Utils.o TTransportException.o TFDTransport.o TFileTransport.o > > TSimpleFileTransport.o THttpClient.o TSocket.o TSocketPool.o > > TServerSocket.o > > TTransportUtils.o TBufferTransports.o TServer.o TSimpleServer.o > > TThreadPoolServer.o TThreadedServer.o PeekProcessor.o > > libtool: link: ranlib .libs/libthrift.a > > libtool: link: ( cd ".libs" && rm -f "libthrift.la" && ln -s "../ > > libthrift.la" "libthrift.la" ) > > g++ -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I./src -Wall -g -O2 -MT > > Tests.o -MD -MP -MF .deps/Tests.Tpo -c -o Tests.o `test -f > > 'src/concurrency/test/Tests.cpp' || echo > > './'`src/concurrency/test/Tests.cpp > > mv -f .deps/Tests.Tpo .deps/Tests.Po > > /bin/bash ../../libtool --tag=CXX --mode=link g++ -Wall -g -O2 -o > > concurrency_test Tests.o libthrift.la -lrt -lpthread > > libtool: link: g++ -Wall -g -O2 -o .libs/concurrency_test Tests.o > > ./.libs/libthrift.so -lrt -lpthread > > make[3]: Leaving directory `/home/cassam/Desktop/thrift-0.2.0/lib/cpp' > > Making all in java > > make[3]: Entering directory `/home/cassam/Desktop/thrift-0.2.0/lib/java' > > /usr/bin/ant > > Buildfile: /home/cassam/Desktop/thrift-0.2.0/lib/java/build.xml > > > > init: > > [mkdir] Created dir: /home/cassam/Desktop/thrift-0.2.0/lib/java/build > > [mkdir] Created dir: > > /home/cassam/Desktop/thrift-0.2.0/lib/java/build/test > > > > ivy-init-dirs: > > [mkdir] Created dir: > > /home/cassam/Desktop/thrift-0.2.0/lib/java/build/ivy > > [mkdir] Created dir: > > /home/cassam/Desktop/thrift-0.2.0/lib/java/build/ivy/lib > > > > ivy-download: > > [get] Getting: > > > > > http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.0.0-rc2/ivy-2.0.0-rc2.jar > > [get] To: > > /home/cassam/Desktop/thrift-0.2.0/lib/java/build/ivy/ivy-2.0.0-rc2.jar > > > > ivy-probe-antlib: > > > > ivy-init-antlib: > > > > resolve: > > No ivy:settings found for the default reference 'ivy.instance'. A > default > > instance will be used > > no settings file found, using default... > > [ivy:retrieve] :: Ivy 2.0.0-rc2 - 20081028224207 :: > > http://ant.apache.org/ivy/ :: > > :: loading settings :: url = > > > > > jar:file:/home/cassam/Desktop/thrift-0.2.0/lib/java/build/ivy/ivy-2.0.0-rc2.jar!/org/apache/ivy/core/settings/ivysettings.xml > > [ivy:retrieve] :: resolving dependencies :: > > jayasoft#hello-ivy;work...@cass101 > > [ivy:retrieve] confs: [default] > > [ivy:retrieve] found org.slf4j#slf4j-api;1.5.8 in public > > [ivy:retrieve] found org.slf4j#slf4j-simple;1.5.8 in public > > [ivy:retrieve] found commons-lang#commons-lang;2.4 in public > > [ivy:retrieve] :: resolution report :: resolve 569ms :: artifacts dl 23ms > > --------------------------------------------------------------------- > > | | modules || artifacts | > > | conf | number| search|dwnlded|evicted|| number|dwnlded| > > --------------------------------------------------------------------- > > | default | 3 | 0 | 0 | 0 || 3 | 0 | > > --------------------------------------------------------------------- > > [ivy:retrieve] :: retrieving :: jayasoft#hello-ivy > > [ivy:retrieve] confs: [default] > > [ivy:retrieve] 3 artifacts copied, 0 already retrieved (285kB/24ms) > > > > compile: > > [javac] /home/cassam/Desktop/thrift-0.2.0/lib/java/build.xml:114: > > warning: 'includeantruntime' was not set, defaulting to > > build.sysclasspath=last; set to false for repeatable builds > > [javac] Compiling 57 source files to > > /home/cassam/Desktop/thrift-0.2.0/lib/java/build > > [javac] Note: > > > > > /home/cassam/Desktop/thrift-0.2.0/lib/java/src/org/apache/thrift/TUnion.java > > uses or overrides a deprecated API. > > [javac] Note: Recompile with -Xlint:deprecation for details. > > [javac] Note: Some input files use unchecked or unsafe operations. > > [javac] Note: Recompile with -Xlint:unchecked for details. > > > > dist: > > [mkdir] Created dir: > > /home/cassam/Desktop/thrift-0.2.0/lib/java/build/META-INF > > [copy] Copying 1 file to > > /home/cassam/Desktop/thrift-0.2.0/lib/java/build/META-INF > > [copy] Copying 1 file to > > /home/cassam/Desktop/thrift-0.2.0/lib/java/build/META-INF > > [jar] Building jar: > > /home/cassam/Desktop/thrift-0.2.0/lib/java/libthrift.jar > > > > BUILD SUCCESSFUL > > Total time: 28 seconds > > make[3]: Leaving directory `/home/cassam/Desktop/thrift-0.2.0/lib/java' > > Making all in py > > make[3]: Entering directory `/home/cassam/Desktop/thrift-0.2.0/lib/py' > > /usr/bin/python setup.py build > > running build > > running build_py > > creating build > > creating build/lib.linux-x86_64-2.6 > > creating build/lib.linux-x86_64-2.6/thrift > > copying src/TSCons.py -> build/lib.linux-x86_64-2.6/thrift > > copying src/__init__.py -> build/lib.linux-x86_64-2.6/thrift > > copying src/Thrift.py -> build/lib.linux-x86_64-2.6/thrift > > creating build/lib.linux-x86_64-2.6/thrift/protocol > > copying src/protocol/TBinaryProtocol.py -> > > build/lib.linux-x86_64-2.6/thrift/protocol > > copying src/protocol/TProtocol.py -> > > build/lib.linux-x86_64-2.6/thrift/protocol > > copying src/protocol/__init__.py -> > > build/lib.linux-x86_64-2.6/thrift/protocol > > creating build/lib.linux-x86_64-2.6/thrift/transport > > copying src/transport/TTwisted.py -> > > build/lib.linux-x86_64-2.6/thrift/transport > > copying src/transport/THttpClient.py -> > > build/lib.linux-x86_64-2.6/thrift/transport > > copying src/transport/TSocket.py -> > > build/lib.linux-x86_64-2.6/thrift/transport > > copying src/transport/TTransport.py -> > > build/lib.linux-x86_64-2.6/thrift/transport > > copying src/transport/__init__.py -> > > build/lib.linux-x86_64-2.6/thrift/transport > > creating build/lib.linux-x86_64-2.6/thrift/server > > copying src/server/THttpServer.py -> > > build/lib.linux-x86_64-2.6/thrift/server > > copying src/server/TServer.py -> build/lib.linux-x86_64-2.6/thrift/server > > copying src/server/TNonblockingServer.py -> > > build/lib.linux-x86_64-2.6/thrift/server > > copying src/server/__init__.py -> > build/lib.linux-x86_64-2.6/thrift/server > > running build_ext > > building 'thrift.protocol.fastbinary' extension > > creating build/temp.linux-x86_64-2.6 > > creating build/temp.linux-x86_64-2.6/src > > creating build/temp.linux-x86_64-2.6/src/protocol > > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > > -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c > > src/protocol/fastbinary.c -o > > build/temp.linux-x86_64-2.6/src/protocol/fastbinary.o > > src/protocol/fastbinary.c:20:20: error: Python.h: No such file or > directory > > src/protocol/fastbinary.c:21:23: error: cStringIO.h: No such file or > > directory > > src/protocol/fastbinary.c:123: error: expected specifier-qualifier-list > > before ‘PyObject’ > > src/protocol/fastbinary.c:133: error: expected specifier-qualifier-list > > before ‘PyObject’ > > src/protocol/fastbinary.c:142: error: expected specifier-qualifier-list > > before ‘PyObject’ > > src/protocol/fastbinary.c:153: error: expected specifier-qualifier-list > > before ‘PyObject’ > > src/protocol/fastbinary.c:163: error: expected specifier-qualifier-list > > before ‘PyObject’ > > src/protocol/fastbinary.c:168: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or > > ‘__attribute__’ before ‘*’ token > > src/protocol/fastbinary.c:170: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or > > ‘__attribute__’ before ‘*’ token > > src/protocol/fastbinary.c: In function ‘check_ssize_t_32’: > > src/protocol/fastbinary.c:175: warning: implicit declaration of function > > ‘PyErr_Occurred’ > > src/protocol/fastbinary.c:179: warning: implicit declaration of function > > ‘PyErr_SetString’ > > src/protocol/fastbinary.c:179: error: ‘PyExc_OverflowError’ undeclared > > (first use in this function) > > src/protocol/fastbinary.c:179: error: (Each undeclared identifier is > > reported only once > > src/protocol/fastbinary.c:179: error: for each function it appears in.) > > src/protocol/fastbinary.c: At top level: > > src/protocol/fastbinary.c:186: error: expected ‘)’ before ‘*’ token > > src/protocol/fastbinary.c:205: error: expected declaration specifiers or > > ‘...’ before ‘PyObject’ > > src/protocol/fastbinary.c: In function ‘parse_set_list_args’: > > src/protocol/fastbinary.c:206: warning: implicit declaration of function > > ‘PyTuple_Size’ > > src/protocol/fastbinary.c:206: error: ‘typeargs’ undeclared (first use in > > this function) > > src/protocol/fastbinary.c:207: error: ‘PyExc_TypeError’ undeclared (first > > use in this function) > > src/protocol/fastbinary.c:211: warning: implicit declaration of function > > ‘PyInt_AsLong’ > > src/protocol/fastbinary.c:211: warning: implicit declaration of function > > ‘PyTuple_GET_ITEM’ > > src/protocol/fastbinary.c:216: error: ‘SetListTypeArgs’ has no member > named > > ‘typeargs’ > > src/protocol/fastbinary.c: At top level: > > src/protocol/fastbinary.c:222: error: expected declaration specifiers or > > ‘...’ before ‘PyObject’ > > src/protocol/fastbinary.c: In function ‘parse_map_args’: > > src/protocol/fastbinary.c:223: error: ‘typeargs’ undeclared (first use in > > this function) > > src/protocol/fastbinary.c:224: error: ‘PyExc_TypeError’ undeclared (first > > use in this function) > > src/protocol/fastbinary.c:238: error: ‘MapTypeArgs’ has no member named > > ‘ktypeargs’ > > src/protocol/fastbinary.c:239: error: ‘MapTypeArgs’ has no member named > > ‘vtypeargs’ > > src/protocol/fastbinary.c: At top level: > > src/protocol/fastbinary.c:245: error: expected declaration specifiers or > > ‘...’ before ‘PyObject’ > > src/protocol/fastbinary.c: In function ‘parse_struct_args’: > > src/protocol/fastbinary.c:246: error: ‘typeargs’ undeclared (first use in > > this function) > > src/protocol/fastbinary.c:247: error: ‘PyExc_TypeError’ undeclared (first > > use in this function) > > src/protocol/fastbinary.c:251: error: ‘StructTypeArgs’ has no member > named > > ‘klass’ > > src/protocol/fastbinary.c:252: error: ‘StructTypeArgs’ has no member > named > > ‘spec’ > > src/protocol/fastbinary.c: At top level: > > src/protocol/fastbinary.c:258: error: expected declaration specifiers or > > ‘...’ before ‘PyObject’ > > src/protocol/fastbinary.c: In function ‘parse_struct_item_spec’: > > src/protocol/fastbinary.c:261: error: ‘spec_tuple’ undeclared (first use > in > > this function) > > src/protocol/fastbinary.c:262: error: ‘PyExc_TypeError’ undeclared (first > > use in this function) > > src/protocol/fastbinary.c:276: error: ‘StructItemSpec’ has no member > named > > ‘attrname’ > > src/protocol/fastbinary.c:277: error: ‘StructItemSpec’ has no member > named > > ‘typeargs’ > > src/protocol/fastbinary.c:278: error: ‘StructItemSpec’ has no member > named > > ‘defval’ > > src/protocol/fastbinary.c: At top level: > > src/protocol/fastbinary.c:289: error: expected ‘)’ before ‘*’ token > > src/protocol/fastbinary.c:294: error: expected ‘)’ before ‘*’ token > > src/protocol/fastbinary.c:299: error: expected ‘)’ before ‘*’ token > > src/protocol/fastbinary.c:304: error: expected ‘)’ before ‘*’ token > > src/protocol/fastbinary.c:309: error: expected ‘)’ before ‘*’ token > > src/protocol/fastbinary.c:323: error: expected ‘)’ before ‘*’ token > > src/protocol/fastbinary.c:569: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or > > ‘__attribute__’ before ‘*’ token > > src/protocol/fastbinary.c: In function ‘free_decodebuf’: > > src/protocol/fastbinary.c:598: warning: implicit declaration of function > > ‘Py_XDECREF’ > > src/protocol/fastbinary.c:598: error: ‘DecodeBuffer’ has no member named > > ‘stringiobuf’ > > src/protocol/fastbinary.c:599: error: ‘DecodeBuffer’ has no member named > > ‘refill_callable’ > > src/protocol/fastbinary.c: At top level: > > src/protocol/fastbinary.c:603: error: expected declaration specifiers or > > ‘...’ before ‘PyObject’ > > src/protocol/fastbinary.c: In function ‘decode_buffer_from_obj’: > > src/protocol/fastbinary.c:604: error: ‘DecodeBuffer’ has no member named > > ‘stringiobuf’ > > src/protocol/fastbinary.c:604: warning: implicit declaration of function > > ‘PyObject_GetAttr’ > > src/protocol/fastbinary.c:604: error: ‘obj’ undeclared (first use in this > > function) > > src/protocol/fastbinary.c:604: error: ‘_intern_cstringio_buf’ undeclared > > (first use in this function) > > src/protocol/fastbinary.c:605: error: ‘DecodeBuffer’ has no member named > > ‘stringiobuf’ > > src/protocol/fastbinary.c:609: warning: implicit declaration of function > > ‘PycStringIO_InputCheck’ > > src/protocol/fastbinary.c:609: error: ‘DecodeBuffer’ has no member named > > ‘stringiobuf’ > > src/protocol/fastbinary.c:611: error: ‘PyExc_TypeError’ undeclared (first > > use in this function) > > src/protocol/fastbinary.c:615: error: ‘DecodeBuffer’ has no member named > > ‘refill_callable’ > > src/protocol/fastbinary.c:615: error: ‘_intern_cstringio_refill’ > undeclared > > (first use in this function) > > src/protocol/fastbinary.c:617: error: ‘DecodeBuffer’ has no member named > > ‘refill_callable’ > > src/protocol/fastbinary.c:622: warning: implicit declaration of function > > ‘PyCallable_Check’ > > src/protocol/fastbinary.c:622: error: ‘DecodeBuffer’ has no member named > > ‘refill_callable’ > > src/protocol/fastbinary.c: In function ‘readBytes’: > > src/protocol/fastbinary.c:638: error: ‘PycStringIO’ undeclared (first use > > in > > this function) > > src/protocol/fastbinary.c:638: error: ‘DecodeBuffer’ has no member named > > ‘stringiobuf’ > > src/protocol/fastbinary.c:645: error: ‘PyObject’ undeclared (first use in > > this function) > > src/protocol/fastbinary.c:645: error: ‘newiobuf’ undeclared (first use in > > this function) > > src/protocol/fastbinary.c:648: warning: implicit declaration of function > > ‘PyObject_CallFunction’ > > src/protocol/fastbinary.c:649: error: ‘DecodeBuffer’ has no member named > > ‘refill_callable’ > > src/protocol/fastbinary.c:649: error: ‘NULL’ undeclared (first use in > this > > function) > > src/protocol/fastbinary.c:655: warning: implicit declaration of function > > ‘Py_CLEAR’ > > src/protocol/fastbinary.c:655: error: ‘DecodeBuffer’ has no member named > > ‘stringiobuf’ > > src/protocol/fastbinary.c:656: error: ‘DecodeBuffer’ has no member named > > ‘stringiobuf’ > > src/protocol/fastbinary.c:658: error: ‘DecodeBuffer’ has no member named > > ‘stringiobuf’ > > src/protocol/fastbinary.c:666: error: ‘PyExc_TypeError’ undeclared (first > > use in this function) > > src/protocol/fastbinary.c: In function ‘checkTypeByte’: > > src/protocol/fastbinary.c:730: error: ‘PyExc_TypeError’ undeclared (first > > use in this function) > > src/protocol/fastbinary.c: In function ‘skip’: > > src/protocol/fastbinary.c:842: error: ‘PyExc_TypeError’ undeclared (first > > use in this function) > > src/protocol/fastbinary.c: At top level: > > src/protocol/fastbinary.c:855: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or > > ‘__attribute__’ before ‘*’ token > > src/protocol/fastbinary.c:859: error: expected declaration specifiers or > > ‘...’ before ‘PyObject’ > > src/protocol/fastbinary.c:859: error: expected declaration specifiers or > > ‘...’ before ‘PyObject’ > > src/protocol/fastbinary.c: In function ‘decode_struct’: > > src/protocol/fastbinary.c:860: error: ‘spec_seq’ undeclared (first use in > > this function) > > src/protocol/fastbinary.c:868: error: ‘PyObject’ undeclared (first use in > > this function) > > src/protocol/fastbinary.c:868: error: ‘item_spec’ undeclared (first use > in > > this function) > > src/protocol/fastbinary.c:869: error: ‘fieldval’ undeclared (first use in > > this function) > > src/protocol/fastbinary.c:869: error: ‘NULL’ undeclared (first use in > this > > function) > > src/protocol/fastbinary.c:886: error: ‘Py_None’ undeclared (first use in > > this function) > > src/protocol/fastbinary.c:897: error: too many arguments to function > > ‘parse_struct_item_spec’ > > src/protocol/fastbinary.c:902: error: ‘PyExc_TypeError’ undeclared (first > > use in this function) > > src/protocol/fastbinary.c:909: warning: implicit declaration of function > > ‘decode_val’ > > src/protocol/fastbinary.c:909: error: ‘StructItemSpec’ has no member > named > > ‘typeargs’ > > src/protocol/fastbinary.c:914: warning: implicit declaration of function > > ‘PyObject_SetAttr’ > > src/protocol/fastbinary.c:914: error: ‘output’ undeclared (first use in > > this > > function) > > src/protocol/fastbinary.c:914: error: ‘StructItemSpec’ has no member > named > > ‘attrname’ > > src/protocol/fastbinary.c:915: warning: implicit declaration of function > > ‘Py_DECREF’ > > src/protocol/fastbinary.c: At top level: > > src/protocol/fastbinary.c:927: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or > > ‘__attribute__’ before ‘*’ token > > src/protocol/fastbinary.c:1144: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or > > ‘__attribute__’ before ‘*’ token > > src/protocol/fastbinary.c:1179: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or > > ‘__attribute__’ before ‘ThriftFastBinaryMethods’ > > src/protocol/fastbinary.c:1188: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or > > ‘__attribute__’ before ‘initfastbinary’ > > error: command 'gcc' failed with exit status 1 > > make[3]: *** [all-local] Error 1 > > make[3]: Leaving directory `/home/cassam/Desktop/thrift-0.2.0/lib/py' > > make[2]: *** [all-recursive] Error 1 > > make[2]: Leaving directory `/home/cassam/Desktop/thrift-0.2.0/lib' > > make[1]: *** [all-recursive] Error 1 > > make[1]: Leaving directory `/home/cassam/Desktop/thrift-0.2.0' > > make: *** [all] Error 2 > > >