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

Compilation fails with zmq 3 #1

Closed
michaelmior opened this issue Jan 28, 2014 · 2 comments
Closed

Compilation fails with zmq 3 #1

michaelmior opened this issue Jan 28, 2014 · 2 comments

Comments

@michaelmior
Copy link

Using libzmq 3.2.4 on Ubuntu 12.04. Works fine with 2.2.0.

$ configure
Configuring Zurl ...
Verifying Qt 4 build environment ... ok
Checking for Qt >= 4.7.0 ... yes
Checking for libcurl >= 7.20 ... yes
Checking for libzmq >= 2.0 ... yes
Checking for qjson ... yes

Good, your configure finished.  Now run /usr/bin/make.

$ make
cd src/pro/libzurl/ && /usr/bin/qmake-qt4 /home/mmior/apps/zurl/src/pro/libzurl/libzurl.pro -o Makefile
cd src/pro/libzurl/ && make -f Makefile 
make[1]: Entering directory `/home/mmior/apps/zurl/src/pro/libzurl'
gcc -c -m64 -pipe -O2 -fPIC -Wall -W -D_REENTRANT -DQT_WEBKIT -DNO_IRISNET -DUSE_CURL -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4 -I/usr/include/qt4 -I../../../src -I../../jdns -I../../jdnsshared -I../../qzmq/src -I../../common -I_moc -o _obj/jdns_util.o ../../jdns/jdns_util.c
gcc -c -m64 -pipe -O2 -fPIC -Wall -W -D_REENTRANT -DQT_WEBKIT -DNO_IRISNET -DUSE_CURL -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4 -I/usr/include/qt4 -I../../../src -I../../jdns -I../../jdnsshared -I../../qzmq/src -I../../common -I_moc -o _obj/jdns_packet.o ../../jdns/jdns_packet.c
gcc -c -m64 -pipe -O2 -fPIC -Wall -W -D_REENTRANT -DQT_WEBKIT -DNO_IRISNET -DUSE_CURL -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4 -I/usr/include/qt4 -I../../../src -I../../jdns -I../../jdnsshared -I../../qzmq/src -I../../common -I_moc -o _obj/jdns_mdnsd.o ../../jdns/jdns_mdnsd.c
gcc -c -m64 -pipe -O2 -fPIC -Wall -W -D_REENTRANT -DQT_WEBKIT -DNO_IRISNET -DUSE_CURL -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4 -I/usr/include/qt4 -I../../../src -I../../jdns -I../../jdnsshared -I../../qzmq/src -I../../common -I_moc -o _obj/jdns_sys.o ../../jdns/jdns_sys.c
gcc -c -m64 -pipe -O2 -fPIC -Wall -W -D_REENTRANT -DQT_WEBKIT -DNO_IRISNET -DUSE_CURL -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4 -I/usr/include/qt4 -I../../../src -I../../jdns -I../../jdnsshared -I../../qzmq/src -I../../common -I_moc -o _obj/jdns.o ../../jdns/jdns.c
g++ -c -m64 -pipe -O2 -fPIC -Wall -W -D_REENTRANT -DQT_WEBKIT -DNO_IRISNET -DUSE_CURL -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4 -I/usr/include/qt4 -I../../../src -I../../jdns -I../../jdnsshared -I../../qzmq/src -I../../common -I_moc -o _obj/qjdns_sock.o ../../jdns/qjdns_sock.cpp
/usr/bin/moc-qt4 -DQT_WEBKIT -DNO_IRISNET -DUSE_CURL -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4 -I/usr/include/qt4 -I../../../src -I../../jdns -I../../jdnsshared -I../../qzmq/src -I../../common -I_moc ../../jdns/qjdns.cpp -o _moc/qjdns.moc
g++ -c -m64 -pipe -O2 -fPIC -Wall -W -D_REENTRANT -DQT_WEBKIT -DNO_IRISNET -DUSE_CURL -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4 -I/usr/include/qt4 -I../../../src -I../../jdns -I../../jdnsshared -I../../qzmq/src -I../../common -I_moc -o _obj/qjdns.o ../../jdns/qjdns.cpp
In file included from /usr/include/qt4/QtCore/QtCore:92:0,
                 from ../../jdns/qjdns.h:29,
                 from ../../jdns/qjdns.cpp:24:
/usr/include/qt4/QtCore/qtconcurrentfilter.h: In function 'QtConcurrent::ThreadEngineStarter<void> QtConcurrent::filterInternal(Sequence&, KeepFunctor, ReduceFunctor)':
/usr/include/qt4/QtCore/qtconcurrentfilter.h:108:47: warning: typedef 'Iterator' locally defined but not used [-Wunused-local-typedefs]
     typedef typename Sequence::const_iterator Iterator;
                                               ^
/usr/bin/moc-qt4 -DQT_WEBKIT -DNO_IRISNET -DUSE_CURL -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4 -I/usr/include/qt4 -I../../../src -I../../jdns -I../../jdnsshared -I../../qzmq/src -I../../common -I_moc ../../jdnsshared/jdnsshared.cpp -o _moc/jdnsshared.moc
g++ -c -m64 -pipe -O2 -fPIC -Wall -W -D_REENTRANT -DQT_WEBKIT -DNO_IRISNET -DUSE_CURL -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4 -I/usr/include/qt4 -I../../../src -I../../jdns -I../../jdnsshared -I../../qzmq/src -I../../common -I_moc -o _obj/jdnsshared.o ../../jdnsshared/jdnsshared.cpp
In file included from /usr/include/qt4/QtCore/QtCore:92:0,
                 from ../../jdns/qjdns.h:29,
                 from ../../jdnsshared/jdnsshared.h:24,
                 from ../../jdnsshared/jdnsshared.cpp:36:
/usr/include/qt4/QtCore/qtconcurrentfilter.h: In function 'QtConcurrent::ThreadEngineStarter<void> QtConcurrent::filterInternal(Sequence&, KeepFunctor, ReduceFunctor)':
/usr/include/qt4/QtCore/qtconcurrentfilter.h:108:47: warning: typedef 'Iterator' locally defined but not used [-Wunused-local-typedefs]
     typedef typename Sequence::const_iterator Iterator;
                                               ^
g++ -c -m64 -pipe -O2 -fPIC -Wall -W -D_REENTRANT -DQT_WEBKIT -DNO_IRISNET -DUSE_CURL -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4 -I/usr/include/qt4 -I../../../src -I../../jdns -I../../jdnsshared -I../../qzmq/src -I../../common -I_moc -o _obj/qzmqcontext.o ../../qzmq/src/qzmqcontext.cpp
/usr/bin/moc-qt4 -DQT_WEBKIT -DNO_IRISNET -DUSE_CURL -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4 -I/usr/include/qt4 -I../../../src -I../../jdns -I../../jdnsshared -I../../qzmq/src -I../../common -I_moc ../../qzmq/src/qzmqsocket.cpp -o _moc/qzmqsocket.moc
g++ -c -m64 -pipe -O2 -fPIC -Wall -W -D_REENTRANT -DQT_WEBKIT -DNO_IRISNET -DUSE_CURL -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4 -I/usr/include/qt4 -I../../../src -I../../jdns -I../../jdnsshared -I../../qzmq/src -I../../common -I_moc -o _obj/qzmqsocket.o ../../qzmq/src/qzmqsocket.cpp
../../qzmq/src/qzmqsocket.cpp: In function 'int QZmq::get_hwm(void*)':
../../qzmq/src/qzmqsocket.cpp:106:33: error: 'ZMQ_HWM' was not declared in this scope
  int ret = zmq_getsockopt(sock, ZMQ_HWM, &hwm, &opt_len);
                                 ^
../../qzmq/src/qzmqsocket.cpp: In function 'void QZmq::set_hwm(void*, int)':
../../qzmq/src/qzmqsocket.cpp:115:33: error: 'ZMQ_HWM' was not declared in this scope
  int ret = zmq_setsockopt(sock, ZMQ_HWM, &v, opt_len);
                                 ^
../../qzmq/src/qzmqsocket.cpp: In member function 'void QZmq::Socket::Private::write(const QList<QByteArray>&)':
../../qzmq/src/qzmqsocket.cpp:282:89: error: too few arguments to function 'int zmq_send(void*, const void*, size_t, int)'
     ret = zmq_send(sock, &msg, ZMQ_NOBLOCK | (n + 1 < message.count() ? ZMQ_SNDMORE : 0));
                                                                                         ^
In file included from ../../qzmq/src/qzmqsocket.cpp:32:0:
/usr/include/zmq.h:349:16: note: declared here
 ZMQ_EXPORT int zmq_send (void *s, const void *buf, size_t len, int flags);
                ^
../../qzmq/src/qzmqsocket.cpp: In member function 'bool QZmq::Socket::Private::tryWrite(int*)':
../../qzmq/src/qzmqsocket.cpp:337:84: error: too few arguments to function 'int zmq_send(void*, const void*, size_t, int)'
    ret = zmq_send(sock, &msg, ZMQ_NOBLOCK | (message.count() > 1 ? ZMQ_SNDMORE : 0));
                                                                                    ^
In file included from ../../qzmq/src/qzmqsocket.cpp:32:0:
/usr/include/zmq.h:349:16: note: declared here
 ZMQ_EXPORT int zmq_send (void *s, const void *buf, size_t len, int flags);
                ^
../../qzmq/src/qzmqsocket.cpp: In member function 'bool QZmq::Socket::Private::tryRead(bool*)':
../../qzmq/src/qzmqsocket.cpp:373:32: error: too few arguments to function 'int zmq_recv(void*, void*, size_t, int)'
    ret = zmq_recv(sock, &msg, 0);
                                ^
In file included from ../../qzmq/src/qzmqsocket.cpp:32:0:
/usr/include/zmq.h:350:16: note: declared here
 ZMQ_EXPORT int zmq_recv (void *s, void *buf, size_t len, int flags);
                ^
make[1]: *** [_obj/qzmqsocket.o] Error 1
make[1]: Leaving directory `/home/mmior/apps/zurl/src/pro/libzurl'
make: *** [sub-src-pro-libzurl-make_default] Error 2
@jkarneges
Copy link
Member

Thanks for the report. This is something I'd been putting off for far too long. I've fixed and tested with libzmq 2, 3, and 4. You'll need to update submodules.

@michaelmior
Copy link
Author

Thanks! Works great :)

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