Closed itamaro closed 9 years ago
Hi,
Looks like it's a cmake issue, I found something similar here https://github.com/ryanmelt/qtbindings/issues/106
Thanks.
I tried cmake .. -Drpcz_build_examples=0 -DCMAKE_INSTALL_PREFIX:PATH=/usr/local -DCMAKE_MINIMUM_REQUIRED_VERSION=3.3
and got an error about ZeroMQ includes missing, so I specified the include path explicitly like this: cmake .. -Drpcz_build_examples=0 -DCMAKE_INSTALL_PREFIX:PATH=/usr/local -DCMAKE_MINIMUM_REQUIRED_VERSION=3.3 -DZeroMQ_INCLUDE_DIR=/usr/local/include/
seemed to finish OK, but then make
fails:
~/work/rpcz/build (master)>make
[ 4%] Building CXX object src/rpcz/CMakeFiles/rpcz.dir/application.cc.o
/Users/itamar/work/rpcz/src/rpcz/application.cc:18:10: fatal error: 'zmq.hpp' file not found
#include <zmq.hpp>
^
1 error generated.
make[2]: *** [src/rpcz/CMakeFiles/rpcz.dir/application.cc.o] Error 1
make[1]: *** [src/rpcz/CMakeFiles/rpcz.dir/all] Error 2
make: *** [all] Error 2
I have zmq.h
in /usr/loca/include
. I don't understand where zmq.hpp
should be coming from...
It's from this project https://github.com/zeromq/cppzmq
Thanks again!
Moving forward:
~/work/rpcz/build (master)>make
[ 4%] Building CXX object src/rpcz/CMakeFiles/rpcz.dir/application.cc.o
[ 9%] Building CXX object src/rpcz/CMakeFiles/rpcz.dir/clock.cc.o
[ 13%] Building CXX object src/rpcz/CMakeFiles/rpcz.dir/connection_manager.cc.o
/Users/itamar/work/rpcz/src/rpcz/connection_manager.cc:338:9: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
if (!iter.next().size() == 0) {
^ ~~
/Users/itamar/work/rpcz/src/rpcz/connection_manager.cc:338:9: note: add parentheses after the '!' to evaluate the comparison first
if (!iter.next().size() == 0) {
^
( )
/Users/itamar/work/rpcz/src/rpcz/connection_manager.cc:338:9: note: add parentheses around left hand side expression to silence this warning
if (!iter.next().size() == 0) {
^
( )
/Users/itamar/work/rpcz/src/rpcz/connection_manager.cc:379:23: warning: private field 'connection_manager_' is not used [-Wunused-private-field]
connection_manager* connection_manager_;
^
2 warnings generated.
[ 18%] Building CXX object src/rpcz/CMakeFiles/rpcz.dir/reactor.cc.o
[ 22%] Building CXX object src/rpcz/CMakeFiles/rpcz.dir/rpc.cc.o
[ 27%] Building CXX object src/rpcz/CMakeFiles/rpcz.dir/rpc_channel_impl.cc.o
[ 31%] Building CXX object src/rpcz/CMakeFiles/rpcz.dir/server.cc.o
[ 36%] Building CXX object src/rpcz/CMakeFiles/rpcz.dir/sync_event.cc.o
[ 40%] Building CXX object src/rpcz/CMakeFiles/rpcz.dir/zmq_utils.cc.o
[ 45%] Building CXX object src/rpcz/CMakeFiles/rpcz.dir/rpcz.pb.cc.o
[ 50%] Linking CXX shared library librpcz.dylib
Undefined symbols for architecture x86_64:
"boost::system::system_category()", referenced from:
__GLOBAL__sub_I_application.cc in application.cc.o
rpcz::connection_manager::~connection_manager() in connection_manager.cc.o
boost::thread_group::join_all() in connection_manager.cc.o
boost::thread::start_thread() in connection_manager.cc.o
boost::condition_variable::condition_variable() in connection_manager.cc.o
boost::mutex::mutex() in connection_manager.cc.o
boost::unique_lock<boost::mutex>::unlock() in connection_manager.cc.o
...
"boost::system::generic_category()", referenced from:
__GLOBAL__sub_I_application.cc in application.cc.o
__GLOBAL__sub_I_connection_manager.cc in connection_manager.cc.o
__GLOBAL__sub_I_rpc.cc in rpc.cc.o
__GLOBAL__sub_I_rpc_channel_impl.cc in rpc_channel_impl.cc.o
__GLOBAL__sub_I_server.cc in server.cc.o
__GLOBAL__sub_I_sync_event.cc in sync_event.cc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/rpcz/librpcz.dylib] Error 1
make[1]: *** [src/rpcz/CMakeFiles/rpcz.dir/all] Error 2
make: *** [all] Error 2
Could you please show output of ls -l /usr/local/lib/libboost_system*
and make VERBOSE=1
sure:
>ls -l /usr/local/lib/libboost_system*
lrwxr-xr-x 1 itamar admin 47 Sep 9 14:16 /usr/local/lib/libboost_system-mt.a -> ../Cellar/boost/1.58.0/lib/libboost_system-mt.a
lrwxr-xr-x 1 itamar admin 51 Sep 9 14:16 /usr/local/lib/libboost_system-mt.dylib -> ../Cellar/boost/1.58.0/lib/libboost_system-mt.dylib
lrwxr-xr-x 1 itamar admin 44 Sep 9 14:16 /usr/local/lib/libboost_system.a -> ../Cellar/boost/1.58.0/lib/libboost_system.a
lrwxr-xr-x 1 itamar admin 48 Sep 9 14:16 /usr/local/lib/libboost_system.dylib -> ../Cellar/boost/1.58.0/lib/libboost_system.dylib
>make VERBOSE=1
/usr/local/Cellar/cmake/3.3.1/bin/cmake -H/Users/itamar/work/rpcz -B/Users/itamar/work/rpcz/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.3.1/bin/cmake -E cmake_progress_start /Users/itamar/work/rpcz/build/CMakeFiles /Users/itamar/work/rpcz/build/CMakeFiles/progress.marks
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/Makefile2 all
/Library/Developer/CommandLineTools/usr/bin/make -f src/rpcz/CMakeFiles/rpcz.dir/build.make src/rpcz/CMakeFiles/rpcz.dir/depend
cd /Users/itamar/work/rpcz/build && /usr/local/Cellar/cmake/3.3.1/bin/cmake -E cmake_depends "Unix Makefiles" /Users/itamar/work/rpcz /Users/itamar/work/rpcz/src/rpcz /Users/itamar/work/rpcz/build /Users/itamar/work/rpcz/build/src/rpcz /Users/itamar/work/rpcz/build/src/rpcz/CMakeFiles/rpcz.dir/DependInfo.cmake --color=
/Library/Developer/CommandLineTools/usr/bin/make -f src/rpcz/CMakeFiles/rpcz.dir/build.make src/rpcz/CMakeFiles/rpcz.dir/build
[ 4%] Linking CXX shared library librpcz.dylib
cd /Users/itamar/work/rpcz/build/src/rpcz && /usr/local/Cellar/cmake/3.3.1/bin/cmake -E cmake_link_script CMakeFiles/rpcz.dir/link.txt --verbose=1
/Library/Developer/CommandLineTools/usr/bin/c++ -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -O3 -DNDEBUG -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -o librpcz.dylib -install_name /Users/itamar/work/rpcz/build/src/rpcz/librpcz.dylib CMakeFiles/rpcz.dir/application.cc.o CMakeFiles/rpcz.dir/clock.cc.o CMakeFiles/rpcz.dir/connection_manager.cc.o CMakeFiles/rpcz.dir/reactor.cc.o CMakeFiles/rpcz.dir/rpc.cc.o CMakeFiles/rpcz.dir/rpc_channel_impl.cc.o CMakeFiles/rpcz.dir/server.cc.o CMakeFiles/rpcz.dir/sync_event.cc.o CMakeFiles/rpcz.dir/zmq_utils.cc.o CMakeFiles/rpcz.dir/rpcz.pb.cc.o /usr/local/lib/libzmq.dylib /usr/local/lib/libzmq.dylib /usr/local/lib/libprotobuf.dylib /usr/local/lib/libboost_thread-mt.dylib
Undefined symbols for architecture x86_64:
"boost::system::system_category()", referenced from:
__GLOBAL__sub_I_application.cc in application.cc.o
rpcz::connection_manager::~connection_manager() in connection_manager.cc.o
boost::thread_group::join_all() in connection_manager.cc.o
boost::thread::start_thread() in connection_manager.cc.o
boost::condition_variable::condition_variable() in connection_manager.cc.o
boost::mutex::mutex() in connection_manager.cc.o
boost::unique_lock<boost::mutex>::unlock() in connection_manager.cc.o
...
"boost::system::generic_category()", referenced from:
__GLOBAL__sub_I_application.cc in application.cc.o
__GLOBAL__sub_I_connection_manager.cc in connection_manager.cc.o
__GLOBAL__sub_I_rpc.cc in rpc.cc.o
__GLOBAL__sub_I_rpc_channel_impl.cc in rpc_channel_impl.cc.o
__GLOBAL__sub_I_server.cc in server.cc.o
__GLOBAL__sub_I_sync_event.cc in sync_event.cc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/rpcz/librpcz.dylib] Error 1
make[1]: *** [src/rpcz/CMakeFiles/rpcz.dir/all] Error 2
make: *** [all] Error 2
Ok, could you please try this patch https://github.com/xdmiodz/rpcz/blob/patch-1/src/rpcz/CMakeLists.txt. You can replace only the CMakeLists.txt, or checkout the branch as a whole.
Just for info, rpcz builds well in my OS X environment, but I use cmake3.0/boost1.57
I pulled your entire patch-1 branch and the build completed successfully. Thanks!
Merged @xdmiodz 's #14. Thanks everyone.
Thanks for the quick response! :-)
@thesamet:
Hi Itamar,
-Nadav
On Wed, Sep 9, 2015 at 11:12 PM, Itamar Ostricher notifications@github.com wrote:
Thanks for the quick response! :-)
@thesamet https://github.com/thesamet:
- will you be interested in a patch for OS/X installation instructions for the README? (based on homebrew)
- are you aware of a homebrew formula for installing rpcz? if not, assuming I will be able to contribute something that works, will you be interested in maintaining it?
— Reply to this email directly or view it on GitHub https://github.com/thesamet/rpcz/issues/13#issuecomment-139127191.
-Nadav
The README mentions that rpcz is tested on OS/X, but there are no installation instructions for OS/X.
I tried to improvise, but I didn't get very far...
I used Homebrew to install all dependencies (unfortunately I could not find a formula for installing rpcz using Homebrew - that would have been nice), and here's where I failed: