# ZeroMQ on z/OS UNIX System Services
ZeroMQ has been successfully built on z/OS, using [z/OS UNIX System
Services](http://www-03.ibm.com/systems/z/os/zos/features/unix/),
a certified UNIX environment for the [IBM
z-series](http://www-03.ibm.com/systems/z/). The build is possible
with the shell scripts in this directory, as described below.
Tested build combinations:
* ZeroMQ 4.0.4, using IBM XL C/C++ compiler, as XPLINK in ILP32 mode
* 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.
There are some minor limitations (detailed below), but all core
functionality tests run successfully.
## Quickstart: building ZeroMQ on z/OS UNIX System Services
Assuming [z/OS UNIX System
Services](http://www-03.ibm.com/systems/z/os/zos/features/unix/) is
installed, and the [z/OS XL C/C++
compiler suite](http://www-03.ibm.com/software/products/en/czos) is
installed, ZeroMQ can be built as follows:
* Download and extract ZeroMQ tar file
* Ensure contents of this directory are present at `builds/zos`
within that extracted diretory (eg, `zeromq-VERSION/builds/zos/`;
copy these files in, if not already present, and make sure the
shell scripts are executable)
* (Optional) set ZCXXFLAGS for additional compile flags (see below)
* Build `libzmq.a` static library and `libzmq.so` dynamic
library, with:
cd zeromq-VERSION
builds/zos/makelibzmq
or to skip the `libzmq.so` dynamic library (only building `libzmq.a`):
cd zeromq-VERSION
BUILD_DLL=false
export BUILD_DLL
builds/zos/makelibzmq
* (Optional, but recommended) build and run the core tests with:
cd zeromq-VERSION
builds/zos/maketests
builds/zos/runtests
* To remove built files, to start again (eg, rebuild with different
compile/link flags):
cd zeromq-VERSION
builds/zos/makeclean
There are details on specifying alternative compilation flags below.
## Quickstart: using ZeroMQ on z/OS UNIX System Services
### Static linking
Install `include/*.h` somewhere on your compiler include path.
Install `src/libzmq.a` somewhere on your library search path.
Compile and link application with:
c++ -Wc,xplink -Wl,xplink ... -+ -o myprog myprog.cpp -lzmq
Run with:
./myprog
### Dynamic linking
Install `include/*.h` somewhere on your compiler include path.
Install `src/libzmq.so` somewhere on your LIBPATH.
Install `src/libzmq.x` somewhere you can reference for import linking.
Compile and link application:
c++ -Wc,xplink -Wc,dll ... -+ -c -o myprog.o myprog.cpp
c++ -Wl,xplink -o myprog myprog.o /PATH/TO/libzmq.x
Run with:
LIBPATH=/DIR/OF/LIBZMQ.SO:/lib:/usr/lib:... # if not in default path
export LIBPATH
./myprog
## ZeroMQ on z/OS UNIX System Services: Application considerations
z/0S UNIX System Services does not provide a way to block the
[`SIGPIPE` signal being generated when a thread writes to a closed socket](http://pic.dhe.ibm.com/infocenter/zvm/v6r2/index.jsp?topic=%2Fcom.ibm.zos.r12.cbcpx01%2Fcbcpg1b0287.htm)
(compare with other platforms that support the `SO_NOSIGPIPE` socket
option, and/or the `MSG_NOSIGNAL` flag on `send()`; z/OS UNIX System
Services supports neither).
As a result, applications using ZeroMQ on z/OS UNIX System Services
have to expect to encounter `SIGPIPE` at various times during the use
of the library, if sockets are unexpectedly disconnected. Normally
`SIGPIPE` will terminate the application.
A simple solution, if `SIGPIPE` is not required for normal operation
of the application (eg, it is not part of a unix pipeline, the
traditional use of `SIGPIPE`), is to set `SIGPIPE` to be ignored
with code like:
#include <signal.h>
...
signal(SIGPIPE, SIG_IGN);
near the start of the application (eg, before initialising the ZeroMQ
library).
If `SIGPIPE` is required for normal operation it is recommended that
the application install a signal handler that flags the signal was
received, and allows the application main loop to determine if it
was received for one of its own file descriptors -- and ignores it if it
none of the applications own file descriptors seems to have changed.
Linking to the `libzmq.a` static library will pull in substantially
all of the library code, which will add about 4MB to the application
size (per executable statically linked with ZeroMQ). If this is a
significant consideration, use of the DLL version is recommended.
See also ZeroMQ test status on z/OS UNIX System Services below
for other caveats.
## Setting other compilation flags
### Optimisation
To build with optimisation:
* set `ZCXXFLAGS` to "`-O2`" before starting build process above
### Full debugging symbols
To build with debugging symbols:
* set `ZCXXFLAGS` to "`-g`" before starting build process above
### 64-bit mode (LP64/amode=64)
To build in 64-bit mode:
The default build is
[ILP32](http://publib.boulder.ibm.com/infocenter/zvm/v6r1/index.jsp?topic=/com.ibm.zos.r9.cbcux01/lp64cop.htm),
the default for the IBM XL C/C++ compiler. To build in LP64 mode
(64-bit):
* set `ZCXXFLAGS` to "`-Wc,lp64 -Wl,lp64`" before starting build
(64-bit mode can be combined with optimisation or debug symbols.)
### Combining compilation flags
Other build flags can be used in `ZXCCFLAGS` if desired. Beware that
they are passed through (Bourne) shell expansion, and passed to both
the compile and link stages; some experimentation of argument quoting
may be required (and arguments requiring parenthesis are particularly
complicated).
## ZeroMQ test status on z/OS UNIX System Services
As of 2014-07-22, 41 of the 43 tests in the core ZeroMQ test suite
pass. There are two tests that are expected to fail:
0. `test_abstract_ipc`: tests Linux-specific IPC functions, and is
expected to fail on non-Linux platforms.
0. `test_fork`: tests ability to use ZeroMQ both before *and* after
fork (and before exec()); this relies on the ability to use
pthreads both before *and* after fork. On z/OS (and some other
UNIX compliant platforms) functions like `pthreads_create` (used
by ZeroMQ) cannot be used after fork and before exec; on z/OS the
call after fork fails with `ELEMULTITHREADFORK` (errno=257) if
ZeroMQ was also used before fork. (On z/OS it appears possible
to use z/OS *after* fork, *providing* it has not been used before
fork -- the problem is the two separate initialisations of the
threading library, before and after fork, attempting to mix
together.) In practice this is unlikely to affect many real-world
programs -- most programs use threads or fork without exec, but
not both.
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. (`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
[`libsodium`](http://doc.libsodium.org/), which has not been
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
没有合适的资源?快使用搜索试试~ 我知道了~
libzmq-4.3.2源码及编译后的库文件
共1124个文件
cpp:237个
md:187个
hpp:148个
需积分: 1 0 下载量 24 浏览量
2024-08-25
15:17:34
上传
评论
收藏 39.76MB RAR 举报
温馨提示
该资源包含 libzmq-4.3.2 的源码及其在 Windows 11 环境下使用 Visual Studio 2017 编译生成的库文件。具体内容如下: 源码: 提供 libzmq-4.3.2 的完整源代码,用户可以根据需要进行自定义编译或修改。 编译环境: Windows 11 + Visual Studio 2017。使用该环境成功编译了 libzmq,确保了在 Windows 平台上的兼容性和稳定性。 生成文件: 头文件: 包含所有必要的头文件,可以直接包含到项目中,方便开发者进行二次开发。 动态链接库(DLL): 已编译好的 DLL 文件,用户可以直接在项目中引用并使用,无需再次编译。 使用说明: 本资源适用于需要在 Windows 环境中使用 ZeroMQ 的开发者。直接引用编译后的头文件和动态链接库即可在项目中快速集成 ZeroMQ 的功能,提高开发效率。 通过本资源,开发者可以快速集成和使用 libzmq 库进行消息传输和异步通信,适用于构建高性能的分布式系统和应用程序。
资源推荐
资源详情
资源评论
收起资源包目录
libzmq-4.3.2源码及编译后的库文件 (1124个子文件)
_service 4KB
configure.ac 30KB
Makefile.am 37KB
Makefile.am 4KB
Makefile.am 2KB
Makefile.am 790B
AUTHORS 2KB
libzmq.autopkg 1KB
buildbase.bat 3KB
build.bat 778B
package.bat 417B
buildall.bat 333B
build.bat 139B
branding.bmp 25KB
wepoll.c 66KB
unity.c 48KB
tweetnacl.c 21KB
Doxygen.cfg 99KB
changelog 149B
.clang-format 1KB
.clang-tidy 19KB
ZMQSourceRunChecks.cmake 7KB
FindSodium.cmake 2KB
ClangFormat.cmake 2KB
FindAsciiDoc.cmake 954B
TestZMQVersion.cmake 529B
ToolchainQNX6.6_x86.cmake 525B
ZMQSupportMacros.cmake 107B
compat 2B
asciidoc.conf 1KB
package.config 397B
control 2KB
COPYING 34KB
copyright 4KB
socket_base.cpp 63KB
zmq.cpp 41KB
stream_engine.cpp 38KB
options.cpp 35KB
test_socks.cpp 32KB
proxy.cpp 26KB
norm_engine.cpp 26KB
unittest_ip_resolver.cpp 25KB
test_poller.cpp 24KB
session_base.cpp 23KB
pgm_socket.cpp 23KB
test_security_zap.cpp 22KB
ctx.cpp 21KB
test_security_curve.cpp 21KB
ip.cpp 21KB
select.cpp 20KB
radix_tree.cpp 20KB
ip_resolver.cpp 20KB
socket_poller.cpp 19KB
test_proxy.cpp 18KB
test_monitor.cpp 18KB
test_xpub_manual_last_value.cpp 18KB
curve_server.cpp 18KB
test_spec_pushpull.cpp 17KB
pipe.cpp 17KB
udp_engine.cpp 16KB
router.cpp 16KB
test_heartbeats.cpp 16KB
msg.cpp 15KB
test_xpub_manual.cpp 15KB
testutil_security.cpp 15KB
test_radio_dish.cpp 15KB
tcp.cpp 15KB
err.cpp 15KB
socks_connecter.cpp 14KB
testutil_monitoring.cpp 13KB
object.cpp 13KB
unittest_mtrie.cpp 13KB
xpub.cpp 13KB
mechanism.cpp 13KB
test_proxy_hwm.cpp 12KB
test_security_gssapi.cpp 12KB
test_stream.cpp 12KB
gssapi_mechanism_base.cpp 12KB
test_xpub_verbose.cpp 12KB
signaler.cpp 11KB
ipc_listener.cpp 11KB
tcp_address.cpp 11KB
trie.cpp 11KB
proxy_thr.cpp 11KB
test_inproc_connect.cpp 11KB
thread.cpp 11KB
test_ctx_options.cpp 10KB
test_stream_disconnect.cpp 10KB
test_router_notify.cpp 10KB
test_hwm_pubsub.cpp 10KB
zap_client.cpp 10KB
testutil_unity.cpp 10KB
testutil.cpp 10KB
socks.cpp 10KB
zmq_utils.cpp 10KB
test_hwm.cpp 10KB
unittest_udp_address.cpp 9KB
test_connect_rid.cpp 9KB
req.cpp 9KB
stream.cpp 9KB
共 1124 条
- 1
- 2
- 3
- 4
- 5
- 6
- 12
资源评论
Sonny叔
- 粉丝: 55
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- C++-leetcode题解之002. Add Two Numbers.cpp
- C++-leetcode题解之001. Two Sum.cpp
- C++-leetcode题解之2553-Separate-the-Digits-in-an-Array.cpp
- C++-leetcode题解之1310-XOR-Queries-of-a-Subarray.cpp
- C++-leetcode题解之1248-count-number-of-nice-sub-arrays.cpp
- C++-leetcode题解之923-3-sum-with-multiplicity.cpp
- C++-leetcode题解之668-Kth-Smallest-Number-in-Multiplication-Table
- C++-leetcode题解之412-Fizz-Buzz.cpp
- C++-leetcode题解之282-Expression-Add-Operators.cpp
- C++-leetcode题解之206-Reverse-Linked-List.cpp
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功