[zeromq-dev] ZeroMQ 4.0.4 stable released

Frank Hartmann soundart at gmx.net
Sun Mar 16 20:27:28 CET 2014


Frank Hartmann <soundart at gmx.net> writes:

> Pieter Hintjens <ph at imatix.com> writes:
>
>> On Sun, Mar 16, 2014 at 1:16 PM, Frank Hartmann <soundart at gmx.net> wrote:
>>
>>> Hm I tried, but did not get master to compile with or without cmake :)
>>> Is the "norm" thing now required or did I hit the middle of something?
>>
>> It's in the middle of something; broken pull request.
>
>
> Ok, I am now at commit 72c02b15694586a8b5afc6d7d2de025c358b6bb1 - the one before the "norm" pull.
> and have build libzmq with autogen.sh flow and with cmake.
>
> Using autogen I have 
>
> $ git clone libzmq libzmq-autoconf
> $ cd libzmq-autoconf
> $ ./autogen.sh 
> $ cd ..
> $ mkdir build-autoconf
> $ cd build-autoconf/
> $ ../libzmq-autoconf/configure 
> $ make -j8
> $ make check
>
> "All 51 tests behaved as expected (1 expected failure)"
> -------------------------------------------------
>
>
> On the other hand, using cmake "test_fork" hangs
>
> $ git clone libzmq libzmq-cmake
> $ mkdir build
> $ cd build
> $ cmake ../libzmq-cmake
> $ make -j8 
> $ make test
>
>
> $ bin/test_fork
> Assertion failed: ok (/home/frank/curve/libzmq/src/mailbox.cpp:82)
> Aborted
>
>
> and hangs afterwards... I will try to compare build details(flags?).

Ok that was quite stupid. Basically -DHAVE_FORK=1 was missing in the
cmake build. Do you need a github pull request?

have fun
  Frank

frank at spirou:~/curve/libzmq$ git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f5a378e..cdf057c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -122,6 +122,10 @@ set(CMAKE_REQUIRED_LIBRARIES rt)
 check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
 set(CMAKE_REQUIRED_LIBRARIES )
 
+set(CMAKE_REQUIRED_INCLUDES unistd.h)
+check_function_exists(fork HAVE_FORK)
+set(CMAKE_REQUIRED_INCLUDES )
+
 set(CMAKE_REQUIRED_INCLUDES sys/time.h)
 check_function_exists(gethrtime HAVE_GETHRTIME)
 set(CMAKE_REQUIRED_INCLUDES )
diff --git a/builds/cmake/platform.hpp.in b/builds/cmake/platform.hpp.in
index f101c8f..8dec013 100644
--- a/builds/cmake/platform.hpp.in
+++ b/builds/cmake/platform.hpp.in
@@ -10,6 +10,7 @@
 #cmakedefine ZMQ_FORCE_MUTEXES
 
 
+#cmakedefine01 HAVE_FORK
 #cmakedefine HAVE_CLOCK_GETTIME
 #cmakedefine HAVE_GETHRTIME
 #cmakedefine ZMQ_HAVE_UIO



More information about the zeromq-dev mailing list