You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airavata.apache.org by priyanshu patra <pr...@gmail.com> on 2015/06/06 12:40:46 UTC

Undefined reference to Workflow::read/write(TProtocol*) error in Airavata-0.15

Hi all,

I'm using the following command to compile a cpp file with airavata and
thrift libraries of 0.15-release-version.
*g++
-I/home/priyanshu-sekhar/gsoc/new_airavata/new_genapp/genapp/languages/qt4/util/lib/
-L/usr/local/lib -w -Wno-write-strings -DHAVE_CONFIG_H -DHAVE_INTTYPES_H
-DHAVE_NETINET_IN_H  -I/usr/local/include `pkg-config --cflags glib-2.0`
Register.cpp `pkg-config --libs glib-2.0` -o Register -lthrift *

This is the error that I'm getting. How do I fix this?

/tmp/ccFRo65D.o: In function
`apache::airavata::api::Airavata_getWorkflow_result::read(apache::thrift::protocol::TProtocol*)':
Register.cpp:(.text+0x4c196): undefined reference to
`Workflow::read(apache::thrift::protocol::TProtocol*)'
/tmp/ccFRo65D.o: In function
`apache::airavata::api::Airavata_getWorkflow_result::write(apache::thrift::protocol::TProtocol*)
const':
Register.cpp:(.text+0x4c36d): undefined reference to
`Workflow::write(apache::thrift::protocol::TProtocol*) const'
/tmp/ccFRo65D.o: In function
`apache::airavata::api::Airavata_getWorkflow_presult::read(apache::thrift::protocol::TProtocol*)':
Register.cpp:(.text+0x4c572): undefined reference to
`Workflow::read(apache::thrift::protocol::TProtocol*)'
/tmp/ccFRo65D.o: In function
`apache::airavata::api::Airavata_registerWorkflow_args::read(apache::thrift::protocol::TProtocol*)':
Register.cpp:(.text+0x4cef6): undefined reference to
`Workflow::read(apache::thrift::protocol::TProtocol*)'
/tmp/ccFRo65D.o: In function
`apache::airavata::api::Airavata_registerWorkflow_args::write(apache::thrift::protocol::TProtocol*)
const':
Register.cpp:(.text+0x4d0ad): undefined reference to
`Workflow::write(apache::thrift::protocol::TProtocol*) const'
/tmp/ccFRo65D.o: In function
`apache::airavata::api::Airavata_registerWorkflow_pargs::write(apache::thrift::protocol::TProtocol*)
const':
Register.cpp:(.text+0x4d189): undefined reference to
`Workflow::write(apache::thrift::protocol::TProtocol*) const'
/tmp/ccFRo65D.o: In function
`apache::airavata::api::Airavata_updateWorkflow_args::read(apache::thrift::protocol::TProtocol*)':
Register.cpp:(.text+0x4d86e): undefined reference to
`Workflow::read(apache::thrift::protocol::TProtocol*)'
/tmp/ccFRo65D.o: In function
`apache::airavata::api::Airavata_updateWorkflow_args::write(apache::thrift::protocol::TProtocol*)
const':
Register.cpp:(.text+0x4da25): undefined reference to
`Workflow::write(apache::thrift::protocol::TProtocol*) const'
/tmp/ccFRo65D.o: In function
`apache::airavata::api::Airavata_updateWorkflow_pargs::write(apache::thrift::protocol::TProtocol*)
const':
Register.cpp:(.text+0x4db01): undefined reference to
`Workflow::write(apache::thrift::protocol::TProtocol*) const'

Regards,
Priyanshu

Re: Undefined reference to Workflow::read/write(TProtocol*) error in Airavata-0.15

Posted by Emre Brookes <em...@biochem.uthscsa.edu>.
Priyanshu,

Have you seen this http://wiki.apache.org/thrift/ThriftUsageC%2B%2B ?
Perhaps it has some information you need.  It appears to have some extra 
.o files generated by thrift.
Note the 2 stage client compiling & linking lines (which could be 
combined into one) esp. the client
linking has extra .o's.

-Emre


