Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[COMPILER WARM] Compiler warm in master/openflow_master #4

Closed
renzhengeek opened this issue Jun 20, 2014 · 4 comments
Closed

[COMPILER WARM] Compiler warm in master/openflow_master #4

renzhengeek opened this issue Jun 20, 2014 · 4 comments

Comments

@renzhengeek
Copy link
Collaborator

1.when building project, compiler says:

renzhen@rabit:~/openflow/openflow$ scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o master/master_handler.o -c -Wall -O2 -g -I. -I/home/renzhen/openflow/thirdparty -I/home/renzhen/openflow/thirdparty/boost/include -I/home/renzhen/openflow/thirdparty/thrift/include -I/home/renzhen/openflow/thirdparty/glog/include -I/home/renzhen/openflow/thirdparty/gflags/include -I/home/renzhen/openflow/thirdparty/gtest/include master/master_handler.cpp
g++ -o master/openflow_master -static master/main.o master/master_handler.o -L/home/renzhen/openflow/thirdparty/boost/lib -L/home/renzhen/openflow/thirdparty/thrift/lib -L/home/renzhen/openflow/thirdparty/glog/lib -L/home/renzhen/openflow/thirdparty/gflags/lib -L/home/renzhen/openflow/thirdparty/gtest/lib -Lrpc/master -Lrpc/agent -lmaster -lagent -lagent -lmaster -lmaster -lthrift -lglog -lgflags -lgtest
**/home/renzhen/openflow/thirdparty/thrift/lib/libthrift.a(TServerSocket.o): In function `apache::thrift::transport::TServerSocket::listen()':
/home/renzhen/openflow/thirdparty/thrift-0.9.1/lib/cpp/src/thrift/transport/TServerSocket.cpp:183: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking**
g++ -o tools/deque_test -static tools/deque_test.o -L/home/renzhen/openflow/thirdparty/boost/lib -L/home/renzhen/openflow/thirdparty/thrift/lib -L/home/renzhen/openflow/thirdparty/glog/lib -L/home/renzhen/openflow/thirdparty/gflags/lib -L/home/renzhen/openflow/thirdparty/gtest/lib -Lrpc/master -Lrpc/agent -lmaster -lagent -lagent -lmaster -lmaster -lthrift -lglog -lgflags -lgtest
scons: done building targets.

2.ignore this warning, go on starting openflow_master server(is ok), and test client(not ok) with output:

renzhen@rabit:~/openflow/openflow/master/client$ ./client 
Thrift: Fri Jun 20 15:16:55 2014 TSocket::open() getaddrinfo() <Host: localhost Port: 9090>Name or service not known

I wil find out what's going on.

@renzhengeek
Copy link
Collaborator Author

1.look at this:

g++ -o master/openflow_master -static master/main.o master/master_handler.o -L/home/renzhen/openflow/thirdparty/boost/lib -L/home/renzhen/openflow/thirdparty/thrift/lib -L/home/renzhen/openflow/thirdparty/glog/lib -L/home/renzhen/openflow/thirdparty/gflags/lib -L/home/renzhen/openflow/thirdparty/gtest/lib -Lrpc/master -Lrpc/agent -lmaster -lagent -lagent -lmaster -lmaster -lthrift -lglog -lgflags -lgtest

and

 g++ -o master/client/client -static master/client/client.o -L/home/renzhen/openflow/thirdparty/boost/lib -L/home/renzhen/openflow/thirdparty/thrift/lib -L/home/renzhen/openflow/thirdparty/glog/lib -L/home/renzhen/openflow/thirdparty/gflags/lib -L/home/renzhen/openflow/thirdparty/gtest/lib -Lrpc/master -Lrpc/agent -lmaster -lagent -lagent -lmaster -lmaster -lthrift -lglog -lgflags -lgtest

2.if not including -static, everything is okay.

@helight
Copy link
Owner

helight commented Jun 20, 2014

TSocket::open() getaddrinfo() <Host: localhost Port: 9090>Name or service not known

这种问题,我们直接使用ip地址,不要使用域名,就可以了

@helight
Copy link
Owner

helight commented Jun 20, 2014

静态编译是为了发布不依赖执行机器本地库,不会因为编译机器和发布执行机的库不一致而出现问题

@renzhengeek
Copy link
Collaborator Author

好的, 我试试~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants