From f8ec9b5fade6fca582b1e35274174ace5cf8ef9c Mon Sep 17 00:00:00 2001 From: Ewen McNeill Date: Thu, 24 Jul 2014 09:28:06 +1200 Subject: [PATCH 01/11] z/OS: Make builds/zos scripts executable --- builds/zos/cxxall | 0 builds/zos/makeclean | 0 builds/zos/makelibzmq | 0 builds/zos/maketests | 0 builds/zos/runtests | 0 builds/zos/zc++ | 0 6 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 builds/zos/cxxall mode change 100644 => 100755 builds/zos/makeclean mode change 100644 => 100755 builds/zos/makelibzmq mode change 100644 => 100755 builds/zos/maketests mode change 100644 => 100755 builds/zos/runtests mode change 100644 => 100755 builds/zos/zc++ diff --git a/builds/zos/cxxall b/builds/zos/cxxall old mode 100644 new mode 100755 diff --git a/builds/zos/makeclean b/builds/zos/makeclean old mode 100644 new mode 100755 diff --git a/builds/zos/makelibzmq b/builds/zos/makelibzmq old mode 100644 new mode 100755 diff --git a/builds/zos/maketests b/builds/zos/maketests old mode 100644 new mode 100755 diff --git a/builds/zos/runtests b/builds/zos/runtests old mode 100644 new mode 100755 diff --git a/builds/zos/zc++ b/builds/zos/zc++ old mode 100644 new mode 100755 From 5cab63e1a14b9c604007de6453729c84b77b4449 Mon Sep 17 00:00:00 2001 From: Ewen McNeill Date: Thu, 24 Jul 2014 10:42:30 +1200 Subject: [PATCH 02/11] z/OS: Transferrring from GitHub to z/OS UNIX Updated: builds/zos/README.md: Outlined process to transfer source from GitHub to z/OS UNIX System Services, including character set conversion for the source --- builds/zos/README.md | 55 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/builds/zos/README.md b/builds/zos/README.md index e2744e0d..52c45b48 100644 --- a/builds/zos/README.md +++ b/builds/zos/README.md @@ -369,3 +369,58 @@ but note: However running `./configure` to regenerate `src/platform.hpp` may be useful for later versions of ZeroMQ which add more feature tests. + + +## Transferring from GitHub to z/OS UNIX System Services + +The process of transferring files from GitHub to z/OS UNIX System +Services is somewhat convoluted because: + +* There is not a port of git for z/OS UNIX System Services; and + +* z/OS uses the EBCDIC (IBM-1047) character set rather than the + ASCII/ISO-8859-1 character set used by the ZeroMQ source code + on GitHub + +A workable transfer process is: + +* On an ASCII/ISO-8859-1/UTF-8 system with `git` (eg, a Linux system): + + git clone https://github.com/zeromq/libzmq.git + git archive --prefix=libzmq-git/ -o /var/tmp/libzmq-git.tar master + +* On a ASCII/ISO-8859-1/UTF-8 system with `tar`, and `pax`, and + optionally the GNU auto tools (eg, the same Linux system): + + mkdir /var/tmp/zos + cd /var/tmp/zos + tar -xpf /var/tmp/libzmq-git.tar + cd libzmq-git + ./autogen.sh # Optional: to be able to run ./configure + cd .. + pax -wf /var/tmp/libzmq-git.pax libzmq-git + compress libzmq-git.pax # If available, reduce transfer size + +* Transfer the resulting file (`libzmq-git.pax` or `libzmq-git.pax.Z`) + to the z/OS UNIX System Services system. If using FTP be sure to + transfer the file in `bin` (binary/Image) mode to avoid corruption. + +* On the z/OS UNIX System Services system, unpack the `pax` file and + convert all the files to EBCDIC with: + + pax -o from=iso8859-1 -pp -rvf libzmq-git-2014-07-23.pax + + or if the file was compressed: + + pax -o from=iso8859-1 -pp -rvzf libzmq-git-2014-07-23.pax.Z + +The result should be a `libzmq-git` directory with the source in +EBCDIC format, on the z/OS UNIX System Services system ready to start +building. + +See also the [`pax` man +page](http://pic.dhe.ibm.com/infocenter/zos/v1r13/index.jsp?topic=%2Fcom.ibm.zos.r13.bpxa500%2Fr4paxsh.htm), +some [`pax` conversion +examples](http://pic.dhe.ibm.com/infocenter/zos/v1r13/index.jsp?topic=%2Fcom.ibm.zos.r13.bpxa400%2Fbpxza4c0291.htm), +and [IBM's advice on ASCII to EBCDIC conversion +options](http://www-03.ibm.com/systems/z/os/zos/features/unix/bpxa1p03.html) From 6b21b1ecfa60a4a929c423e392eb01f62c45a53e Mon Sep 17 00:00:00 2001 From: Ewen McNeill Date: Thu, 24 Jul 2014 11:13:24 +1200 Subject: [PATCH 03/11] z/OS: Avoid removing libzmq.pc.in in makeclean --- builds/zos/makeclean | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builds/zos/makeclean b/builds/zos/makeclean index d6abe8de..4b46b726 100755 --- a/builds/zos/makeclean +++ b/builds/zos/makeclean @@ -2,6 +2,7 @@ # Remove built object files and test executables # # Written by Ewen McNeill , 2014-07-22 +# Updated by Ewen McNeill , 2014-07-24 #--------------------------------------------------------------------------- set -e # Stop on errors @@ -22,7 +23,7 @@ TESTS="${TOP}/tests" # Remove object/library files echo "Removing libzmq built files" -(cd "${SRC}" && rm -f *.o *.a *.dbg *.x libzmq* *.so) +(cd "${SRC}" && rm -f *.o *.a *.dbg *.x *.so libzmq) # Remove test object files echo "Removing libzmq tests" From 217e0ae9c6fdf108cc11ebd3c8cc55777f8d99b3 Mon Sep 17 00:00:00 2001 From: Ewen McNeill Date: Thu, 24 Jul 2014 12:26:13 +1200 Subject: [PATCH 04/11] Remove "const" from std::map key Updated: src/metdata.hpp: Remove explicit "const" from key of std::map<> because the key is implicitly const already (see http://en.cppreference.com/w/cpp/container/map and http://www.cplusplus.com/reference/map/map/). On some platforms (such as z/OS UNIX System Services) explicitly declaring the map key as "const" causes template expansion errors as it tries to create separate allocators for "const const std::string" and "const std::string" only to find that they clash. (Presumably some compilers collapse these into one earlier.) There are no template expansion errors if the map key is left to be implicitly const. --- src/metadata.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/metadata.hpp b/src/metadata.hpp index b863bb4b..bb16d14b 100644 --- a/src/metadata.hpp +++ b/src/metadata.hpp @@ -31,7 +31,7 @@ namespace zmq { public: - typedef std::map dict_t; + typedef std::map dict_t; metadata_t (const dict_t &dict); virtual ~metadata_t (); From 829b1bb4d4436e1d12ecdce4d26308e14565d5a5 Mon Sep 17 00:00:00 2001 From: Ewen McNeill Date: Thu, 24 Jul 2014 13:00:21 +1200 Subject: [PATCH 05/11] Include testutil.hpp if using SETTLE_TIME Updated: tests/test_connect_delay_tipc.cpp tests/test_sub_forward_tipc.cpp tests/test_term_endpoint_tipc.cpp --- tests/test_connect_delay_tipc.cpp | 2 ++ tests/test_sub_forward_tipc.cpp | 2 ++ tests/test_term_endpoint_tipc.cpp | 2 ++ 3 files changed, 6 insertions(+) diff --git a/tests/test_connect_delay_tipc.cpp b/tests/test_connect_delay_tipc.cpp index 7340ee8d..1fd4e306 100644 --- a/tests/test_connect_delay_tipc.cpp +++ b/tests/test_connect_delay_tipc.cpp @@ -27,6 +27,8 @@ #undef NDEBUG #include +#include "testutil.hpp" + int main (void) { int val; diff --git a/tests/test_sub_forward_tipc.cpp b/tests/test_sub_forward_tipc.cpp index 4ead9f71..d8cb47e3 100644 --- a/tests/test_sub_forward_tipc.cpp +++ b/tests/test_sub_forward_tipc.cpp @@ -26,6 +26,8 @@ #undef NDEBUG #include +#include "testutil.hpp" + int main (void) { fprintf (stderr, "test_sub_forward running...\n"); diff --git a/tests/test_term_endpoint_tipc.cpp b/tests/test_term_endpoint_tipc.cpp index 57ccf3e8..c0241550 100644 --- a/tests/test_term_endpoint_tipc.cpp +++ b/tests/test_term_endpoint_tipc.cpp @@ -27,6 +27,8 @@ #undef NDEBUG #include +#include "testutil.hpp" + int main (void) { int rc; From 9d4f719e942001235e3abd65bc77322bbd54a113 Mon Sep 17 00:00:00 2001 From: Ewen McNeill Date: Thu, 24 Jul 2014 13:48:19 +1200 Subject: [PATCH 06/11] z/OS: Update build defines: Updated: builds/zos/cxxall: Defines ZMQ_HAVE_ZOS for platform portability; define ZMQ_USE_POLL _instead_ of ZMQ_FORCE_POLL, due to change in src/poller.hpp since ZeroMQ 4.0.x branch --- builds/zos/cxxall | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100755 => 100644 builds/zos/cxxall diff --git a/builds/zos/cxxall b/builds/zos/cxxall old mode 100755 new mode 100644 index 9f5d082f..87867d6f --- a/builds/zos/cxxall +++ b/builds/zos/cxxall @@ -4,7 +4,7 @@ # additional compile arguments. # # Written by Ewen McNeill , 2014-07-19 -# Updated by Ewen McNeill , 2014-07-22 +# Updated by Ewen McNeill , 2014-07-24 #--------------------------------------------------------------------------- VERBOSE="${VERBOSE:-}" # Set to non-empty for already done status @@ -22,7 +22,7 @@ ZCXX="${BIN_DIR}/zc++" # Determine compile flags CPPFLAGS="-D_XOPEN_SOURCE_EXTENDED=1 -D_OPEN_THREADS=3 -D_OPEN_SYS_SOCK_IPV6" -CXXFLAGS="-DHAVE_CONFIG_H -D_REENTRANT -D_THREAD_SAFE -DZMQ_FORCE_POLL" +CXXFLAGS="-DZMQ_HAVE_ZOS -DHAVE_CONFIG_H -D_REENTRANT -D_THREAD_SAFE -DZMQ_USE_POLL" case $(pwd) in *src) CXXFLAGS="${CXXFLAGS} -I." ;; From b27bafff60467bfeec218daf69d3394455df304d Mon Sep 17 00:00:00 2001 From: Ewen McNeill Date: Thu, 24 Jul 2014 13:50:38 +1200 Subject: [PATCH 07/11] z/OS: Autodetect tests to run Updated: builds/zos/runtests: Extract tests to run from tests/Makefile.am at runtime, rather than hard coding tests list (to simplfy later maintenance). test_*_tipc is excluded as BUILD_TIPC is not defined on z/OS UNIX System Services. XFAIL_TESTS are also excluded, following current logic in tests/Makefile.am --- builds/zos/runtests | 114 +++++++++++++++++--------------------------- 1 file changed, 43 insertions(+), 71 deletions(-) mode change 100755 => 100644 builds/zos/runtests diff --git a/builds/zos/runtests b/builds/zos/runtests old mode 100755 new mode 100644 index e3f93573..e7963e36 --- a/builds/zos/runtests +++ b/builds/zos/runtests @@ -7,81 +7,11 @@ # defines the order in which tests are run. # # Written by Ewen McNeill , 2014-07-19 -# Updated by Ewen McNeill , 2014-07-22 +# Updated by Ewen McNeill , 2014-07-24 #--------------------------------------------------------------------------- set -e # Stop if a test fails -# Test order taken from tests/Makefile.am -noinst_PROGRAMS="test_system - test_pair_inproc - test_pair_tcp - test_reqrep_inproc - test_reqrep_tcp - test_hwm - test_reqrep_device - test_sub_forward - test_invalid_rep - test_msg_flags - test_connect_resolve - test_immediate - test_last_endpoint - test_term_endpoint - test_monitor - test_router_mandatory - test_router_raw_empty - test_probe_router - test_stream - test_disconnect_inproc - test_ctx_options - test_ctx_destroy - test_security_null - test_security_plain - test_security_curve - test_iov - test_spec_req - test_spec_rep - test_spec_dealer - test_spec_router - test_spec_pushpull - test_req_correlate - test_req_relaxed - test_conflate - test_inproc_connect - test_issue_566 - test_abstract_ipc - test_many_sockets - test_shutdown_stress - test_pair_ipc - test_reqrep_ipc - test_timeo - test_fork" - -if [ -n "${1}" ]; then - TESTS="$*" # Run tests on command line -else - TESTS="${noinst_PROGRAMS}" -fi - -# Explanation of tests expected to fail: -# test_abstract_ipc: Relies on Linux-specific IPC functionality -# test_fork: Relies on using pthreads _after_ fork, _before_ exec -# -# (Note: there _must_ be spaces either side of the tests names to match) -XFAIL_TESTS=" - test_abstract_ipc - test_fork - " - -verbose() { - echo "Starting: $@" >&2 - "$@" -} - -# Uncomment TESTS_ENVIRONMENT=verbose to see "Starting: TEST" messages -#TESTS_ENVIRONMENT=verbose -TESTS_ENVIRONMENT= - #--------------------------------------------------------------------------- # Change to tests directory if necessary @@ -113,6 +43,48 @@ else exit 1 fi +#--------------------------------------------------------------------------- +# Explanation of tests expected to fail: +# test_abstract_ipc: Relies on Linux-specific IPC functionality +# test_fork: Relies on using pthreads _after_ fork, _before_ exec +# test_diffserv: Needs IP_PROTO, IP_TOS setsockopt(); the headers +# are present on z/OS UNIX System Services, but +# fails with: +# EDC8109I Protocol not available. (./ip.cpp:164) +# NOTE: not listed as a valid IP setsockopt() option at: +# http://pic.dhe.ibm.com/infocenter/zos/v2r1/index.jsp?topic=%2Fcom.ibm.zos.v2r1.bpxbd00%2Fsetopt.htm +# +XFAIL_TESTS="test_abstract_ipc|test_fork|test_diffserv" + +# BUILD_TIPC is not defined, so we skip all these tests +SKIP_TESTS="test_.*_tipc" + +# Extract list of all test programs from tests/Makefile.am +# +# Excluding tests we know will fail because of missing functionality +# +noinst_PROGRAMS=$(grep "test_" Makefile.am | egrep -v "_SOURCES|XFAIL" | + sed 's/noinst_PROGRAMS.* test/test/; s/^ *//; s/ *\\ *$//;' | + grep -v "${SKIP_TESTS}" | egrep -v "${XFAIL_TESTS}") +#echo "Found tetsts: ${noinst_PROGRAMS}" + +# Run tests on command line, or all tests we found +if [ -n "${1}" ]; then + TESTS="$*" # Run tests on command line +else + TESTS="${noinst_PROGRAMS}" +fi + +verbose() { + echo "Starting: $@" >&2 + "$@" +} + +# Uncomment TESTS_ENVIRONMENT=verbose to see "Starting: TEST" messages +#TESTS_ENVIRONMENT=verbose +TESTS_ENVIRONMENT= + +#--------------------------------------------------------------------------- # Explicitly add SRCDIR into library serach path, to make sure we # use our just-built version LIBPATH="${SRCDIR}:/lib:/usr/lib" From 501666d07e15347082993ea4c00c459c5ba14be9 Mon Sep 17 00:00:00 2001 From: Ewen McNeill Date: Thu, 24 Jul 2014 13:54:21 +1200 Subject: [PATCH 08/11] z/OS: Skip pthread_{get,set}schedparam Updated: src/thread.cpp: On older z/OS UNIX System Services, pthread_{get,set}schedparam is not present (searching the Internet suggests it may be present in later version than the one being used for z/OS UNIX System Services porting). Make zmq::thread_t::setSchedulingParameters() a no-op on z/OS UNIX System Services. NOTE: pthread_{get,set}schedparam appear to have been introduced by POSIX.1-2001 or IEEE 1003.1-2004 so may not be universally available, and thus more platforms may need this "no-op" treatment. --- src/thread.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/thread.cpp b/src/thread.cpp index 9848eb79..dcf18b1d 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -104,6 +104,7 @@ void zmq::thread_t::stop () void zmq::thread_t::setSchedulingParameters(int priority_, int schedulingPolicy_) { +#if !defined ZMQ_HAVE_ZOS int policy = 0; struct sched_param param; @@ -122,6 +123,7 @@ void zmq::thread_t::setSchedulingParameters(int priority_, int schedulingPolicy_ rc = pthread_setschedparam(descriptor, policy, ¶m); posix_assert (rc); +#endif } #endif From 256c32d1fb52fa5c5ae2f4143a4cac849c970f5b Mon Sep 17 00:00:00 2001 From: Ewen McNeill Date: Thu, 24 Jul 2014 14:06:00 +1200 Subject: [PATCH 09/11] z/OS: builds/zos/platform.hpp for libzmq 4.1.0 --- builds/zos/platform.hpp | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/builds/zos/platform.hpp b/builds/zos/platform.hpp index 4cb8b614..b4442b56 100644 --- a/builds/zos/platform.hpp +++ b/builds/zos/platform.hpp @@ -10,6 +10,14 @@ /* Define to 1 if you have the `clock_gettime' function. */ /* #undef HAVE_CLOCK_GETTIME */ +/* Define to 1 if you have the declaration of `LOCAL_PEERCRED', and to 0 if + you don't. */ +#define HAVE_DECL_LOCAL_PEERCRED 0 + +/* Define to 1 if you have the declaration of `SO_PEERCRED', and to 0 if you + don't. */ +#define HAVE_DECL_SO_PEERCRED 0 + /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 @@ -37,6 +45,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if you have the `gssapi_krb5' library (-lgssapi_krb5). */ +/* #undef HAVE_LIBGSSAPI_KRB5 */ + /* Define to 1 if you have the `iphlpapi' library (-liphlpapi). */ /* #undef HAVE_LIBIPHLPAPI */ @@ -134,9 +145,6 @@ */ #define LT_OBJDIR ".libs/" -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#define NO_MINUS_C_MINUS_O 1 - /* Name of package */ #define PACKAGE "zeromq" @@ -147,7 +155,7 @@ #define PACKAGE_NAME "zeromq" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "zeromq 4.0.4" +#define PACKAGE_STRING "zeromq 4.1.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "zeromq" @@ -156,7 +164,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "4.0.4" +#define PACKAGE_VERSION "4.1.0" /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void @@ -168,7 +176,10 @@ #define TIME_WITH_SYS_TIME 1 /* Version number of package */ -#define VERSION "4.0.4" +#define VERSION "4.1.0" + +/* Enable militant API assertions */ +/* #undef ZMQ_ACT_MILITANT */ /* Force to use mutexes */ /* #undef ZMQ_FORCE_MUTEXES */ @@ -197,12 +208,18 @@ /* Have Linux OS */ /* #undef ZMQ_HAVE_LINUX */ +/* Have LOCAL_PEERCRED socket option */ +/* #undef ZMQ_HAVE_LOCAL_PEERCRED */ + /* Have MinGW32 */ /* #undef ZMQ_HAVE_MINGW32 */ /* Have NetBSD OS */ /* #undef ZMQ_HAVE_NETBSD */ +/* Have NORM protocol extension */ +/* #undef ZMQ_HAVE_NORM */ + /* Have OpenBSD OS */ /* #undef ZMQ_HAVE_OPENBSD */ @@ -222,7 +239,10 @@ /* #undef ZMQ_HAVE_SOLARIS */ /* Whether SO_KEEPALIVE is supported. */ -/* #undef ZMQ_HAVE_SO_KEEPALIVE */ +#define ZMQ_HAVE_SO_KEEPALIVE 1 + +/* Have SO_PEERCRED socket option */ +/* #undef ZMQ_HAVE_SO_PEERCRED */ /* Whether TCP_KEEPALIVE is supported. */ /* #undef ZMQ_HAVE_TCP_KEEPALIVE */ @@ -236,6 +256,9 @@ /* Whether TCP_KEEPINTVL is supported. */ /* #undef ZMQ_HAVE_TCP_KEEPINTVL */ +/* Have TIPC support */ +/* #undef ZMQ_HAVE_TIPC */ + /* Have uio.h header. */ #define ZMQ_HAVE_UIO 1 From f1cd2055de6a4e98f4c1501cc45c835a7e71e764 Mon Sep 17 00:00:00 2001 From: Ewen McNeill Date: Thu, 24 Jul 2014 14:13:59 +1200 Subject: [PATCH 10/11] z/OS: chmod +x builds/zos/{cxxall,runtests} --- builds/zos/cxxall | 0 builds/zos/runtests | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 builds/zos/cxxall mode change 100644 => 100755 builds/zos/runtests diff --git a/builds/zos/cxxall b/builds/zos/cxxall old mode 100644 new mode 100755 diff --git a/builds/zos/runtests b/builds/zos/runtests old mode 100644 new mode 100755 From 326dec067fe499761e41977b967ec4e58ff2c59a Mon Sep 17 00:00:00 2001 From: Ewen McNeill Date: Thu, 24 Jul 2014 14:48:49 +1200 Subject: [PATCH 11/11] z/OS: Updated portability notes Updated: builds/zos/README.md: Updated with portability notes resulting from building zeromq/libzmq/master as of 2014-07-23 on z/OS UNIX System Services. Current z/OS UNIX status: all expected tests pass, except "test_proxy", which hangs and times out. --- builds/zos/README.md | 51 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 7 deletions(-) diff --git a/builds/zos/README.md b/builds/zos/README.md index 52c45b48..f15c182f 100644 --- a/builds/zos/README.md +++ b/builds/zos/README.md @@ -12,6 +12,8 @@ Tested build combinations: * ZeroMQ 4.0.4, using IBM XL C/C++ compiler, as XPLINK in LP64 mode +* ZeroMQ 4.1-git, using IBM XL C/C++ compiler, as XPLINK in ILP32 mode + Other combinations are likely to work, possibly with minor changes, but have not been tested. Both static library and DLL modes have been tested. @@ -201,9 +203,18 @@ pass. There are two tests that are expected to fail: programs -- most programs use threads or fork without exec, but not both. -These two "expected to fail" tests are listed as XFAIL_TESTS, and +0. `test_diffserv`: tests ability to set IP_TOS ([IP Type of + Service](http://en.wikipedia.org/wiki/Type_of_service), or + [DiffServ](http://en.wikipedia.org/wiki/Differentiated_Services_Code_Point)) + values on sockets. While z/OS UNIX System Services has the + preprocessor defines required, it appears not to support the + required functionality (call fails with "EDC8109I Protocol not + available.") + +These three "expected to fail" tests are listed as XFAIL_TESTS, and `runtests` will still consider the test run successful when they fail -as expected. +as expected. (`builds/zos/runtests` will automatically skip these +"expected to fail" tests if running "all" tests.) In addition `test_security_curve` does not do any meaningful testing, as a result of the CURVE support not being compiled in; it requires @@ -212,6 +223,13 @@ ported to z/OS UNIX System Services yet. Multicast (via `libpgm`) is also not ported or compiled in. +[TIPC](http://hintjens.com/blog:70), a cluster IPC protocol, +is only supported on Linux, so it is not compiled into the z/OS +UNIX System Services port -- and the tests are automatically skipped +if running "all" tests. (However they are not listed in XFAIL_TESTS +because without the TIPC support there is no point in even running +them, and it would be non-trivial to track them by hand.) + ## ZeroMQ on z/OS UNIX System Services: Library portability notes @@ -278,6 +296,18 @@ which is done in the `cxxall` script. (The "3" value exposes later pthreads functionality like `pthread_atfork`, although ZeroMQ does not currently use all these features.) +If compiling on a *recent* version of z/OS UNIX System Services it +may be worth compiling with: + + _UNIX03_THREADS=1 + +which enables a later version of the threading support, potentially +including `pthread_getschedparam` and pthread_setschedparam`; at +present in the z/OS UNIX System Services port these functions are +hidden and never called. (See [IBM z/OS pthread.h +documentation](http://pic.dhe.ibm.com/infocenter/zos/v1r11/index.jsp?topic=/com.ibm.zos.r11.bpxbd00/pthrdh.htm) +for details on the differences.) + ## `platform.hpp` on z/OS UNIX System Services @@ -286,6 +316,11 @@ pre-built `platform.hpp` file. (By default `src/platform.hpp` is dynamically generated as a result of running the `./configure` script.) The master version of this is in `builds/zos/platform.hpp`. +Beware that this file contains the version number for libzmq (usually +included during the configure phase). If taking the `platform.hpp` from +an older version to use on a newer libzmq be sure to update the version +information near the top of the file. + The pre-built file is used because z/OS does not have the GNU auto tools (`automake`, `autoconf`, `libtool`, etc) installed, and particularly the libtool replacement does not work properly with the IBM XL C/C++ @@ -317,18 +352,20 @@ syntax): * set `CPPFLAGS` to for the feature macros required, eg: - setenv CPPFLAGS "-D_XOPEN_SOURCE_EXTENDED=1 -D_OPEN_THREADS=3 -D_OPEN_SYS_SOCK_IPV6" + setenv CPPFLAGS "-D_XOPEN_SOURCE_EXTENDED=1 -D_OPEN_THREADS=3 -D_OPEN_SYS_SOCK_IPV6 -DZMQ_HAVE_ZOS" * set `CXXFLAGS` to enable XPLINK: setenv CXXFLAGS "-Wc,xplink -Wl,xplink -+" * run configure script with `--disable-eventfd` (`sys/eventfd.h` does - not exist, but the test for its existance has a false positive on - z/OS UNIX System Services, apparently due to the way the `c++` - compiler wrapper passes errors back from the IBM XL C/C++ compiler), viz: + not exist, but the test for its existance has a false positive on + z/OS UNIX System Services, apparently due to the way the `c++` + compiler wrapper passes errors back from the IBM XL C/C++ compiler), + and with `--with-poller=poll` because `poll` is the most advanced + of the file descriptor status tests available on z/OS. That is: - ./configure --disable-eventfd + ./configure --disable-eventfd --with-poller=poll All going well several Makefiles, and `src/platform.hpp` should be produced. Two additional changes are required to `src/platform.hpp`