priyanshu patra wrote:
> Hi all,
>
> I'm using the following command to compile a cpp file with airavata 
> and thrift libraries of 0.15-release-version.
> *g++ 
> -I/home/priyanshu-sekhar/gsoc/new_airavata/new_genapp/genapp/languages/qt4/util/lib/ 
> -L/usr/local/lib -w -Wno-write-strings -DHAVE_CONFIG_H 
> -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H  -I/usr/local/include 
> `pkg-config --cflags glib-2.0` Register.cpp `pkg-config --libs 
> glib-2.0` -o Register -lthrift *
>
> This is the error that I'm getting. How do I fix this?
> /tmp/ccFRo65D.o: In function 
> `apache::airavata::api::Airavata_getWorkflow_result::read(apache::thrift::protocol::TProtocol*)':
> Register.cpp:(.text+0x4c196): undefined reference to 
> `Workflow::read(apache::thrift::protocol::TProtocol*)'
> /tmp/ccFRo65D.o: In function 
> `apache::airavata::api::Airavata_getWorkflow_result::write(apache::thrift::protocol::TProtocol*) 
> const':
> Register.cpp:(.text+0x4c36d): undefined reference to 
> `Workflow::write(apache::thrift::protocol::TProtocol*) const'
> /tmp/ccFRo65D.o: In function 
> `apache::airavata::api::Airavata_getWorkflow_presult::read(apache::thrift::protocol::TProtocol*)':
> Register.cpp:(.text+0x4c572): undefined reference to 
> `Workflow::read(apache::thrift::protocol::TProtocol*)'
> /tmp/ccFRo65D.o: In function 
> `apache::airavata::api::Airavata_registerWorkflow_args::read(apache::thrift::protocol::TProtocol*)':
> Register.cpp:(.text+0x4cef6): undefined reference to 
> `Workflow::read(apache::thrift::protocol::TProtocol*)'
> /tmp/ccFRo65D.o: In function 
> `apache::airavata::api::Airavata_registerWorkflow_args::write(apache::thrift::protocol::TProtocol*) 
> const':
> Register.cpp:(.text+0x4d0ad): undefined reference to 
> `Workflow::write(apache::thrift::protocol::TProtocol*) const'
> /tmp/ccFRo65D.o: In function 
> `apache::airavata::api::Airavata_registerWorkflow_pargs::write(apache::thrift::protocol::TProtocol*) 
> const':
> Register.cpp:(.text+0x4d189): undefined reference to 
> `Workflow::write(apache::thrift::protocol::TProtocol*) const'
> /tmp/ccFRo65D.o: In function 
> `apache::airavata::api::Airavata_updateWorkflow_args::read(apache::thrift::protocol::TProtocol*)':
> Register.cpp:(.text+0x4d86e): undefined reference to 
> `Workflow::read(apache::thrift::protocol::TProtocol*)'
> /tmp/ccFRo65D.o: In function 
> `apache::airavata::api::Airavata_updateWorkflow_args::write(apache::thrift::protocol::TProtocol*) 
> const':
> Register.cpp:(.text+0x4da25): undefined reference to 
> `Workflow::write(apache::thrift::protocol::TProtocol*) const'
> /tmp/ccFRo65D.o: In function 
> `apache::airavata::api::Airavata_updateWorkflow_pargs::write(apache::thrift::protocol::TProtocol*) 
> const':
> Register.cpp:(.text+0x4db01): undefined reference to 
> `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>
> Regards,
> Priyanshu


Re: Undefined reference to Workflow::read/write(TProtocol*) error in Airavata-0.15

Posted by priyanshu patra <pr...@gmail.com>.
Sure sir, I'll make a few changes in the code and upload it soon

On Sat, Jun 6, 2015 at 5:56 PM, Emre Brookes <em...@biochem.uthscsa.edu>
wrote:

> +1 it will be very helpful to debug if we can work with the code
>
> -E.
>
> Suresh Marru wrote:
>
>> Hi Priyanshu,
>>
>> Can you please submit a patch to C++ samples right away? Please also
>> include a Make file. I really would like to get my hands on this code,
>> otherwise it will be tough to answer these questions. We have to take wild
>> guesses which may not be of help.
>>
>> Suresh
>>
>>  On Jun 6, 2015, at 7:57 AM, priyanshu patra <pri.patra@gmail.com
>>> <ma...@gmail.com>> wrote:
>>>
>>> Sir, Workflow::read is declared inside Workflow.cpp which is present in
>>> the library- airavata folder itself. But "Workflow.h" is not include in
>>> "Airavata.h" (I'm not entirely sure, but I guess that might be a reason for
>>> the error). I tried adding "*#include "Workflow.h"* " but I got a series of
>>> error similar to this:
>>>
>>> ../lib/airavata/Workflow.h:36:31: error: ‘::Workflow’ has not been
>>> declared
>>>  virtual void getWorkflow( ::Workflow& _return, const std::string&
>>> workflowTemplateId) = 0;
>>>                      ^
>>> ../lib/airavata/Workflow.h:38:62: error: ‘Workflow’ in namespace ‘::’
>>> does not name a type
>>>  virtual void registerWorkflow(std::string& _return, const  ::Workflow&
>>> workflow) = 0;
>>>   ^
>>> ../lib/airavata/Workflow.h:38:74: error: ISO C++ forbids declaration of
>>> ‘workflow’ with no type [-fpermissive]
>>>  virtual void registerWorkflow(std::string& _return, const  ::Workflow&
>>> workflow) = 0;
>>>
>>>
>>> On Sat, Jun 6, 2015 at 4:56 PM, Emre Brookes <emre@biochem.uthscsa.edu
>>> <ma...@biochem.uthscsa.edu>> wrote:
>>>
>>>     Does any one know where:
>>>     `Workflow::read(apache::thrift::protocol::TProtocol*)'
>>>     is defined ?
>>>
>>>     This seems to me to be thrift generated cpp from a Airavata
>>>     Workflow class... but I'm guessing.
>>>
>>>     -Emre
>>>
>>>
>>>
>>>     Emre Brookes wrote:
>>>
>>>         All,
>>>
>>>         Does anyone have a complete set of libraries required to link
>>>         apache thrift to airavata cpp ?
>>>
>>>         Priyanshu,
>>>
>>>         Undefined reference generally means some library or other
>>>         source file is missing from the compile line.
>>>         This may help you think through it (not an exact fit, but
>>>         similar)
>>>
>>> http://stackoverflow.com/questions/10636536/error-linking-thrift-server-c
>>>
>>>         Thanks,
>>>         Emre
>>>
>>>         priyanshu patra wrote:
>>>
>>>             Hi all,
>>>
>>>             I'm using the following command to compile a cpp file
>>>             with airavata and thrift libraries of 0.15-release-version.
>>>             *g++
>>>
>>> -I/home/priyanshu-sekhar/gsoc/new_airavata/new_genapp/genapp/languages/qt4/util/lib/
>>>             -L/usr/local/lib -w -Wno-write-strings -DHAVE_CONFIG_H
>>>             -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H
>>>  -I/usr/local/include `pkg-config --cflags glib-2.0`
>>>             Register.cpp `pkg-config --libs glib-2.0` -o Register
>>>             -lthrift *
>>>
>>>             This is the error that I'm getting. How do I fix this?
>>>             /tmp/ccFRo65D.o: In function
>>>
>>> `apache::airavata::api::Airavata_getWorkflow_result::read(apache::thrift::protocol::TProtocol*)':
>>>             Register.cpp:(.text+0x4c196): undefined reference to
>>>             `Workflow::read(apache::thrift::protocol::TProtocol*)'
>>>             /tmp/ccFRo65D.o: In function
>>>
>>> `apache::airavata::api::Airavata_getWorkflow_result::write(apache::thrift::protocol::TProtocol*)
>>>             const':
>>>             Register.cpp:(.text+0x4c36d): undefined reference to
>>>             `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>>>             /tmp/ccFRo65D.o: In function
>>>
>>> `apache::airavata::api::Airavata_getWorkflow_presult::read(apache::thrift::protocol::TProtocol*)':
>>>             Register.cpp:(.text+0x4c572): undefined reference to
>>>             `Workflow::read(apache::thrift::protocol::TProtocol*)'
>>>             /tmp/ccFRo65D.o: In function
>>>
>>> `apache::airavata::api::Airavata_registerWorkflow_args::read(apache::thrift::protocol::TProtocol*)':
>>>             Register.cpp:(.text+0x4cef6): undefined reference to
>>>             `Workflow::read(apache::thrift::protocol::TProtocol*)'
>>>             /tmp/ccFRo65D.o: In function
>>>
>>> `apache::airavata::api::Airavata_registerWorkflow_args::write(apache::thrift::protocol::TProtocol*)
>>>             const':
>>>             Register.cpp:(.text+0x4d0ad): undefined reference to
>>>             `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>>>             /tmp/ccFRo65D.o: In function
>>>
>>> `apache::airavata::api::Airavata_registerWorkflow_pargs::write(apache::thrift::protocol::TProtocol*)
>>>             const':
>>>             Register.cpp:(.text+0x4d189): undefined reference to
>>>             `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>>>             /tmp/ccFRo65D.o: In function
>>>
>>> `apache::airavata::api::Airavata_updateWorkflow_args::read(apache::thrift::protocol::TProtocol*)':
>>>             Register.cpp:(.text+0x4d86e): undefined reference to
>>>             `Workflow::read(apache::thrift::protocol::TProtocol*)'
>>>             /tmp/ccFRo65D.o: In function
>>>
>>> `apache::airavata::api::Airavata_updateWorkflow_args::write(apache::thrift::protocol::TProtocol*)
>>>             const':
>>>             Register.cpp:(.text+0x4da25): undefined reference to
>>>             `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>>>             /tmp/ccFRo65D.o: In function
>>>
>>> `apache::airavata::api::Airavata_updateWorkflow_pargs::write(apache::thrift::protocol::TProtocol*)
>>>             const':
>>>             Register.cpp:(.text+0x4db01): undefined reference to
>>>             `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>>>
>>>             Regards,
>>>             Priyanshu
>>>
>>>
>>>
>>>
>>>
>>
>

Re: Undefined reference to Workflow::read/write(TProtocol*) error in Airavata-0.15

Posted by Emre Brookes <em...@biochem.uthscsa.edu>.
+1 it will be very helpful to debug if we can work with the code

-E.

Suresh Marru wrote:
> Hi Priyanshu,
>
> Can you please submit a patch to C++ samples right away? Please also 
> include a Make file. I really would like to get my hands on this code, 
> otherwise it will be tough to answer these questions. We have to take 
> wild guesses which may not be of help.
>
> Suresh
>
>> On Jun 6, 2015, at 7:57 AM, priyanshu patra <pri.patra@gmail.com 
>> <ma...@gmail.com>> wrote:
>>
>> Sir, Workflow::read is declared inside Workflow.cpp which is present 
>> in the library- airavata folder itself. But "Workflow.h" is not 
>> include in "Airavata.h" (I'm not entirely sure, but I guess that 
>> might be a reason for the error). I tried adding "*#include 
>> "Workflow.h"* " but I got a series of error similar to this:
>>
>> ../lib/airavata/Workflow.h:36:31: error: ‘::Workflow’ has not been 
>> declared
>>  virtual void getWorkflow( ::Workflow& _return, const std::string& 
>> workflowTemplateId) = 0;
>>                      ^
>> ../lib/airavata/Workflow.h:38:62: error: ‘Workflow’ in namespace ‘::’ 
>> does not name a type
>>  virtual void registerWorkflow(std::string& _return, const 
>>  ::Workflow& workflow) = 0;
>>   ^
>> ../lib/airavata/Workflow.h:38:74: error: ISO C++ forbids declaration 
>> of ‘workflow’ with no type [-fpermissive]
>>  virtual void registerWorkflow(std::string& _return, const 
>>  ::Workflow& workflow) = 0;
>>
>>
>> On Sat, Jun 6, 2015 at 4:56 PM, Emre Brookes 
>> <emre@biochem.uthscsa.edu <ma...@biochem.uthscsa.edu>> wrote:
>>
>>     Does any one know where:
>>     `Workflow::read(apache::thrift::protocol::TProtocol*)'
>>     is defined ?
>>
>>     This seems to me to be thrift generated cpp from a Airavata
>>     Workflow class... but I'm guessing.
>>
>>     -Emre
>>
>>
>>
>>     Emre Brookes wrote:
>>
>>         All,
>>
>>         Does anyone have a complete set of libraries required to link
>>         apache thrift to airavata cpp ?
>>
>>         Priyanshu,
>>
>>         Undefined reference generally means some library or other
>>         source file is missing from the compile line.
>>         This may help you think through it (not an exact fit, but
>>         similar)
>>         http://stackoverflow.com/questions/10636536/error-linking-thrift-server-c
>>
>>         Thanks,
>>         Emre
>>
>>         priyanshu patra wrote:
>>
>>             Hi all,
>>
>>             I'm using the following command to compile a cpp file
>>             with airavata and thrift libraries of 0.15-release-version.
>>             *g++
>>             -I/home/priyanshu-sekhar/gsoc/new_airavata/new_genapp/genapp/languages/qt4/util/lib/
>>             -L/usr/local/lib -w -Wno-write-strings -DHAVE_CONFIG_H
>>             -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H 
>>             -I/usr/local/include `pkg-config --cflags glib-2.0`
>>             Register.cpp `pkg-config --libs glib-2.0` -o Register
>>             -lthrift *
>>
>>             This is the error that I'm getting. How do I fix this?
>>             /tmp/ccFRo65D.o: In function
>>             `apache::airavata::api::Airavata_getWorkflow_result::read(apache::thrift::protocol::TProtocol*)':
>>             Register.cpp:(.text+0x4c196): undefined reference to
>>             `Workflow::read(apache::thrift::protocol::TProtocol*)'
>>             /tmp/ccFRo65D.o: In function
>>             `apache::airavata::api::Airavata_getWorkflow_result::write(apache::thrift::protocol::TProtocol*)
>>             const':
>>             Register.cpp:(.text+0x4c36d): undefined reference to
>>             `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>>             /tmp/ccFRo65D.o: In function
>>             `apache::airavata::api::Airavata_getWorkflow_presult::read(apache::thrift::protocol::TProtocol*)':
>>             Register.cpp:(.text+0x4c572): undefined reference to
>>             `Workflow::read(apache::thrift::protocol::TProtocol*)'
>>             /tmp/ccFRo65D.o: In function
>>             `apache::airavata::api::Airavata_registerWorkflow_args::read(apache::thrift::protocol::TProtocol*)':
>>             Register.cpp:(.text+0x4cef6): undefined reference to
>>             `Workflow::read(apache::thrift::protocol::TProtocol*)'
>>             /tmp/ccFRo65D.o: In function
>>             `apache::airavata::api::Airavata_registerWorkflow_args::write(apache::thrift::protocol::TProtocol*)
>>             const':
>>             Register.cpp:(.text+0x4d0ad): undefined reference to
>>             `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>>             /tmp/ccFRo65D.o: In function
>>             `apache::airavata::api::Airavata_registerWorkflow_pargs::write(apache::thrift::protocol::TProtocol*)
>>             const':
>>             Register.cpp:(.text+0x4d189): undefined reference to
>>             `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>>             /tmp/ccFRo65D.o: In function
>>             `apache::airavata::api::Airavata_updateWorkflow_args::read(apache::thrift::protocol::TProtocol*)':
>>             Register.cpp:(.text+0x4d86e): undefined reference to
>>             `Workflow::read(apache::thrift::protocol::TProtocol*)'
>>             /tmp/ccFRo65D.o: In function
>>             `apache::airavata::api::Airavata_updateWorkflow_args::write(apache::thrift::protocol::TProtocol*)
>>             const':
>>             Register.cpp:(.text+0x4da25): undefined reference to
>>             `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>>             /tmp/ccFRo65D.o: In function
>>             `apache::airavata::api::Airavata_updateWorkflow_pargs::write(apache::thrift::protocol::TProtocol*)
>>             const':
>>             Register.cpp:(.text+0x4db01): undefined reference to
>>             `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>>
>>             Regards,
>>             Priyanshu
>>
>>
>>
>>
>


