Commit Graph

8562 Commits

Author SHA1 Message Date
githejie
4c6cff6391 Problem: CI build android on ubuntu-latest failed
Solution: Fixed the NDK version to android-ndk-r25 to
avoid using unsupported NDK version on ubuntu-latest.
2024-08-16 11:08:03 +02:00
BtbN
b71434140e Fix reading cycle count on non-msvc win-on-aarch64 2024-08-11 11:54:21 +02:00
Luca Boccassi
6aaafe0135
Merge pull request #4721 from githejie/reconnect_options
Fix issue with ZMQ_RECONNECT_STOP_AFTER_DISCONNECT option
2024-08-11 11:51:07 +02:00
githejie
ce17349f8b Problem: tests reconnect_stop_after_disconnect failed
Solution: this test failed because "_disconnected" is not initialized
in constructor, and the behavior of reconnect will not be as designed
when "_disconnected" is randomly assigned to true.
So we specify it as false in initialize list to solve this problem.
2024-08-10 00:10:31 +08:00
githejie
aa77c03a37 Add tests for sockopt ZMQ_RECONNECT_STOP_AFTER_DISCONNECT 2024-08-10 00:10:25 +08:00
githejie
b95d94935e Problem: macos-latest with libsodium compilation failed
Solution: Add libsodium dependencies to Makefile.am file.
2024-08-02 11:43:23 +02:00
Alexander Stefanov
59c91227b4 use proper STREQUAL instead of EQUAL to compare strings 2024-07-27 10:08:24 +01:00
fanquake
ee29bcd64a problem: trying to link against librt on macOS
Solution: don't use rt if not `RT_LIBRARY`

This currently causes the check to fail on macOS:
```bash
     /Library/Developer/CommandLineTools/usr/bin/c++  -std=c++11 -Wno-tautological-constant-compare  -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_8466b.dir/CheckSymbolExists.cxx.o -o cmTC_8466b  -lrt
        ld: library 'rt' not found
        clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
even though `clock_gettime` is available.

Move the `clock_gettime` check up with the other librt related checks,
and don't set `CMAKE_REQUIRED_LIBRARIES` if not `RT_LIBRARY`.
2024-07-08 22:35:49 +02:00
fanquake
d203ad2b7a problem: using -errwarn on non-Sun systems
solution: only use `-errwarn` on SunPro systems

For example, using Clang on Alpine, this just results in build spam, and
the option is incorrectly passed through to ld, which trys to use use it
(`-e`) as an entrypoint, i.e:
```bash
[ 28%] Building CXX object CMakeFiles/local_lat.dir/perf/local_lat.cpp.o
clang++: warning: -e rrwarn=%all: 'linker' input unused [-Wunused-command-line-argument]
[ 29%] Linking CXX executable bin/local_lat
/usr/bin/ld: warning: cannot find entry symbol rrwarn=%all; defaulting to 0000000000000cf0
[ 29%] Built target local_lat
```
2024-07-08 18:00:20 +02:00
fanquake
de290e91e3 Problem: macos-latest CIs both failing
Solution: Install `libtool`. This seems to be the issue, given the CI
output of a recent run, i.e:
```bash
 configure.ac:1023: the top level
configure.ac:80: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:81: error: possibly undefined macro: AC_PROG_LIBTOOL
configure:7350: error: possibly undefined macro: AC_DISABLE_STATIC
configure:7354: error: possibly undefined macro: AC_ENABLE_STATIC
autoreconf: error: /opt/homebrew/Cellar/autoconf/2.72/bin/autoconf failed with exit status: 1
autogen.sh: error: autoreconf exited with status 1
+ exit 1
```
https://github.com/zeromq/libzmq/actions/runs/9841129190/job/27167025854?pr=4699#step:12:200
2024-07-08 16:58:24 +02:00
C-sir
c2fae81460 Problem: my name is not in the AUTHORS file
Solution: add myself to the list
2024-05-10 15:45:28 +02:00
Isuru Fernando
0a1aa1e4a7 Fix typos in gssapi cmake support PR 2024-05-08 21:22:25 +02:00
Isuru Fernando
43a8b3c6c8 Add gssapi support to cmake 2024-05-08 10:06:39 +02:00
Stephan Lachnit
aa885c5a15 Do not use _MSC_VER if windows
This fixes several instances where _MSC_VER was used to determine whether to use afunix.h or not. For example, MinGW requires the use of afunix.h but does not define _MSC_VER. The correct behavior is checking ZMQ_HAVE_WINDOWS.

Signed-off-by: Stephan Lachnit <stephanlachnit@debian.org>
2024-04-23 21:00:20 +02:00
fanquake
2a75ef07be cmake: don't use builtin sha1 if not using ws
The builtin SHA1 (ZMQ_USE_BUILTIN_SHA1) is only used in the websocket
engine (ws_engine.cpp), so if websockets are disabled, i.e
-DENABLE_DRAFTS=OFF, don't add sha1.c to the sources list.
2024-03-25 18:51:39 +00:00
fanquake
4a5ece54b8 build: fix mkdtemp check on macOS
On macOS, mkdtemp is in unistd.h. Fix the CMake check so that is works.
This was discovered when comparing the output of the Autotools an CMake
build systems.
2024-03-25 13:24:30 +00:00
Hennadii Stepanov
45b2924a0a Fix Autotools-generated libzmq.pc file
This change fixes cross-compiling for Windows with static linking.
2024-03-21 12:22:43 +00:00
Min RK
481cc3fa2c halt build if CURVE requested but not found
ENABLE_CURVE is currently redundant with WITH_LIBSODIUM, as the only existing provider

now builds where requested configuration is not found fail rather than proceeding without requested features
2024-02-28 15:35:57 +00:00
Min RK
ff231d2673 Problem: cmake search for kqueue missing headers
Solution: include sys/types.h and sys/time.h as documented by kqueue
and used in autotools

fixes kqueue detection on openbsd
2024-02-23 14:25:17 +00:00
Eli Schwartz
3b264019a2 configure: fix basic syntax errors in the shell script programming language
There is no such thing as `+=` unless you happen to be using the Bash
programming language, i.e. your script shebang is /bin/bash.

However, configure scripts are run via /bin/sh instead, which may or may
not be be bash, usually depending on whether the system in question
preferred to have one less package installed (in which case it is bash)
vs. have a faster /bin/sh installed (in which case it is probably the
dash shell).
2024-01-24 23:01:24 +00:00
Thomas
959a133520
Fixing SEGV #4524. Pipe should only send to peer when active. (#4647)
* Fixing SEGV #4524. Pipe should only send to peer when active.
2023-12-19 15:21:46 +00:00
Denis Zibarev
86a42e1e43 Problem: Using non-ascii characters in unix domain socket path doesn't work on Windows
Solution: Convert utf-8 socket paths to utf-16 file names when using
filesystem calls to delete files and directories as Windows doesn't
have any filesystem calls that take utf-8 path.

rmdir_utf8() and unlink_utf8() static functions were created which
substitute rmdir() and unlink() when building on Windows.
2023-12-11 10:12:12 +00:00
Florian Weimer
665d1d4657 Build with -D_DEFAULT_SOURCE along with -std=c11
On its own, -std=c11 hides POSIX and other extensions from C headers
such as <stdlib.h> when building against glibc.  This causes the
posix_memalign probe to fail incorrectly with compilers that do not
accept implicit function declarations.  _DEFAULT_SOURCE is ignored by
most non-GNU/Linux systems or not relevant in this context, so there
is no separate check for adding it.
2023-11-29 13:58:35 +00:00
f18m
2622e618f0 Replace old website contribution page link with the page of the new website 2023-11-22 22:35:29 +00:00
Nehal Patel
b268effd88 Fix 4629 compile warning in endpoint.hpp 2023-11-19 11:35:09 +00:00
Francesco Montorsi
814dab58a4
Documentation: fix the HTMLZIP name to restore the download-documentation functionality (#4628) 2023-11-13 14:47:38 +00:00
f18m
61050beca6 Documentation: improve the look of landing page
* Link the new CSS stylesheet also when building docs at RTD
2023-11-10 12:05:52 +00:00
Francesco Montorsi
481d536713
Documentation: improve the look of landing page (#4625)
* Documentation: improve the look of landing page by showing a more-compact list
2023-11-10 11:42:46 +00:00
Francesco Montorsi
3e08ecc012
Feature: improve docs (#4620)
* Feature: improve see-also doc section
2023-11-03 10:36:47 +00:00
Francesco Montorsi
267e856494
Feature: master: integrate with ReadTheDocs (#4614)
* Feature: integrate libzmq with ReadTheDocs

* add readthedocs configuration file to convert Asciidoc files into HTML and HTMLZIP formats using Asciidoctor.js tool (the only Asciidoctor variant available on readthedocs so far)
2023-11-02 20:44:34 +00:00
Francesco Montorsi
aa9a2c8429
docs: add index page (#4615) 2023-11-01 09:49:25 +00:00
Stephan Lachnit
05c2025412 poller.hpp: fix incorrect ZMQ_IOTHREAD_POLLER_* usage
Signed-off-by: Stephan Lachnit <stephanlachnit@debian.org>
2023-11-01 00:53:40 +00:00
Luca Boccassi
f0c471aaab
Merge pull request #4607 from f18m/feature/asciidoctor
Feature: modernize API documentation
2023-10-25 23:10:25 +01:00
Francesco Montorsi
b6ca9b2983 Feature: modernize API documentation
* migrate from the old, unmaintained "asciidoc-py" tool to the new "asciidoctor" generator
* migrate from asciidoc-py syntax to the modern Asciidoc syntax (especially page titles and section titles)
* remove the need of "xmlto" utility to create the manpage output; use asciidoctor for that
* add HTML output support to the doc/Makefile by using asciidoctor
* change API documentation files extension from .txt to .adoc to make it more explicit that they are Asciidoc-encoded (as a bonus several IDE plugins will autodetect the .adoc format as Asciidoc)
* remove asciidoc.conf: asciidoctor does not support that; this also required replacing the macro linkzmq into all documentation pages
* add a new Github action CI do deploy to Github Pages the static HTMLs produced by Asciidoctors
* removed references to the "xmlto" and "a2x" tools from the build and packaging systems: Asciidoctor can convert the documentation directly to e.g. pdf (via extended converters) and anyway there was no code/target for using "xmlto" and "a2x" tools anyway
2023-10-25 23:59:38 +02:00
Luca Boccassi
cd991c72c8 Revert "Add forgotten test_pubsub. Currently only tests NORM if built."
The test always fails.

This reverts commit a6039d8716.
2023-10-25 11:49:29 +01:00
Michael Hudson-Doyle
aa3e097996 initialize error in test_security_gssapi.c:test_null_creds
Under some circumstances (which probably no longer apply in master) gcc inlined get_monitor_event into test_null_creds and then emitted a "maybe uninitialized" warning on the use of error. This would only be a problem if the tested code was misbehaving but I guess that's the point of a test!
2023-10-25 09:51:25 +01:00
Axel Rietschin
a6039d8716 Add forgotten test_pubsub. Currently only tests NORM if built. 2023-10-24 10:47:19 +01:00
Yueshan
95caddb9a1 Update msg.cpp
allow the max_vsm_size of data can init as vsm type msg

the init message of vsm size should be <= max_vsm_size include equal size.
2023-10-22 11:47:21 +01:00
Luca Boccassi
b30a19ebde
Merge pull request #4602 from nnog/flaky-test
test_proxy_steerable: reduce cpu and thread count
2023-10-13 15:21:28 +01:00
George Cockshull
77303a1926 test_proxy_steerable: reduce cpu and thread count
Problem: flakiness on slow CI VMs

Solution: fewer worker threads, poll rather than thrash,
consistent timings. user cpu ~300% -> 15%.
2023-10-13 08:19:38 -04:00
Luca Boccassi
6b80df14f4
Merge pull request #4600 from nnog/fix-proxy-steerable
Fix zmq_proxy_steerable
2023-10-12 21:53:48 +01:00
George Cockshull
058ad60b9a zmq_proxy_steerable: support non-REP socket types
Problem: reimplemented zmq_proxy_steerable control socket type is not
backwards compatible - replies are always sent.

In the past, zmq_proxy_steerable never sent a reply for
commands that weren't STATISTICS, so only really worked with PAIR and didn't
work at all with REP. Now it only supports REP and PAIR semantics changed. This
breaks compatibility with PAIR in a subtle and slightly annoying way if
HWMs are hit without reading the replies.

Solution: Add a check to send the empty reply only for
REP control sockets. This restores backwards compatibility, and supports
REP, PAIR, and SUB (for non-reply commands).

I had no knowledge of the pre-MPL-2.0 implementation. This fix is based
on docs and prior API usage. I contribute this under MPL-2.0.
2023-10-12 15:22:44 -04:00
George Cockshull
f8b3cc8108 Fix zmq_proxy_steerable PAUSE/RESUME
Problem: the new reimplementation of zmq_proxy_steerable had PAUSE/RESUME
that didn't follow expected behaviour. Possibly mixed up. Test didn't properly
cover the issue.

Solution: improve test coverage, fix the proxy command parsing.

I had no knowledge of the pre-MPL-2.0 implementation. This fix is based
on documented semantics and prior API usage. I contribute this
under MPL-2.0.
2023-10-12 15:22:44 -04:00
James Harvey
9d31965548
Handle tcp self connection issues (#4599) 2023-10-10 14:46:48 +01:00
Luca Boccassi
dbb7e3dc01 Problem: 4.3.5 is out, need new version
Solution: bump to 4.3.6
2023-10-09 12:21:03 +01:00
Luca Boccassi
622fc6dde9 Update NEWS for 4.3.5 2023-10-09 11:47:05 +01:00
Luca Boccassi
5cf39bf0ce
Merge pull request #4598 from brettviren/reimplement-proxy-steerable
A clean room re-implementation of zmq_proxy_steerable()
2023-10-09 10:36:47 +01:00
Brett Viren
5712ad5138 A clean-room implementation of zmq_proxy_steerable().
It is contriubted under the MPL-2.0.

I had no knowledge of the previous implementation of zmq_proxy_steerable().

This version was developed based on expectations set in the old man page with one exception.  This version uses a REP/REQ for the proxy control protocol sockets.  The old man page example used PUB/SUB which is nonsensical given the STATISTICS command requires two way communication.
2023-10-08 19:56:03 -04:00
Nehal Patel
8cdc4ed71a
Problem: unused variables warnings
Solution: fix them
2023-10-04 09:51:43 +01:00
Hennadii Stepanov
de5ee18203 Replace egrep with grep -E
For the GNU Grep package version >= 3.8, the `egrep` command emits:
```
egrep: warning: egrep is obsolescent; using grep -E
```
which makes the `./autogen.sh` script very noisy.
2023-08-26 22:19:35 +01:00