0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 15:41:05 +08:00

497 Commits

Author SHA1 Message Date
Stephan Guilloux (cos)
6fb3a58ca8 Problem: Android helpers must provide build/clone functions.
Reason: Code factorisation & code sharing.

Solution: Create more functions in helper file:
- android_clone_library   # Clone a library source tree.
- android_build_library   # Build a library in its source tree.
2022-10-24 19:32:01 +02:00
Stephan Guilloux (cos)
69c237efed Problem: Android helpers should export more compilation chain related variables
Among them, CC, LD, CFLAGS, ... could be useful for other tools.

Reason: Many are calculated as "local" to a particular function, which makes
them unavailable outside this helper function.

Solution: Export more variables (CC, LD, CFLAGS, ...).

New exported variables are prefixed with ANDROID_BUILD_xxx.
This naming is expected to avoid any conflicts/problem with other tools:
- ANDROID_BUILD_CC
- ANDROID_BUILD_LD
- ANDROID_BUILD_CFLAGS
- ...
2022-10-24 17:05:20 +02:00
Stephan Guilloux (cos)
7c3a420be4 Problem: Android CI build tools does not support LIBSODIUM_ROOT
Solution: Implement the current same kind of mechanism as CZMQ & ZYRE, with enhancement.

Enhancement: When required and if LIBSODIUM is not set, the build tool checks
for an already existing clone, close to LIBZMQ. This mechanism is close
to what is done by LIBZMQ/CZMQ/ZYRE for their dependencies.

Additionnaly: Do not copy current source tree to any 'cache' folder. Use
current folder, but make sure all is cleaned before compilation is launched.
This is a lot safer, when building different clones in parrallel...

Enhancement to be reported to CZMQ/ZYRE via ZProject.
2022-10-24 14:10:04 +02:00
Guilloux Stephan (Ubuntu)
e1078f2e7c Problem: Android CI build helper has no trace function.
Solution: Add a trace function.

Requires to move the CI build helper code/check/init/... at the end of
helper file.

This new function is available for (and also used by) build.sh.
Output is like:

    LIBZMQ (x86_64) - Blah ...

