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

Fix zmq version check #478

Merged
merged 1 commit into from Mar 26, 2020
Merged

Conversation

ChillerDragon
Copy link
Contributor

zmq.h

#define ZMQ_VERSION_MAJOR 4
#define ZMQ_VERSION_MINOR 3
#define ZMQ_VERSION_PATCH 1

#define ZMQ_MAKE_VERSION(major, minor, patch)                                  \
    ((major) *10000 + (minor) *100 + (patch))
#define ZMQ_VERSION                                                            \
    ZMQ_MAKE_VERSION (ZMQ_VERSION_MAJOR, ZMQ_VERSION_MINOR, ZMQ_VERSION_PATCH)

error without fix:

$ make
[  1%] Automatic MOC for target openshot
[  1%] Built target openshot_autogen
Scanning dependencies of target openshot
[  2%] Building CXX object src/CMakeFiles/openshot.dir/ZmqLogger.cpp.o
/home/chiller/Desktop/git-extern/libopenshot/src/ZmqLogger.cpp: In member function ‘void openshot::ZmqLogger::Log(std::__cxx11::string)’:
/home/chiller/Desktop/git-extern/libopenshot/src/ZmqLogger.cpp:125:30: error: no matching function for call to ‘zmq::message_t::message_t(std::__cxx11::string&)’
  zmq::message_t reply(message);
                              ^
In file included from /home/chiller/Desktop/git-extern/libopenshot/src/../include/ZmqLogger.h:43,
                 from /home/chiller/Desktop/git-extern/libopenshot/src/ZmqLogger.cpp:31:
/usr/include/zmq.hpp:247:16: note: candidate: ‘zmq::message_t::message_t(zmq::message_t&&)’
         inline message_t (message_t &&rhs): msg (rhs.msg)
                ^~~~~~~~~
/usr/include/zmq.hpp:247:16: note:   no known conversion for argument 1 from ‘std::__cxx11::string’ {aka ‘std::__cxx11::basic_string<char>’} to ‘zmq::message_t&&’
/usr/include/zmq.hpp:238:16: note: candidate: ‘zmq::message_t::message_t(void*, size_t, void (*)(void*, void*), void*)’
         inline message_t (void *data_, size_t size_, free_fn *ffn_,
                ^~~~~~~~~
/usr/include/zmq.hpp:238:16: note:   candidate expects 4 arguments, 1 provided
/usr/include/zmq.hpp:230:16: note: candidate: ‘zmq::message_t::message_t(const void*, size_t)’
         inline message_t (const void *data_, size_t size_)
                ^~~~~~~~~
/usr/include/zmq.hpp:230:16: note:   candidate expects 2 arguments, 1 provided
/usr/include/zmq.hpp:212:30: note: candidate: ‘template<class I> zmq::message_t::message_t(I, I)’
         template<typename I> message_t(I first, I last):
                              ^~~~~~~~~
/usr/include/zmq.hpp:212:30: note:   template argument deduction/substitution failed:
/home/chiller/Desktop/git-extern/libopenshot/src/ZmqLogger.cpp:125:30: note:   candidate expects 2 arguments, 1 provided
  zmq::message_t reply(message);
                              ^
In file included from /home/chiller/Desktop/git-extern/libopenshot/src/../include/ZmqLogger.h:43,
                 from /home/chiller/Desktop/git-extern/libopenshot/src/ZmqLogger.cpp:31:
/usr/include/zmq.hpp:205:25: note: candidate: ‘zmq::message_t::message_t(size_t)’
         inline explicit message_t (size_t size_)
                         ^~~~~~~~~
/usr/include/zmq.hpp:205:25: note:   no known conversion for argument 1 from ‘std::__cxx11::string’ {aka ‘std::__cxx11::basic_string<char>’} to ‘size_t’ {aka ‘long unsigned int’}
/usr/include/zmq.hpp:198:16: note: candidate: ‘zmq::message_t::message_t()’
         inline message_t ()
                ^~~~~~~~~
/usr/include/zmq.hpp:198:16: note:   candidate expects 0 arguments, 1 provided
/home/chiller/Desktop/git-extern/libopenshot/src/ZmqLogger.cpp:128:30: error: ‘zmq::send_flags’ has not been declared
  publisher->send(reply, zmq::send_flags::dontwait);
                              ^~~~~~~~~~
make[2]: *** [src/CMakeFiles/openshot.dir/build.make:414: src/CMakeFiles/openshot.dir/ZmqLogger.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:164: src/CMakeFiles/openshot.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

@ChillerDragon
Copy link
Contributor Author

Oh nvm probably a dupe of #476

@ferdnyc
Copy link
Contributor

ferdnyc commented Mar 26, 2020

Actually it might not be. We're having the same trouble on some of our build hosts, the deprecation is DOCUMENTED as taking effect in 4.3.1 but now I'm starting to wonder. If this fixes things for you I'm inclined to go with it.

@ferdnyc ferdnyc reopened this Mar 26, 2020
@ferdnyc
Copy link
Contributor

ferdnyc commented Mar 26, 2020

(Still won't fix our Mac builder, which is running 4.3.2 yet somehow still doesn't like the new code.)

@codecov-io
Copy link

Codecov Report

Merging #478 into develop will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #478   +/-   ##
========================================
  Coverage    48.13%   48.13%           
========================================
  Files          128      128           
  Lines         9933     9933           
========================================
  Hits          4781     4781           
  Misses        5152     5152           
Impacted Files Coverage Δ
src/ZmqLogger.cpp 29.33% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4fad197...95e3b15. Read the comment docs.

@ferdnyc
Copy link
Contributor

ferdnyc commented Mar 26, 2020

Passes Travis, so... Merging, thanks!

@ferdnyc ferdnyc merged commit 0a5dfd9 into OpenShot:develop Mar 26, 2020
@ferdnyc
Copy link
Contributor

ferdnyc commented Mar 26, 2020

Indeed, this change fixed both of our Windows builds, as that machine is running 4.3.1.

The Mac builder, which reports its ZeroMQ version as 4.3.2 yet inexplicably fails to compile the new code, is now the only remaining concern.

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

Successfully merging this pull request may close these issues.

None yet

3 participants