You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by huaxiang <hu...@asiainfo-linkage.com> on 2012/10/29 03:24:11 UTC
thrift-0.9.0 test failed ?
Hi,
After install thrift-0.9.0, and test it with tutorial cpp, failed with
error ' error while loading shared libraries: libthrift-0.9.0.so: cannot
open shared object file: No such file or directory',
What is problem?
****************below show the related information************************
[root@hadoop2 cpp]# pwd
/hadoop0/thrift-0.9.0/tutorial/cpp
[root@hadoop2 cpp]# ll
-rwxr-xr-x 1 root root 273514 10月 29 09:57 CppClient
-rw-r--r-- 1 root root 2413 10月 12 08:58 CppClient.cpp
-rwxr-xr-x 1 root root 324935 10月 29 09:57 CppServer
-rw-r--r-- 1 root root 4280 10月 12 08:58 CppServer.cpp
-rw-r--r-- 1 root root 1431 10月 26 16:26 Makefile
[root@hadoop2 cpp]# make
g++ -DHAVE_PTHREAD_H -o CppServer -I/hadoop0/thrift-0.9.0
-I/usr/include/boost -I../gen-cpp -L/usr/local/lib -lthrift CppServer.cpp
../gen-cpp/SharedService.cpp ../gen-cpp/shared_types.cpp
../gen-cpp/tutorial_types.cpp ../gen-cpp/Calculator.cpp -DHAVE_NETINET_IN_H
g++ -DHAVE_PTHREAD_H -o CppClient -I/hadoop0/thrift-0.9.0
-I/usr/include/boost -I../gen-cpp -L/usr/local/lib -lthrift CppClient.cpp
../gen-cpp/SharedService.cpp ../gen-cpp/shared_types.cpp
../gen-cpp/tutorial_types.cpp ../gen-cpp/Calculator.cpp -DHAVE_NETINET_IN_H
[root@hadoop2 cpp]# ./CppServer
./CppServer: error while loading shared libraries: libthrift-0.9.0.so:
cannot open shared object file: No such file or directory
[root@hadoop2 cpp]# ./CppClient
./CppClient: error while loading shared libraries: libthrift-0.9.0.so:
cannot open shared object file: No such file or directory
BestRegards,
>beatls
答复: thrift-0.9.0 test failed ?
Posted by huaxiang <hu...@asiainfo-linkage.com>.
Hi,
Yes, add /usr/local/lib to lib path. Now it works.
Thanks!
Beatls
-----邮件原件-----
发件人: roger@bufferoverflow.ch [mailto:roger@bufferoverflow.ch]
发送时间: 2012年10月29日 15:22
收件人: user@thrift.apache.org; huaxiang
主题: Re: thrift-0.9.0 test failed ?
Quoting huaxiang <hu...@asiainfo-linkage.com>:
> Hi,
> After install thrift-0.9.0, and test it with tutorial cpp, failed
> with error ' error while loading shared libraries: libthrift-0.9.0.so:
> cannot open shared object file: No such file or directory',
>
> What is problem?
/usr/local/lib is not within your library path.
do this before executing the CppServer and CppClient export
LD_LIBRARY_PATH=/usr/local/lib
>
> ****************below show the related
> information************************
>
> [root@hadoop2 cpp]# pwd
> /hadoop0/thrift-0.9.0/tutorial/cpp
> [root@hadoop2 cpp]# ll
> -rwxr-xr-x 1 root root 273514 10? 29 09:57 CppClient
> -rw-r--r-- 1 root root 2413 10? 12 08:58 CppClient.cpp
> -rwxr-xr-x 1 root root 324935 10? 29 09:57 CppServer
> -rw-r--r-- 1 root root 4280 10? 12 08:58 CppServer.cpp
> -rw-r--r-- 1 root root 1431 10? 26 16:26 Makefile
> [root@hadoop2 cpp]# make
> g++ -DHAVE_PTHREAD_H -o CppServer -I/hadoop0/thrift-0.9.0
> -I/usr/include/boost -I../gen-cpp -L/usr/local/lib -lthrift
> CppServer.cpp ../gen-cpp/SharedService.cpp ../gen-cpp/shared_types.cpp
> ../gen-cpp/tutorial_types.cpp ../gen-cpp/Calculator.cpp
> -DHAVE_NETINET_IN_H
> g++ -DHAVE_PTHREAD_H -o CppClient -I/hadoop0/thrift-0.9.0
> -I/usr/include/boost -I../gen-cpp -L/usr/local/lib -lthrift
> CppClient.cpp ../gen-cpp/SharedService.cpp ../gen-cpp/shared_types.cpp
> ../gen-cpp/tutorial_types.cpp ../gen-cpp/Calculator.cpp
> -DHAVE_NETINET_IN_H
> [root@hadoop2 cpp]# ./CppServer
> ./CppServer: error while loading shared libraries: libthrift-0.9.0.so:
> cannot open shared object file: No such file or directory
> [root@hadoop2 cpp]# ./CppClient
> ./CppClient: error while loading shared libraries: libthrift-0.9.0.so:
> cannot open shared object file: No such file or directory
>
>
>
> BestRegards,
>> beatls
>
>
>
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
Re: thrift-0.9.0 test failed ?
Posted by ro...@bufferoverflow.ch.
Quoting huaxiang <hu...@asiainfo-linkage.com>:
> Hi,
> After install thrift-0.9.0, and test it with tutorial cpp, failed with
> error ' error while loading shared libraries: libthrift-0.9.0.so: cannot
> open shared object file: No such file or directory',
>
> What is problem?
/usr/local/lib is not within your library path.
do this before executing the CppServer and CppClient
export LD_LIBRARY_PATH=/usr/local/lib
>
> ****************below show the related information************************
>
> [root@hadoop2 cpp]# pwd
> /hadoop0/thrift-0.9.0/tutorial/cpp
> [root@hadoop2 cpp]# ll
> -rwxr-xr-x 1 root root 273514 10? 29 09:57 CppClient
> -rw-r--r-- 1 root root 2413 10? 12 08:58 CppClient.cpp
> -rwxr-xr-x 1 root root 324935 10? 29 09:57 CppServer
> -rw-r--r-- 1 root root 4280 10? 12 08:58 CppServer.cpp
> -rw-r--r-- 1 root root 1431 10? 26 16:26 Makefile
> [root@hadoop2 cpp]# make
> g++ -DHAVE_PTHREAD_H -o CppServer -I/hadoop0/thrift-0.9.0
> -I/usr/include/boost -I../gen-cpp -L/usr/local/lib -lthrift CppServer.cpp
> ../gen-cpp/SharedService.cpp ../gen-cpp/shared_types.cpp
> ../gen-cpp/tutorial_types.cpp ../gen-cpp/Calculator.cpp -DHAVE_NETINET_IN_H
> g++ -DHAVE_PTHREAD_H -o CppClient -I/hadoop0/thrift-0.9.0
> -I/usr/include/boost -I../gen-cpp -L/usr/local/lib -lthrift CppClient.cpp
> ../gen-cpp/SharedService.cpp ../gen-cpp/shared_types.cpp
> ../gen-cpp/tutorial_types.cpp ../gen-cpp/Calculator.cpp -DHAVE_NETINET_IN_H
> [root@hadoop2 cpp]# ./CppServer
> ./CppServer: error while loading shared libraries: libthrift-0.9.0.so:
> cannot open shared object file: No such file or directory
> [root@hadoop2 cpp]# ./CppClient
> ./CppClient: error while loading shared libraries: libthrift-0.9.0.so:
> cannot open shared object file: No such file or directory
>
>
>
> BestRegards,
>> beatls
>
>
>
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
Re: Specific Boost Lib Dependencies for C++ Thrift Server
Posted by Tarun Goyal <jo...@gmail.com>.
For Thread server you need libboost_thread lib only.
Other libs depends on your requirement.
Thanks,
Tarun
On Tue, Oct 30, 2012 at 10:36 PM, Al Ross <ar...@terremark.com> wrote:
> Hi,
>
> I'm trying to get thrift to build in a cross compile environment for an
> embedded power pc processor. All I need is a C++ thrift server in that
> environment. As of now getting boost to build nicely in that environment
> is a struggle. Does anyone know off hand what are the specific boost
> libs that a thrift C++ server requires? If I can reduce the number of
> boost items to build that would be a help.
>
> Thanks,
> Alan Ross
>
--
Regards,
Tarun
Specific Boost Lib Dependencies for C++ Thrift Server
Posted by Al Ross <ar...@terremark.com>.
Hi,
I'm trying to get thrift to build in a cross compile environment for an
embedded power pc processor. All I need is a C++ thrift server in that
environment. As of now getting boost to build nicely in that environment
is a struggle. Does anyone know off hand what are the specific boost
libs that a thrift C++ server requires? If I can reduce the number of
boost items to build that would be a help.
Thanks,
Alan Ross