Re: Undefined reference to Workflow::read/write(TProtocol*) error in Airavata-0.15

Posted by Suresh Marru <sm...@apache.org>.
Hi Priyanshu,

Can you please submit a patch to C++ samples right away? Please also include a Make file. I really would like to get my hands on this code, otherwise it will be tough to answer these questions. We have to take wild guesses which may not be of help.

Suresh

> On Jun 6, 2015, at 7:57 AM, priyanshu patra <pr...@gmail.com> wrote:
> 
> Sir, Workflow::read is declared inside Workflow.cpp which is present in the library- airavata folder itself. But "Workflow.h" is not include in "Airavata.h" (I'm not entirely sure, but I guess that might be a reason for the error). I tried adding "#include "Workflow.h" " but I got a series of error similar to this:
> 
> ../lib/airavata/Workflow.h:36:31: error: ‘::Workflow’ has not been declared
>    virtual void getWorkflow( ::Workflow& _return, const std::string& workflowTemplateId) = 0;
>                                ^
> ../lib/airavata/Workflow.h:38:62: error: ‘Workflow’ in namespace ‘::’ does not name a type
>    virtual void registerWorkflow(std::string& _return, const  ::Workflow& workflow) = 0;
>                                                               ^
> ../lib/airavata/Workflow.h:38:74: error: ISO C++ forbids declaration of ‘workflow’ with no type [-fpermissive]
>    virtual void registerWorkflow(std::string& _return, const  ::Workflow& workflow) = 0;
> 
> 
> 
> On Sat, Jun 6, 2015 at 4:56 PM, Emre Brookes <emre@biochem.uthscsa.edu <ma...@biochem.uthscsa.edu>> wrote:
> Does any one know where:
> `Workflow::read(apache::thrift::protocol::TProtocol*)'
> is defined ?
> 
> This seems to me to be thrift generated cpp from a Airavata Workflow class... but I'm guessing.
> 
> -Emre
> 
> 
> 
> Emre Brookes wrote:
> All,
> 
> Does anyone have a complete set of libraries required to link apache thrift to airavata cpp ?
> 
> Priyanshu,
> 
> Undefined reference generally means some library or other source file is missing from the compile line.
> This may help you think through it (not an exact fit, but similar) http://stackoverflow.com/questions/10636536/error-linking-thrift-server-c <http://stackoverflow.com/questions/10636536/error-linking-thrift-server-c>
> 
> Thanks,
> Emre
> 
> priyanshu patra wrote:
> Hi all,
> 
> I'm using the following command to compile a cpp file with airavata and thrift libraries of 0.15-release-version.
> *g++ -I/home/priyanshu-sekhar/gsoc/new_airavata/new_genapp/genapp/languages/qt4/util/lib/ -L/usr/local/lib -w -Wno-write-strings -DHAVE_CONFIG_H -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H  -I/usr/local/include `pkg-config --cflags glib-2.0` Register.cpp `pkg-config --libs glib-2.0` -o Register -lthrift *
> 
> This is the error that I'm getting. How do I fix this?
> /tmp/ccFRo65D.o: In function `apache::airavata::api::Airavata_getWorkflow_result::read(apache::thrift::protocol::TProtocol*)':
> Register.cpp:(.text+0x4c196): undefined reference to `Workflow::read(apache::thrift::protocol::TProtocol*)'
> /tmp/ccFRo65D.o: In function `apache::airavata::api::Airavata_getWorkflow_result::write(apache::thrift::protocol::TProtocol*) const':
> Register.cpp:(.text+0x4c36d): undefined reference to `Workflow::write(apache::thrift::protocol::TProtocol*) const'
> /tmp/ccFRo65D.o: In function `apache::airavata::api::Airavata_getWorkflow_presult::read(apache::thrift::protocol::TProtocol*)':
> Register.cpp:(.text+0x4c572): undefined reference to `Workflow::read(apache::thrift::protocol::TProtocol*)'
> /tmp/ccFRo65D.o: In function `apache::airavata::api::Airavata_registerWorkflow_args::read(apache::thrift::protocol::TProtocol*)':
> Register.cpp:(.text+0x4cef6): undefined reference to `Workflow::read(apache::thrift::protocol::TProtocol*)'
> /tmp/ccFRo65D.o: In function `apache::airavata::api::Airavata_registerWorkflow_args::write(apache::thrift::protocol::TProtocol*) const':
> Register.cpp:(.text+0x4d0ad): undefined reference to `Workflow::write(apache::thrift::protocol::TProtocol*) const'
> /tmp/ccFRo65D.o: In function `apache::airavata::api::Airavata_registerWorkflow_pargs::write(apache::thrift::protocol::TProtocol*) const':
> Register.cpp:(.text+0x4d189): undefined reference to `Workflow::write(apache::thrift::protocol::TProtocol*) const'
> /tmp/ccFRo65D.o: In function `apache::airavata::api::Airavata_updateWorkflow_args::read(apache::thrift::protocol::TProtocol*)':
> Register.cpp:(.text+0x4d86e): undefined reference to `Workflow::read(apache::thrift::protocol::TProtocol*)'
> /tmp/ccFRo65D.o: In function `apache::airavata::api::Airavata_updateWorkflow_args::write(apache::thrift::protocol::TProtocol*) const':
> Register.cpp:(.text+0x4da25): undefined reference to `Workflow::write(apache::thrift::protocol::TProtocol*) const'
> /tmp/ccFRo65D.o: In function `apache::airavata::api::Airavata_updateWorkflow_pargs::write(apache::thrift::protocol::TProtocol*) const':
> Register.cpp:(.text+0x4db01): undefined reference to `Workflow::write(apache::thrift::protocol::TProtocol*) const'
> 
> Regards,
> Priyanshu
> 
> 
> 


Re: Undefined reference to Workflow::read/write(TProtocol*) error in Airavata-0.15

Posted by Emre Brookes <em...@biochem.uthscsa.edu>.
If your code compiles but has an issue in linking (which is what your 
first message indicated), the error is in the linking phase, not
the compiling phase and you do not need to include more files... you 
need to link against additional code (extra .o's) as
mentioned in my previous email.

-E.


priyanshu patra wrote:
> Sir, Workflow::read is declared inside Workflow.cpp which is present 
> in the library- airavata folder itself. But "Workflow.h" is not 
> include in "Airavata.h" (I'm not entirely sure, but I guess that might 
> be a reason for the error). I tried adding "*#include "Workflow.h"* " 
> but I got a series of error similar to this:
>
> ../lib/airavata/Workflow.h:36:31: error: ‘::Workflow’ has not been 
> declared
>    virtual void getWorkflow( ::Workflow& _return, const std::string& 
> workflowTemplateId) = 0;
>                                ^
> ../lib/airavata/Workflow.h:38:62: error: ‘Workflow’ in namespace ‘::’ 
> does not name a type
>    virtual void registerWorkflow(std::string& _return, const 
>  ::Workflow& workflow) = 0;
>                           ^
> ../lib/airavata/Workflow.h:38:74: error: ISO C++ forbids declaration 
> of ‘workflow’ with no type [-fpermissive]
>    virtual void registerWorkflow(std::string& _return, const 
>  ::Workflow& workflow) = 0;
>
>
> On Sat, Jun 6, 2015 at 4:56 PM, Emre Brookes <emre@biochem.uthscsa.edu 
> <ma...@biochem.uthscsa.edu>> wrote:
>
>     Does any one know where:
>     `Workflow::read(apache::thrift::protocol::TProtocol*)'
>     is defined ?
>
>     This seems to me to be thrift generated cpp from a Airavata
>     Workflow class... but I'm guessing.
>
>     -Emre
>
>
>
>     Emre Brookes wrote:
>
>         All,
>
>         Does anyone have a complete set of libraries required to link
>         apache thrift to airavata cpp ?
>
>         Priyanshu,
>
>         Undefined reference generally means some library or other
>         source file is missing from the compile line.
>         This may help you think through it (not an exact fit, but
>         similar)
>         http://stackoverflow.com/questions/10636536/error-linking-thrift-server-c
>
>         Thanks,
>         Emre
>
>         priyanshu patra wrote:
>
>             Hi all,
>
>             I'm using the following command to compile a cpp file with
>             airavata and thrift libraries of 0.15-release-version.
>             *g++
>             -I/home/priyanshu-sekhar/gsoc/new_airavata/new_genapp/genapp/languages/qt4/util/lib/
>             -L/usr/local/lib -w -Wno-write-strings -DHAVE_CONFIG_H
>             -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H 
>             -I/usr/local/include `pkg-config --cflags glib-2.0`
>             Register.cpp `pkg-config --libs glib-2.0` -o Register
>             -lthrift *
>
>             This is the error that I'm getting. How do I fix this?
>             /tmp/ccFRo65D.o: In function
>             `apache::airavata::api::Airavata_getWorkflow_result::read(apache::thrift::protocol::TProtocol*)':
>             Register.cpp:(.text+0x4c196): undefined reference to
>             `Workflow::read(apache::thrift::protocol::TProtocol*)'
>             /tmp/ccFRo65D.o: In function
>             `apache::airavata::api::Airavata_getWorkflow_result::write(apache::thrift::protocol::TProtocol*)
>             const':
>             Register.cpp:(.text+0x4c36d): undefined reference to
>             `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>             /tmp/ccFRo65D.o: In function
>             `apache::airavata::api::Airavata_getWorkflow_presult::read(apache::thrift::protocol::TProtocol*)':
>             Register.cpp:(.text+0x4c572): undefined reference to
>             `Workflow::read(apache::thrift::protocol::TProtocol*)'
>             /tmp/ccFRo65D.o: In function
>             `apache::airavata::api::Airavata_registerWorkflow_args::read(apache::thrift::protocol::TProtocol*)':
>             Register.cpp:(.text+0x4cef6): undefined reference to
>             `Workflow::read(apache::thrift::protocol::TProtocol*)'
>             /tmp/ccFRo65D.o: In function
>             `apache::airavata::api::Airavata_registerWorkflow_args::write(apache::thrift::protocol::TProtocol*)
>             const':
>             Register.cpp:(.text+0x4d0ad): undefined reference to
>             `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>             /tmp/ccFRo65D.o: In function
>             `apache::airavata::api::Airavata_registerWorkflow_pargs::write(apache::thrift::protocol::TProtocol*)
>             const':
>             Register.cpp:(.text+0x4d189): undefined reference to
>             `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>             /tmp/ccFRo65D.o: In function
>             `apache::airavata::api::Airavata_updateWorkflow_args::read(apache::thrift::protocol::TProtocol*)':
>             Register.cpp:(.text+0x4d86e): undefined reference to
>             `Workflow::read(apache::thrift::protocol::TProtocol*)'
>             /tmp/ccFRo65D.o: In function
>             `apache::airavata::api::Airavata_updateWorkflow_args::write(apache::thrift::protocol::TProtocol*)
>             const':
>             Register.cpp:(.text+0x4da25): undefined reference to
>             `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>             /tmp/ccFRo65D.o: In function
>             `apache::airavata::api::Airavata_updateWorkflow_pargs::write(apache::thrift::protocol::TProtocol*)
>             const':
>             Register.cpp:(.text+0x4db01): undefined reference to
>             `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>
>             Regards,
>             Priyanshu
>
>
>
>


Re: Undefined reference to Workflow::read/write(TProtocol*) error in Airavata-0.15

Posted by priyanshu patra <pr...@gmail.com>.
Sir, Workflow::read is declared inside Workflow.cpp which is present in the
library- airavata folder itself. But "Workflow.h" is not include in
"Airavata.h" (I'm not entirely sure, but I guess that might be a reason for
the error). I tried adding "*#include "Workflow.h"* " but I got a series of
error similar to this:

../lib/airavata/Workflow.h:36:31: error: ‘::Workflow’ has not been declared
   virtual void getWorkflow( ::Workflow& _return, const std::string&
workflowTemplateId) = 0;
                               ^
../lib/airavata/Workflow.h:38:62: error: ‘Workflow’ in namespace ‘::’ does
not name a type
   virtual void registerWorkflow(std::string& _return, const  ::Workflow&
workflow) = 0;
                                                              ^
../lib/airavata/Workflow.h:38:74: error: ISO C++ forbids declaration of
‘workflow’ with no type [-fpermissive]
   virtual void registerWorkflow(std::string& _return, const  ::Workflow&
workflow) = 0;


On Sat, Jun 6, 2015 at 4:56 PM, Emre Brookes <em...@biochem.uthscsa.edu>
wrote:

> Does any one know where:
> `Workflow::read(apache::thrift::protocol::TProtocol*)'
> is defined ?
>
> This seems to me to be thrift generated cpp from a Airavata Workflow
> class... but I'm guessing.
>
> -Emre
>
>
>
> Emre Brookes wrote:
>
>> All,
>>
>> Does anyone have a complete set of libraries required to link apache
>> thrift to airavata cpp ?
>>
>> Priyanshu,
>>
>> Undefined reference generally means some library or other source file is
>> missing from the compile line.
>> This may help you think through it (not an exact fit, but similar)
>> http://stackoverflow.com/questions/10636536/error-linking-thrift-server-c
>>
>> Thanks,
>> Emre
>>
>> priyanshu patra wrote:
>>
>>> Hi all,
>>>
>>> I'm using the following command to compile a cpp file with airavata and
>>> thrift libraries of 0.15-release-version.
>>> *g++
>>> -I/home/priyanshu-sekhar/gsoc/new_airavata/new_genapp/genapp/languages/qt4/util/lib/
>>> -L/usr/local/lib -w -Wno-write-strings -DHAVE_CONFIG_H -DHAVE_INTTYPES_H
>>> -DHAVE_NETINET_IN_H  -I/usr/local/include `pkg-config --cflags glib-2.0`
>>> Register.cpp `pkg-config --libs glib-2.0` -o Register -lthrift *
>>>
>>> This is the error that I'm getting. How do I fix this?
>>> /tmp/ccFRo65D.o: In function
>>> `apache::airavata::api::Airavata_getWorkflow_result::read(apache::thrift::protocol::TProtocol*)':
>>> Register.cpp:(.text+0x4c196): undefined reference to
>>> `Workflow::read(apache::thrift::protocol::TProtocol*)'
>>> /tmp/ccFRo65D.o: In function
>>> `apache::airavata::api::Airavata_getWorkflow_result::write(apache::thrift::protocol::TProtocol*)
>>> const':
>>> Register.cpp:(.text+0x4c36d): undefined reference to
>>> `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>>> /tmp/ccFRo65D.o: In function
>>> `apache::airavata::api::Airavata_getWorkflow_presult::read(apache::thrift::protocol::TProtocol*)':
>>> Register.cpp:(.text+0x4c572): undefined reference to
>>> `Workflow::read(apache::thrift::protocol::TProtocol*)'
>>> /tmp/ccFRo65D.o: In function
>>> `apache::airavata::api::Airavata_registerWorkflow_args::read(apache::thrift::protocol::TProtocol*)':
>>> Register.cpp:(.text+0x4cef6): undefined reference to
>>> `Workflow::read(apache::thrift::protocol::TProtocol*)'
>>> /tmp/ccFRo65D.o: In function
>>> `apache::airavata::api::Airavata_registerWorkflow_args::write(apache::thrift::protocol::TProtocol*)
>>> const':
>>> Register.cpp:(.text+0x4d0ad): undefined reference to
>>> `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>>> /tmp/ccFRo65D.o: In function
>>> `apache::airavata::api::Airavata_registerWorkflow_pargs::write(apache::thrift::protocol::TProtocol*)
>>> const':
>>> Register.cpp:(.text+0x4d189): undefined reference to
>>> `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>>> /tmp/ccFRo65D.o: In function
>>> `apache::airavata::api::Airavata_updateWorkflow_args::read(apache::thrift::protocol::TProtocol*)':
>>> Register.cpp:(.text+0x4d86e): undefined reference to
>>> `Workflow::read(apache::thrift::protocol::TProtocol*)'
>>> /tmp/ccFRo65D.o: In function
>>> `apache::airavata::api::Airavata_updateWorkflow_args::write(apache::thrift::protocol::TProtocol*)
>>> const':
>>> Register.cpp:(.text+0x4da25): undefined reference to
>>> `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>>> /tmp/ccFRo65D.o: In function
>>> `apache::airavata::api::Airavata_updateWorkflow_pargs::write(apache::thrift::protocol::TProtocol*)
>>> const':
>>> Register.cpp:(.text+0x4db01): undefined reference to
>>> `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>>>
>>> Regards,
>>> Priyanshu
>>>
>>
>>
>

Re: Undefined reference to Workflow::read/write(TProtocol*) error in Airavata-0.15

Posted by Emre Brookes <em...@biochem.uthscsa.edu>.
Does any one know where:
`Workflow::read(apache::thrift::protocol::TProtocol*)'
is defined ?

This seems to me to be thrift generated cpp from a Airavata Workflow 
class... but I'm guessing.

-Emre


Emre Brookes wrote:
> All,
>
> Does anyone have a complete set of libraries required to link apache 
> thrift to airavata cpp ?
>
> Priyanshu,
>
> Undefined reference generally means some library or other source file 
> is missing from the compile line.
> This may help you think through it (not an exact fit, but similar) 
> http://stackoverflow.com/questions/10636536/error-linking-thrift-server-c
>
> Thanks,
> Emre
>
> priyanshu patra wrote:
>> Hi all,
>>
>> I'm using the following command to compile a cpp file with airavata 
>> and thrift libraries of 0.15-release-version.
>> *g++ 
>> -I/home/priyanshu-sekhar/gsoc/new_airavata/new_genapp/genapp/languages/qt4/util/lib/ 
>> -L/usr/local/lib -w -Wno-write-strings -DHAVE_CONFIG_H 
>> -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H  -I/usr/local/include 
>> `pkg-config --cflags glib-2.0` Register.cpp `pkg-config --libs 
>> glib-2.0` -o Register -lthrift *
>>
>> This is the error that I'm getting. How do I fix this?
>> /tmp/ccFRo65D.o: In function 
>> `apache::airavata::api::Airavata_getWorkflow_result::read(apache::thrift::protocol::TProtocol*)':
>> Register.cpp:(.text+0x4c196): undefined reference to 
>> `Workflow::read(apache::thrift::protocol::TProtocol*)'
>> /tmp/ccFRo65D.o: In function 
>> `apache::airavata::api::Airavata_getWorkflow_result::write(apache::thrift::protocol::TProtocol*) 
>> const':
>> Register.cpp:(.text+0x4c36d): undefined reference to 
>> `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>> /tmp/ccFRo65D.o: In function 
>> `apache::airavata::api::Airavata_getWorkflow_presult::read(apache::thrift::protocol::TProtocol*)':
>> Register.cpp:(.text+0x4c572): undefined reference to 
>> `Workflow::read(apache::thrift::protocol::TProtocol*)'
>> /tmp/ccFRo65D.o: In function 
>> `apache::airavata::api::Airavata_registerWorkflow_args::read(apache::thrift::protocol::TProtocol*)':
>> Register.cpp:(.text+0x4cef6): undefined reference to 
>> `Workflow::read(apache::thrift::protocol::TProtocol*)'
>> /tmp/ccFRo65D.o: In function 
>> `apache::airavata::api::Airavata_registerWorkflow_args::write(apache::thrift::protocol::TProtocol*) 
>> const':
>> Register.cpp:(.text+0x4d0ad): undefined reference to 
>> `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>> /tmp/ccFRo65D.o: In function 
>> `apache::airavata::api::Airavata_registerWorkflow_pargs::write(apache::thrift::protocol::TProtocol*) 
>> const':
>> Register.cpp:(.text+0x4d189): undefined reference to 
>> `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>> /tmp/ccFRo65D.o: In function 
>> `apache::airavata::api::Airavata_updateWorkflow_args::read(apache::thrift::protocol::TProtocol*)':
>> Register.cpp:(.text+0x4d86e): undefined reference to 
>> `Workflow::read(apache::thrift::protocol::TProtocol*)'
>> /tmp/ccFRo65D.o: In function 
>> `apache::airavata::api::Airavata_updateWorkflow_args::write(apache::thrift::protocol::TProtocol*) 
>> const':
>> Register.cpp:(.text+0x4da25): undefined reference to 
>> `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>> /tmp/ccFRo65D.o: In function 
>> `apache::airavata::api::Airavata_updateWorkflow_pargs::write(apache::thrift::protocol::TProtocol*) 
>> const':
>> Register.cpp:(.text+0x4db01): undefined reference to 
>> `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>>
>> Regards,
>> Priyanshu
>


Re: Undefined reference to Workflow::read/write(TProtocol*) error in Airavata-0.15

Posted by Emre Brookes <em...@biochem.uthscsa.edu>.
All,

Does anyone have a complete set of libraries required to link apache 
thrift to airavata cpp ?

Priyanshu,

Undefined reference generally means some library or other source file is 
missing from the compile line.
This may help you think through it (not an exact fit, but similar) 
http://stackoverflow.com/questions/10636536/error-linking-thrift-server-c

Thanks,
Emre

priyanshu patra wrote:
> Hi all,
>
> I'm using the following command to compile a cpp file with airavata 
> and thrift libraries of 0.15-release-version.
> *g++ 
> -I/home/priyanshu-sekhar/gsoc/new_airavata/new_genapp/genapp/languages/qt4/util/lib/ 
> -L/usr/local/lib -w -Wno-write-strings -DHAVE_CONFIG_H 
> -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H  -I/usr/local/include 
> `pkg-config --cflags glib-2.0` Register.cpp `pkg-config --libs 
> glib-2.0` -o Register -lthrift *
>
> This is the error that I'm getting. How do I fix this?
> /tmp/ccFRo65D.o: In function 
> `apache::airavata::api::Airavata_getWorkflow_result::read(apache::thrift::protocol::TProtocol*)':
> Register.cpp:(.text+0x4c196): undefined reference to 
> `Workflow::read(apache::thrift::protocol::TProtocol*)'
> /tmp/ccFRo65D.o: In function 
> `apache::airavata::api::Airavata_getWorkflow_result::write(apache::thrift::protocol::TProtocol*) 
> const':
> Register.cpp:(.text+0x4c36d): undefined reference to 
> `Workflow::write(apache::thrift::protocol::TProtocol*) const'
> /tmp/ccFRo65D.o: In function 
> `apache::airavata::api::Airavata_getWorkflow_presult::read(apache::thrift::protocol::TProtocol*)':
> Register.cpp:(.text+0x4c572): undefined reference to 
> `Workflow::read(apache::thrift::protocol::TProtocol*)'
> /tmp/ccFRo65D.o: In function 
> `apache::airavata::api::Airavata_registerWorkflow_args::read(apache::thrift::protocol::TProtocol*)':
> Register.cpp:(.text+0x4cef6): undefined reference to 
> `Workflow::read(apache::thrift::protocol::TProtocol*)'
> /tmp/ccFRo65D.o: In function 
> `apache::airavata::api::Airavata_registerWorkflow_args::write(apache::thrift::protocol::TProtocol*) 
> const':
> Register.cpp:(.text+0x4d0ad): undefined reference to 
> `Workflow::write(apache::thrift::protocol::TProtocol*) const'
> /tmp/ccFRo65D.o: In function 
> `apache::airavata::api::Airavata_registerWorkflow_pargs::write(apache::thrift::protocol::TProtocol*) 
> const':
> Register.cpp:(.text+0x4d189): undefined reference to 
> `Workflow::write(apache::thrift::protocol::TProtocol*) const'
> /tmp/ccFRo65D.o: In function 
> `apache::airavata::api::Airavata_updateWorkflow_args::read(apache::thrift::protocol::TProtocol*)':
> Register.cpp:(.text+0x4d86e): undefined reference to 
> `Workflow::read(apache::thrift::protocol::TProtocol*)'
> /tmp/ccFRo65D.o: In function 
> `apache::airavata::api::Airavata_updateWorkflow_args::write(apache::thrift::protocol::TProtocol*) 
> const':
> Register.cpp:(.text+0x4da25): undefined reference to 
> `Workflow::write(apache::thrift::protocol::TProtocol*) const'
> /tmp/ccFRo65D.o: In function 
> `apache::airavata::api::Airavata_updateWorkflow_pargs::write(apache::thrift::protocol::TProtocol*) 
> const':
> Register.cpp:(.text+0x4db01): undefined reference to 
> `Workflow::write(apache::thrift::protocol::TProtocol*) const'
>
> Regards,
> Priyanshu