Commit Graph

477 Commits

Author SHA1 Message Date
Benjamin Deroche
d1ee71a634 Problem: Android build scripts does not work with latest NDK versions
Solution: Update the build scripts to work with NDK versions r23 and r24
2022-05-09 12:15:49 +02:00
Bill Torpey
edfbb1ced6
default to not building tests if cmake version can't handle skipped tests (#4376)
* default to not building tests if cmake version can't handle skipped tests (see https://github.com/zeromq/libzmq/issues/4375)
2022-05-03 22:18:44 +01:00
Dimitris Apostolou
6b8dd84a63
Fix typos 2022-02-11 00:45:06 +02:00
boscosiu
4d0f4ebd69 Problem: ZMQ_BUILD_DRAFT_API define is not propagated to dependent CMake projects
Solution: Add the definition to the relevant CMake targets in public scope.  Fixes #4194
2021-12-28 18:23:05 -08:00
myd7349
5eb0b00c87
Problem: In rare cases, afunix.h doesn't contain a definition for struct sockaddr_un (#4310)
* Problem: In rare cases, afunix.h doesn't contain a definition for struct sockaddr_un

According to https://github.com/microsoft/vcpkg/issues/21623,
struct sockaddr_un might be unavailable on some machines even afunix.h exists.

For example, on some machines, the content of afunix.h looks like this:
typedef struct _SOCKADDR_UN
{
     ADDRESS_FAMILY Family;
     wchar_t Path[63];
} SOCKADDR_UN, *PSOCKADDR_UN;

but on other machines, it may looks like this:
#define UNIX_PATH_MAX 108

typedef struct sockaddr_un
{
    ADDRESS_FAMILY sun_family;
    char sun_path[UNIX_PATH_MAX];
} SOCKADDR_UN, *PSOCKADDR_UN;

Fixes #3949

References:
- [Enable Unix-domain sockets support on Windows](8f3ec75de4)
- [AF_UNIX equivalent for Windows](https://stackoverflow.com/questions/9029174/af-unix-equivalent-for-windows)
- https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/
2021-11-24 14:55:45 +00:00
Benjamin Deroche
519e2bf129
Problem: Android build script isn't compatible with latest NDK version (#4278)
* Problem: Android build script isn't compatible with latest NDK version

Solution: Update to Android NDK r22b
2021-10-18 10:05:10 +01:00
E. G. Patrick Bos
36e4c9b474
add zmq_ppoll
zmq_ppoll mostly mimics zmq_poll behavior, except for the added feature of being able to specify a signal mask. Signals in this mask will be blocked during execution of zmq_ppoll. Switching of the process' active signal mask happens atomically with the actual poll call, so that no race conditions can occur. This behavior is useful when one wants to gracefully handle POSIX signals without race conditions. See e.g. the discussion below https://250bpm.com/blog:12/ for an explanation.

Also includes two new tests:
1. test_zmq_ppoll_fd does the same thing as test_zmq_poll_fd, demonstrating backwards compatibility with zmq_poll when used with a default signal mask.
2. test_zmq_ppoll_signals demonstrates the use of zmq_ppoll with a signal mask, blocking out SIGTERM everywhere except in zmq_ppoll, allowing to handle the signal in one place without having to worry about race conditions.
2021-09-24 11:04:20 +02:00
Luca Boccassi
cf8afcc411 Problem: Travis is no longer free for FLOSS projects
Solution: switch to Github Actions

Travis recently started enforcing credits for OSS projects without
any funding. While it is possible to get free credits, it is a manual
step that involves contacting customer support via email and asking to
add them, every week. While this does not require money, it requires
something far scarcer: volunteers time.

Drop Travis and migrate to Github Actions.
2021-09-22 16:42:09 +01:00
Bill Torpey
ca8e30ed48
fixes for UBSAN warnings (#4223)
Problem: UBSAN shows warnings

Solution: fix alignment issues and signed to unsigned conversion
2021-06-29 13:02:35 +01:00
Benjamin Deroche
2af72796a7 Problem: Outdated Android build tools
Solution: Update Android NDK version
2021-06-07 11:34:13 +02:00
Chengye Ke
04c37982b1
Support so_busy_poll (#4188)
* Support so_busy_poll.
2021-05-14 23:05:56 +01:00
Koby Boyango
00d1000538 Fix iOS build failure for x86_64 2021-04-28 11:41:36 +03:00
mjvankampen
2dd24d6d80
Problem: norm fails to compile under windows (#4123)
* Makes norm useable (but maybe slow) on windows
2021-01-18 08:42:14 +00:00
Andy Heroff
2998ff34aa
Problem: No direct support for setting socket priority (#4118)
* Problem: No direct support for setting socket priority

Solution: Add ZMQ_PRIORITY socket option, which sets the
SO_PRIORITY socket option on the underlying socket. This
socket option is not supported under Windows. Check option
and set socket option on creation of underlying socket.
2021-01-06 22:22:41 +00:00
Stanisław Maciaś
26cbd4f43f if_nametoindex function is now used when available 2020-12-23 12:32:16 +01:00
Sailaja Nagireddy
89a536dd1d Problem: Android build fails.
Solution: Update the android build helper to locate readelf binary
          included in android ndk.
2020-12-04 20:56:50 +05:30
Simon Giesecke
bafd626dff Problem: coverage build script doesn't recognize several config options
Solution: extrace and reuse regular config option setting
2020-09-04 10:58:16 +02:00
Simon Giesecke
74543a921c Problem: coverage report includes irrelevant files
Solution: properly set file filter to only include files in src except tweetnacl
2020-09-04 10:58:16 +02:00
Luca Boccassi
a4dbdb614e Problem: some platforms do not have strnlen
Solution: move compat redefinition to compat.hpp header so that
it can be used from msg.cpp
2020-08-21 14:39:08 +01:00
Benjamin Deroche
83667099bb Problem: libzmq use outdated Android NDK version
Solution: Update Android NDK version
2020-08-14 16:49:14 +02:00
mileschet
571045d129
Ios135 (#3991)
* build_ios.sh now build for different archs

* change typo on build_ios.sh

Co-authored-by: Roberto Santacroce Martins <roberto.martins@transferoswiss.ch>
2020-07-11 13:11:59 +01:00
Roberto Santacroce Martins
95e343caf3 added script to compile the lib to iphone sdk >= 13.5 2020-07-06 15:34:10 +02:00
Luca Boccassi
e95e57d385 Problem: fuzzer corpus file can be quite large
Solution: move all corpora to the zeromq/libzmq-fuzz-corpora repository
for easier handling, and to avoid inflating the size of zeromq/libzmq.
Clone it for the CI on the fly.
2020-07-04 17:50:35 +01:00
Luca Boccassi
734d6e4870 Problem: we have to send a PR to oss-fuzz on every build change on the fuzzers
Solution: move the script to our repo, and simply call it from oss-fuzz's script
2020-06-30 16:03:04 +01:00
Simon Giesecke
3135f6b503 Problem: clang-tidy job is failing because package dependencies are outdated
Solution: update to llvm-toolchain-10
2020-06-19 17:58:26 +02:00
mjvk
b6bb3ef925
Adds NORM support to cmake (#3951) 2020-06-07 10:39:02 +01:00
Luca Boccassi
364ae768fe Problem: removing latest_branch breaks ABI CI job
Solution: clone latest tag instead
2020-05-12 09:13:06 +01:00
grmt
718ad8ab96
add wss transport and fix tipc tests when building using cmake on linux (#3857)
* Allow CMAKE to generate ws and wss transports
I guess there is little use of just ws transport, so by default
GnuTLS (and libsodium) are enabled

* cmake libzmq including wss transport (ubuntu 19.10 and ubuntu 19.10 + wsl 1.0)
test_security_fails (libsodium assert !?)

* updated relicense

* make external libs gnutls nss sodium optional

* #ifdef WSS classes and functions, build test*ws* only if correct libs are included, warning if libs not present

* make libsodium optional

* cmake fix tests TIPC transport

* clang-format pointed out a wrongly placed #ifdef

* GnuTLS before 3.6.7 is not safe

* msvc doesn't agree with strlen in array declaration, test_socks now at least compiles on windows

* windows: libsodium build fails, missing include dirs set by env var

* ws transport test only works when GnuTLS is found

* Fixed condition to use NSS / built in SHA1, so that test_ws_transport should now pass, also when GnuTLS is not found
2020-04-13 23:03:19 +01:00
Gudmundur Adalsteinsson
7b1fef28f9
Problem: boilerplate when init msg from data copy (#3860)
* Problem: boilerplate when init msg from data copy

Solution: Add zmq_msg_init_buffer to construct
a message by copying memory from buffer.
2020-04-09 23:59:43 +01:00
Kevin Sapper
67e6a8c233 Problem: Usage of ANDROID_BUILD_DIR not documented
Solution: Add usage and default value to README
2020-02-12 21:49:25 +01:00
Kevin Sapper
e293b0b9b3 Problem: Setting TOOLCHAIN env vars should be done by helper
Solution: Migrate the properties and the selection for the correct env
and abi to the helper. There's no need for the user to specify them.
2020-02-12 21:36:41 +01:00
Kevin Sapper
511d39c179 Problem: Unable to overwrite the ANDROID_BUILD_DIR
Solution: Use pwd only a default value
2020-02-12 16:20:27 +01:00
Kevin Sapper
341f56ccac Problem: Android build is hard to understand
Solution: Modify the build scripts so the user can specify the platform
for which to build, e.g. `./build.sh arm`. This approach originally
significantly reduces the parameters which have to be set before running
the script.

Further the build process is documented in a README now.
2020-02-12 12:22:27 +01:00
Luca Boccassi
a7b328a79a Revert "Problem: nuget internal metadata not maintained, no relicense"
Relicense grant received.

This reverts commit d2a8be8da7.
2020-02-03 16:23:38 +01:00
Luca Boccassi
d2a8be8da7 Problem: nuget internal metadata not maintained, no relicense
Solution: remove it for now
2020-02-03 13:40:42 +01:00
Luca Boccassi
068385c951 Problem: internal reimplementation of strlcpy used by default on Linux
Solution: use libbsd by default when available, and the internal implementation
only as a fallback, to take advantage of Linux distros maintenance of the
string libraries.
2019-12-28 16:21:06 +01:00
Simon Giesecke
334e837b88 Problem: ws_engine uses unsafe strcpy
Solution: use strcpy_s instead (define custom if not available)
2019-12-25 13:56:26 +01:00
Stephan Senkbeil
8089529148 Problem: ZMQ_HAVE_PTHREAD_SET_AFFINITY not set correctly
Solution: Set correct define in CMake check and add the cmakedefine
2019-12-13 14:42:45 +01:00
Simon Giesecke
18edd28955 Problem: clang version used for analysis is outdated
Solution: update to clang 8
2019-12-08 15:24:48 +01:00
Luca Boccassi
bfa8cf3089 Problem: test_pair_tcp_cap_net_admin requires sudo but is enabled by default in CMake
Solution: add an option to enable it, and default to false. Enable it in
the CI so we don't lose coverage, as it works on Travis.

Fixes #3725
2019-10-31 09:37:22 +00:00
Simon Giesecke
66d0f3511f Problem: ipc transport not supported under Windows
Solution: implement support
2019-10-29 23:04:54 +01:00
Benjamin Deroche
c995032595 Fix android build fail check when using a different locale than english 2019-10-28 16:48:54 +01:00
Benjamin Deroche
0d0899bc0d Download the NDK only the first time 2019-10-28 16:48:54 +01:00
Benjamin Deroche
7ee36a177a Make sure the new file erase the old one and don't get a different name 2019-10-28 16:03:22 +01:00
Benjamin Deroche
947893e79f Keep the unzip quiet but make sure it doesn't fail silently 2019-10-28 16:02:57 +01:00
Benjamin Deroche
d2099b7593 Problem: Android build script is severely outdated
Solution: Migrate build scripts from Android NDK r11c to r20.
- Standalone toolchain
- Migration from GCC to Clang
- Migration from libgnustl to libc++
- Dropped support for API level below 16 (Android 4.1), previously it was API level 9 (Android 2.3)
- Dropped support for mips architecture
- The build script now start the build of all 4 Android architectures (arm, arm64, x86, x86_64)
2019-10-25 23:07:04 +02:00
somdoron
7296fb5b15 problem: unsecured websocket is rarely used in production
Solution: support websocket with tls (wss)
2019-10-02 08:58:26 +03:00
somdoron
9be8334938 problem: sha1 external module conflict with czmq
Solution: allow to use external library (nss) for sha1 to avoid the conflict
2019-09-11 15:01:28 +03:00
Christopher Hall
ba679bcce8 problem: configure for DragonFly need FreeBSD also defined
solution: on DragonFly also define ZMQ_HAVE_FREEBSD
          in addition to ZMQ_HAVe_DRAGONFLY

Signed-off-by: Christopher Hall <hsw@ms2.hinet.net>
2019-08-06 12:11:00 +08:00
Luca Boccassi
77cd206100 Problem: errors do not fail ABI CI test
Solution: set -e in ci_build.sh like in other scripts
2019-07-10 17:08:29 +01:00