No Roger, I just downloaded the thrift libraries from the website [1] and was writing some code that includes those thrift c++ libraries. While compiling my file, I got error in the included c++ thrift libraries realted to forward declaration.
Do I need to run these commands (I downloaded a tar from the website)? sh bootstrap.sh ./configure make [1]: https://thrift.apache.org/download Thanks, Nadeem. On Wed, Jul 9, 2014 at 4:36 PM, Roger Meier <[email protected]> wrote: > Hi Anjum > > did you ran this on Thrift source: > sh bootstrap.sh > ./configure > make > > is airavata-cpp-sdk the thrift source? > > -roger > > > Quoting Nadeem Anjum <[email protected]>: > > Hello, >> >> I am a GSoC Student with Apache Airavata. I am using Thrift C++ libraries >> in my project. I am using the following command for compilation: >> >> gcc -I/home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/ -Wall >> -DHAVE_INTTYPES_H >> -DHAVE_NETINET_IN_H $(INC) pkg-config --cflags glib-2.0 >> createProject.cpp pkg-config >> --libs glib-2.0 >> >> I am currently stuck at the following errors with TSocket.cpp. Any >> suggestions on how to fix these will be helpful. >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:187:25: >> error: invalid use of incomplete type 'struct >> apache::thrift::transport::addrinfo' >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.h:245:30: >> error: forward declaration of 'struct apache::thrift::transport:: >> addrinfo' >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:187:41: >> error: invalid use of incomplete type 'struct >> apache::thrift::transport::addrinfo' >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.h:245:30: >> error: forward declaration of 'struct apache::thrift::transport:: >> addrinfo' >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:187:59: >> error: invalid use of incomplete type 'struct >> apache::thrift::transport::addrinfo' >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.h:245:30: >> error: forward declaration of 'struct apache::thrift::transport:: >> addrinfo' >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:243:24: >> error: aggregate >> 'apache::thrift::transport::TSocket::openConnection( >> apache::thrift::transport::addrinfo*)::sockaddr_un >> address' has incomplete type and cannot be defined >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:263:31: >> error: invalid use of incomplete type 'struct >> apache::thrift::transport::addrinfo' >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.h:245:30: >> error: forward declaration of 'struct apache::thrift::transport:: >> addrinfo' >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:263:62: >> error: invalid use of incomplete type 'struct >> apache::thrift::transport::addrinfo' >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.h:245:30: >> error: forward declaration of 'struct apache::thrift::transport:: >> addrinfo' >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:278:29: >> error: elements of array >> 'apache::thrift::transport::TSocket::openConnection( >> apache::thrift::transport::addrinfo*)::pollfd >> fds [1]' have incomplete type >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:278:29: >> error: storage size of 'fds' isn't known >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:281:19: >> error: 'POLLOUT' was not declared in this scope >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:282:41: >> error: 'poll' was not declared in this scope >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:318:25: >> error: invalid use of incomplete type 'struct >> apache::thrift::transport::addrinfo' >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.h:245:30: >> error: forward declaration of 'struct apache::thrift::transport:: >> addrinfo' >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:318:62: >> error: invalid use of incomplete type 'struct >> apache::thrift::transport::addrinfo' >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.h:245:30: >> error: forward declaration of 'struct apache::thrift::transport:: >> addrinfo' >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp: >> In member function 'void apache::thrift::transport:: >> TSocket::local_open()': >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:355:19: >> error: aggregate 'apache::thrift::transport::addrinfo hints' has >> incomplete >> type and cannot be defined >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:363:20: >> error: 'AI_PASSIVE' was not declared in this scope >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:363:33: >> error: 'AI_ADDRCONFIG' was not declared in this scope >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:366:57: >> error: 'getaddrinfo' was not declared in this scope >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:369:106: >> error: 'gai_strerror' was not declared in this scope >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:377:34: >> error: invalid use of incomplete type 'struct >> apache::thrift::transport::addrinfo' >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.h:245:30: >> error: forward declaration of 'struct apache::thrift::transport:: >> addrinfo' >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:382:14: >> error: invalid use of incomplete type 'struct >> apache::thrift::transport::addrinfo' >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.h:245:30: >> error: forward declaration of 'struct apache::thrift::transport:: >> addrinfo' >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:386:26: >> error: 'freeaddrinfo' was not declared in this scope >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:393:20: >> error: 'freeaddrinfo' was not declared in this scope >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp: >> In member function 'virtual uint32_t >> apache::thrift::transport::TSocket::read(uint8_t*, uint32_t)': >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:434:37: >> error: 'gettimeofday' was not declared in this scope >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:454:37: >> error: 'gettimeofday' was not declared in this scope >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp: >> In member function 'std::string >> apache::thrift::transport::TSocket::getPeerHost()': >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:717:21: >> error: 'NI_MAXHOST' was not declared in this scope >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:718:24: >> error: 'NI_MAXSERV' was not declared in this scope >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:721:17: >> error: 'clienthost' was not declared in this scope >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:722:17: >> error: 'clientservice' was not declared in this scope >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:722:56: >> error: 'getnameinfo' was not declared in this scope >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp: >> In member function 'std::string >> apache::thrift::transport::TSocket::getPeerAddress()': >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:751:21: >> error: 'NI_MAXHOST' was not declared in this scope >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:752:24: >> error: 'NI_MAXSERV' was not declared in this scope >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:755:17: >> error: 'clienthost' was not declared in this scope >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:756:17: >> error: 'clientservice' was not declared in this scope >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:757:17: >> error: 'NI_NUMERICHOST' was not declared in this scope >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:757:32: >> error: 'NI_NUMERICSERV' was not declared in this scope >> /home/ixxi-2013/Desktop/airavata-cpp-sdk/lib/thrift/ >> transport/TSocket.cpp:757:46: >> error: 'getnameinfo' was not declared in this scope >> >> Thanks, >> Nadeem >> > > >
