当我输入make命令时,安装jzmq会发现错误:未在此范围内声明'ZMQ_ROUTER_HANDOVER'

时间:2019-07-10 08:25:48

标签: zeromq jzmq

我按照步骤逐步在centos上安装zeromq和jzmq

$ cd jzmq-jni/
$ ./autogen.sh
$ ./configure
$ make
$ make install

当我输入make时,找到错误。

Socket.cpp:343:10:错误:未在此范围内声明'ZMQ_ROUTER_HANDOVER'      案例ZMQ_ROUTER_HANDOVER:

Making all in src/main/c++
make[1]: Entering directory `/home/centos/Documents/zeromq-3.2.5/jzmq/jzmq-jni/src/main/c++'
make  all-am
make[2]: Entering directory `/home/centos/Documents/zeromq-3.2.5/jzmq/jzmq-jni/src/main/c++'
/bin/sh ../../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.   -D_REENTRANT -D_THREAD_SAFE  -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/include/linux -Wall -g -O2 -MT libjzmq_la-ZMQ.lo -MD -MP -MF .deps/libjzmq_la-ZMQ.Tpo -c -o libjzmq_la-ZMQ.lo `test -f 'ZMQ.cpp' || echo './'`ZMQ.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -D_REENTRANT -D_THREAD_SAFE -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/include/linux -Wall -g -O2 -MT libjzmq_la-ZMQ.lo -MD -MP -MF .deps/libjzmq_la-ZMQ.Tpo -c ZMQ.cpp  -fPIC -DPIC -o .libs/libjzmq_la-ZMQ.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -D_REENTRANT -D_THREAD_SAFE -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/include/linux -Wall -g -O2 -MT libjzmq_la-ZMQ.lo -MD -MP -MF .deps/libjzmq_la-ZMQ.Tpo -c ZMQ.cpp -o libjzmq_la-ZMQ.o >/dev/null 2>&1
mv -f .deps/libjzmq_la-ZMQ.Tpo .deps/libjzmq_la-ZMQ.Plo
/bin/sh ../../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.   -D_REENTRANT -D_THREAD_SAFE  -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/include/linux -Wall -g -O2 -MT libjzmq_la-Context.lo -MD -MP -MF .deps/libjzmq_la-Context.Tpo -c -o libjzmq_la-Context.lo `test -f 'Context.cpp' || echo './'`Context.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -D_REENTRANT -D_THREAD_SAFE -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/include/linux -Wall -g -O2 -MT libjzmq_la-Context.lo -MD -MP -MF .deps/libjzmq_la-Context.Tpo -c Context.cpp  -fPIC -DPIC -o .libs/libjzmq_la-Context.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -D_REENTRANT -D_THREAD_SAFE -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/include/linux -Wall -g -O2 -MT libjzmq_la-Context.lo -MD -MP -MF .deps/libjzmq_la-Context.Tpo -c Context.cpp -o libjzmq_la-Context.o >/dev/null 2>&1
mv -f .deps/libjzmq_la-Context.Tpo .deps/libjzmq_la-Context.Plo
/bin/sh ../../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.   -D_REENTRANT -D_THREAD_SAFE  -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/include/linux -Wall -g -O2 -MT libjzmq_la-Socket.lo -MD -MP -MF .deps/libjzmq_la-Socket.Tpo -c -o libjzmq_la-Socket.lo `test -f 'Socket.cpp' || echo './'`Socket.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -D_REENTRANT -D_THREAD_SAFE -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/include -I/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/include/linux -Wall -g -O2 -MT libjzmq_la-Socket.lo -MD -MP -MF .deps/libjzmq_la-Socket.Tpo -c Socket.cpp  -fPIC -DPIC -o .libs/libjzmq_la-Socket.o
Socket.cpp: In function 'void Java_org_zeromq_ZMQ_00024Socket_setLongSockopt(JNIEnv*, jobject, jint, jlong)':
Socket.cpp:343:10: error: 'ZMQ_ROUTER_HANDOVER' was not declared in this scope
     case ZMQ_ROUTER_HANDOVER: 
          ^
make[2]: *** [libjzmq_la-Socket.lo] Error 1
make[2]: Leaving directory `/home/centos/Documents/zeromq-3.2.5/jzmq/jzmq-jni/src/main/c++'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/centos/Documents/zeromq-3.2.5/jzmq/jzmq-jni/src/main/c++'
make: *** [all-recursive] Error 1

0 个答案:

没有答案