To be reported to CZMQ/ZYRE via ZProject.
2022-10-24 10:59:13 +02:00
Stephan Guilloux
2b2fb9c708
Problem: Android NDK 22 download broken since support of NDK 23. (#4444)
* Problem: Android NDK 22 download broken since support of NDK 23.

Due to the PR to support NDK 23.

With NDK 23, the archive file name has changed.
This change is handled by the PR to support NDK23, but now, only 23 and after
are supported.

Also, NDK 23 support introduced a 2nd occurence of the variable
HOST_PLATFORM, with another value. One occurence being exported,
this may confuse next developpers (and it actually confused me).

Solution: Code review

1st occurence is simply dropped, and the algorithm around is changed so that
there is no need of a 'host_platform' kind of stuff.

2nd occurrence is renamed to ANDROID_BUILD_PLATFORM.

Note that 'HOST' is replaced by 'BUILD', as this is the common naming
when talking about the build/compilation machine, when cross compiling.

A dedicated function is created in the helpers, to actually download
the NDK. As this function is made 'public', more checks are performed.

Note:

    To be reported in CZMQ & ZYRE, via ZPROJECT, where NDK is downloaded
    in 2 different files.
2022-10-21 17:36:38 +01:00
Stephan Guilloux
2a7c9efe81
Problem: Android build environment variables need clarifications. (#4443)
* Problem: Android build environment variables need clarifications.

Reason: All are spread and initialized throughout the code.

Solution: Declare, initialize and document environment variables on top of build.sh.

Side effect: This participates to documentation.
2022-10-21 10:55:33 +01:00
Stephan Guilloux
e6e76096bf
Problem: Android APP fails to load ZMQ (ARM64 only) (#4442)
* Problem: Android APP fails to load ZMQ (ARM64 only)

Seen with physical Android devices running ARM64.
Not seen with ARM, X86 or X86_64.

Any Android APP loading ZMQ fails with:
```
[FATAL] Couldn't load library library zmq from jar. Dependency is required!
```

Unpack zyre-android-2.0.1.jar, find libzmq.so for ARM64 and look for missing
symbols:
```
prompt> unzip zyre-android-2.0.1.jar
prompt> cd lib/arm64-v8a
prompt> nm --undefined-only ./libzmq.so | head
                 U __aarch64_ldadd4_acq
                 U __aarch64_ldadd4_acq_rel
                 U __aarch64_ldadd4_rel
                 U __aarch64_ldadd4_relax
                 U __aarch64_ldadd8_acq_rel
                 U __aarch64_ldadd8_relax
                 U __aarch64_swp8_acq
                 U __aarch64_swp8_acq_rel
                 U __aarch64_swp8_rel
                 U __aarch64_swp8_relax
prompt>
```
Some more symbols are missing, but those are relevant for this issue.

OK.
These symbols are present in libc++_shared, but not exported ...:
```
prompt> nm libc++_shared.so | grep aarch64
00000000000ee6d0 t __aarch64_cas1_acq_rel
00000000000ee7a0 t __aarch64_cas8_acq_rel
00000000001028f0 b __aarch64_have_lse_atomics
00000000000ee840 t __aarch64_ldadd4_acq_rel
00000000000ee810 t __aarch64_ldadd4_rel
00000000000ee8a0 t __aarch64_ldadd8_acq_rel
00000000000ee870 t __aarch64_ldadd8_relax
00000000000ee7e0 t __aarch64_swp8_acq_rel
prompt>
```

Issue seen also on the WEB, with GCC & CLANG:
- https://bugzilla.redhat.com/show_bug.cgi?id=1830472
- cea175b838
- ...

Solution: Add `-mno-outline-atomics` to CXXFLAGS (FLUTTER fix).

Additionaly, had to introduce NDK_NUMBER.
This variable is calculated in `android_build_helper.sh`.
It represents the numeric form of NDK_VERSION:
```
  NDK_VERSION          --> NDK_NUMBER
  android-ndk-r25      --> 2500
  android-ndk-r23c     --> 2303
  android-ndk-r22      --> 2200
  android-ndk-r21e     --> 2105
  ... and so on
```

This will help a few other things (NDK download ?).
2022-10-18 10:19:15 +01:00
Stephan Guilloux (cos)
3022e7e099 Regression: Android build fails with libsodium.
Scenario:
```
export CURL=libsodium
cd zyre/builds/android
./ci_build.sh
```

Result:
```
Android (arm) build failed for the following reasons:
  Found no library named libzmq.so libsodium.so
    /home/stephan/git/zproject-android-testing/libzmq/builds/android/prefix/arm/lib/libzmq.so libsodium.so
```

Caused by PR #4437, where the 2nd commit was to fix Sonatype findings.

Lesson learnt: Not always a good idea to add double quotes around variables ...

Solution: Make VERIFY an array, so that Sonatype won't complain.
2022-10-12 02:43:10 +02:00
Stephan Guilloux (cos)
863b329ccd Problem: Android CI build scripts need minor enhancements (traces & cleanup).
Seen when someone has to relaunch `ci_build.sh` manually, for troubleshooting,
or experiment(s), ci_build.sh stops as libraries are already built.

Solution: Clean more temporary/build folders before build.

Note:

  To be reported in ZYRE/CZMQ via ZProject.

When called from ZYRE/CZMQ, it's difficult to identify which build script is
being executed

Solution: Modify each `echo` trace to show the project name and Android architecture in progress.

Note:

  To be reported in ZYRE/CZMQ via ZProject.
2022-10-11 23:08:08 +02:00
Stephan Guilloux
65b33ebefa
Problem: Android APP fails to load ZMQ since NDK r25.x (#4437)
* Problem: Android APP fails to load ZMQ since NDK r25.x

With the help of the dump of ./configure options (former PR):
```
LIBZMQ (arm) - ./configure options to build 'LIBZMQ':
  > --quiet
  > TOOLCHAIN=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64
  > CC=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang
  > CXX=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang++
  > LD=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/ld
  > AS=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as
  > AR=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar
  > RANLIB=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib
  > STRIP=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip
  > CFLAGS= -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE
  > CPPFLAGS= -I/home/stephan/git/zproject-android-testing/libzmq/builds/android/prefix/arm/include
  > CXXFLAGS=
  > LDFLAGS=-L/home/stephan/git/zproject-android-testing/libzmq/builds/android/prefix/arm/lib -L/tmp/android-ndk-r25/sour\
ces/cxx-stl/llvm-libc++/libs/armeabi-v7a
  > LIBS=-lc -ldl -lm -llog -lc++_shared
  > PKG_CONFIG_LIBDIR=/tmp/android-ndk-r25/prebuilt/linux-x86_64/lib/pkgconfig
  > PKG_CONFIG_PATH=/home/stephan/git/zproject-android-testing/libzmq/builds/android/prefix/arm/lib/pkgconfig
  > PKG_CONFIG_SYSROOT_DIR=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/sysroot
  > PKG_CONFIG_DIR=
  > --with-sysroot=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/sysroot
  > --host=arm-linux-androideabi
  > --prefix=/home/stephan/git/zproject-android-testing/libzmq/builds/android/prefix/arm
  > --disable-curve
  > --without-docs
```

We can observe that LDFLAGS has invalid `-L<path_to_libc++_shared.so>`:
```
-L/tmp/android-ndk-r25/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a

```
This path is no more valid, since NDK r25, where one should use LLVM path.

Ok, once this is fixed, ./configure requires also the path to libc.so.
I don't understand why libc.so is now required, actually, but without this, ./configure fails
to build its conftest.

Solution: Fix invalid LDFLAGS.

Notes:

- To be reported to CZMQ/ZYRE via ZPROJECT.

- Tested successfully with Android Emulator (x86 & x86_64).

- Still need some more work, as execution still fails with physical devices (observed on arm64).

- Introduced `ANDROID_STL`, `ANDROID_STL_ROOT` & `ANDROID_LIBC_ROOT`. All are initialized in `android_build_helper.sh`.

- New mechanism **MUST** be compatible with former NDK versions.
2022-10-11 21:40:13 +01:00
Guilloux Stephan (Ubuntu)
426985cb2c TAB -> SPACE 2022-10-06 11:32:57 +02:00
Guilloux Stephan (Ubuntu)
a20527da7f Problem: Android build system needs some debug (./configure options)
Proposal is to dump ./configure options to have an output like below:

```
LIBZMQ (x86_64) - ./configure options to build 'LIBZMQ':
  > --quiet
  > TOOLCHAIN=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64
  > CC=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android21-clang
  > CXX=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android21-clang++
  > LD=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/ld
  > AS=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as
  > AR=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar
  > RANLIB=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib
  > STRIP=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip
  > CFLAGS= -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE
  > CPPFLAGS= -I/builds/CrisalidBox/zproject-android-testing/libzmq/builds/android/prefix/x86_64/include
  > CXXFLAGS=
  > LDFLAGS=-L/builds/CrisalidBox/zproject-android-testing/libzmq/builds/android/prefix/x86_64/lib -L/tmp/android-ndk-r25/sources/cxx-stl/llvm-libc++/libs/x86_64
  > LIBS=-lc -ldl -lm -llog -lc++_shared
  > PKG_CONFIG_LIBDIR=/tmp/android-ndk-r25/prebuilt/linux-x86_64/lib/pkgconfig
  > PKG_CONFIG_PATH=/builds/CrisalidBox/zproject-android-testing/libzmq/builds/android/prefix/x86_64/lib/pkgconfig
  > PKG_CONFIG_SYSROOT_DIR=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/sysroot
  > PKG_CONFIG_DIR=
  > --with-sysroot=/tmp/android-ndk-r25/toolchains/llvm/prebuilt/linux-x86_64/sysroot
  > --host=x86_64-linux-android
  > --prefix=/builds/CrisalidBox/zproject-android-testing/libzmq/builds/android/prefix/x86_64
  > --disable-curve
  > --without-docs
```

Note:

  This mechanism is currently in use to identify/fix a bug in a recent PR for NDK update.

This mechanism is added before every call of `./configure`.

To be reported to CZMQ/ZYRE (via ZPROJECT).
2022-10-06 11:08:06 +02:00
Stephan Guilloux (cos)
0d49eddf16 Problem: Android build script may fail silently
Solution: Use `set -e`

Note:
To be reported in ZPROJECT, when generating the same for CZMQ & ZYRE.

Note:
`make clean` may fail when Makefile is not yet generated
(case of 1st call of build.sh after git clone).

Additionnaly, cleaned the dependency folder
(report of ZPROJECT generated scripts).
2022-10-02 02:27:12 +02:00
Stephan Guilloux (cos)
8b8fb6d80e Problem: Android helpers no not validate dependent libraries.
Seen in the code:
```
function android_build_verify_so {
...
    for dep_soname do
        if [[ $elfoutput != *"library: [${dep_soname}]"* ]]; then
            ANDROID_BUILD_FAIL+=("Library ${soname} was expected to be linked to library with soname:")
            ANDROID_BUILD_FAIL+=("  ${dep_soname}")
        fi
    done
```

The `for xxx` syntax is wrong, most probably a typo somewhere.

Solution: Fix & complete the `for xxx` loop.

Tested with & without LIBSODIUM (only available dependent library for LIBZMQ).

Note: The same has to be done in ZPROJECT, for CZMQ & ZYRE.
2022-10-01 03:59:23 +02:00
Benjamin Deroche
1f1e8145d0 Problem: Default Android NDK version is not aligned with zproject
Solution: Set NDK r25 as the default. No compatiblity changes required.
2022-09-26 14:47:05 +02:00
Stephan Guilloux (cos)
d4dd8a5417 Changed more git:gihub.com to https://github.com 2022-09-22 02:47:22 +02:00
Stephan Guilloux (cos)
a7774e38e6 Problem: builds/android/build.sh fails with CURVE=libsodium
How to reproduce:
```
prompt> git clone libzmq
prompt> cd libzmq/builds/android
prompt> export CURVE=libsodium
prompt> ./ci_build.sh
Cloning into 'libsodium'...
fatal: unable to connect to github.com:
github.com[0: 140.82.121.4]: errno=Connection timed out

Cloning into 'libsodium'...
fatal: unable to connect to github.com:
github.com[0: 140.82.121.3]: errno=Connection timed out

Cloning into 'libsodium'...
fatal: unable to connect to github.com:
github.com[0: 140.82.121.3]: errno=Connection timed out

Cloning into 'libsodium'...
fatal: unable to connect to github.com:
github.com[0: 140.82.121.4]: errno=Connection timed out

prompt>
```

Reason: Invalid URL to download libsodium:
```
prompt> grep -s 'git clone' libzmq/builds/android/*.sh
libzmq/builds/android/build.sh:70:        (cd "${cache}" && git clone -b stable --depth 1 git://github.com/jedisct1/libsod
                                                                                          ^^^^^^^^^^^^^^^^^
```

URL should be either:
- `git@github.com:`
- `https://github.com/` same given in [zproject](https://github.com/zeromq/zproject/blob/master/zproject_known_projects.xml#L108-L111).

Solution: Change URL to `https://`.

Result:
```
prompt> export CURVE=libsodium
prompt> ./ci_build.sh
Cloning into 'libsodium'...
remote: Enumerating objects: 659, done.
remote: Counting objects: 100% (659/659), done.
remote: Compressing objects: 100% (586/586), done.
remote: Total 659 (delta 159), reused 220 (delta 34), pack-reused 0
Receiving objects: 100% (659/659), 1.97 MiB | 4.00 MiB/s, done.
Resolving deltas: 100% (159/159), done.
autoconf scripts already exist.
...
libtool: install: /bin/install -c tools/.libs/curve_keygen /home/cbox_dev/git/ZEROMQ/libzmq/builds/android/prefix/x86_64/bin/curve_keygen
 /bin/mkdir -p '/home/cbox_dev/git/ZEROMQ/libzmq/builds/android/prefix/x86_64/include'
 /bin/install -c -m 644 include/zmq.h include/zmq_utils.h '/home/cbox_dev/git/ZEROMQ/libzmq/builds/android/prefix/x86_64/include'
 /bin/mkdir -p '/home/cbox_dev/git/ZEROMQ/libzmq/builds/android/prefix/x86_64/lib/pkgconfig'
 /bin/install -c -m 644 src/libzmq.pc '/home/cbox_dev/git/ZEROMQ/libzmq/builds/android/prefix/x86_64/lib/pkgconfig'
make[2]: Leaving directory `/tmp/android_build/x86_64/libzmq'
make[1]: Leaving directory `/tmp/android_build/x86_64/libzmq'
libzmq android build succeeded
prompt>
```
2022-09-22 00:43:57 +02:00
Benjamin Deroche
5f6f708f29 Revert "Problem: Libs crash at runtime on Android when built with NDK 23+"
This reverts commit 9c6f09cbe551e08782b67fae367b56dc69f656f7.
2022-05-11 17:25:46 +02:00
Benjamin Deroche
9c6f09cbe5 Problem: Libs crash at runtime on Android when built with NDK 23+
Solution: Fix the recently updated scripts
2022-05-10 15:21:06 +02:00
Benjamin Deroche
a49a4d0997 Problem: Accidentaly deleted a comment when updating Android build scripts
Solution: Restore it
2022-05-09 16:18:02 +02:00
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