You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "James E. King III (JIRA)" <ji...@apache.org> on 2018/10/09 15:47:00 UTC

[jira] [Assigned] (THRIFT-4649) Error when attempting to link Thrift Server in C++

     [ https://issues.apache.org/jira/browse/THRIFT-4649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James E. King III reassigned THRIFT-4649:
-----------------------------------------

    Assignee: James E. King III

> Error when attempting to link Thrift Server in C++ 
> ---------------------------------------------------
>
>                 Key: THRIFT-4649
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4649
>             Project: Thrift
>          Issue Type: Question
>          Components: C++ - Compiler
>    Affects Versions: 0.10.0
>         Environment: Ubuntu 18.04 LTS with all prerequisites on latest from apt install
>            Reporter: Erik
>            Assignee: James E. King III
>            Priority: Major
>
> I am attempting to compile Thrift with a particular flag .. in this case
> {code:java}
> ./configure _GLIBCXX_USE_CXX11_ABI=0{code}
> This compiles just fine, and the library installs successfully to /usr/local/lib, but when I am attempting to link it seems to want the non-blocking library.. I've attempted to add it to no avail
>   
>  
> {code:java}
> #!/bin/sh
> echo "Step 1: change to build dir"
> cd build
> echo "Step 2: compile"
> g++ -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 -c ../src/Server/MyServer.cpp ../src/gen-cpp/*.cpp -std=c++11 -I/usr/local/include/thrift -I../deps/another_lib/Includes
> echo "Step 3: link"
> g++ -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H -std=c++11 -Wall *.o -L../deps/another_lib -L../deps/libone -L../deps/libtwo -lanother_lib -L/usr/local/lib -lthrift -lthriftnb -llogger -lanotherlogger -lpthread -o My-Cpp-Server
> echo "Step 4: change back dirs"
> cd ..
> {code}
>  
> It feels like it is attempting to link, but cannot see the non-blocking library.. 
>  
> {code:java}
> virtual-machine:~/Dev/git/project$ sh build-cpp-server.sh
> Step 1: change to build dir
> Step 2: compile
> Step 3: link
> Rio.o: In function `rio::RioConcurrentClient::recv_init(int)':
> Rio.cpp:(.text+0x3293): undefined reference to `apache::thrift::async::TConcurrentClientSyncInfo::getPending(std::string&, apache::thrift::protocol::TMessageType&, int&)'
> Rio.cpp:(.text+0x360e): undefined reference to `apache::thrift::async::TConcurrentClientSyncInfo::updatePending(std::string const&, apache::thrift::protocol::TMessageType, int)'
> Rio.o: In function `rio::RioConcurrentClient::recv_manipulate_can(int)':
> Rio.cpp:(.text+0x39d2): undefined reference to `apache::thrift::async::TConcurrentClientSyncInfo::getPending(std::string&, apache::thrift::protocol::TMessageType&, int&)'
> Rio.cpp:(.text+0x3d37): undefined reference to `apache::thrift::async::TConcurrentClientSyncInfo::updatePending(std::string const&, apache::thrift::protocol::TMessageType, int)'
> collect2: error: ld returned 1 exit status
> Step 4: change back dirs
> {code}
> any ideas?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)