Commit Graph

450 Commits

Author SHA1 Message Date
Min RK
8fb5b10d8a Problem: make dist results are not tested (#3024)
* always run tests from tarball of `make dist`

ensures that tests will not pass if critical files are omitted from releases

* add explicit make dist only for non-default builds

distcheck should already cover this for default builds

* don’t verify that valgrind/coverage tests can be run from dists

* add various files missing from dists

- missing template from cmake
- add missing android build files
- add some missing ci_build.sh scripts
2018-03-27 17:36:30 +01:00
Manuel Segura
4726f7262d Pull request to merge porting to WindRiver VxWorks 6.x (#2966)
* Problem: Still need to port over more files to VxWorks 6.x

Solution: Port more files to VxWorks 6.x

* Problem: Need to port over remaining files to VxWorks 6.x. Also remove POSIX thread dependency for VxWorks (because of priority inversion problem in POSIX mutexes with VxWorks 6.x processes)

Solution: Port over remaining files to VxWorks 6.x. Also removed POSIX thread dependency for VxWorks

* Problem: Needed to modify TCP, UDP, TIPC classes with #ifdefs to be compatible with VxWorks 6.x.

Solution:  Modify TCP, UDP, TIPC classes with #ifdefs to be compatible with VxWorks 6.x
2018-03-10 11:03:02 +00:00
Luca Boccassi
19060345e4 Problem: TIPC availability check is too strict (#2977)
* Problem: TIPC availability check is too strict

Solution: at build time only check if the API is available. In the tests
do a first check and a skip if the functionality is not available.

TIPC needs an in-tree but not loaded by default kernel module, tipc.ko
to be loaded, which requires root, so it is unlikely to be available on
any build system by default.
This will allow most distributions to ship with TIPC support built in,
and to avoid tests failure if the module is not there.

* Problem: no Travis tests for TIPC

Solution: mark one job with sudo: required and load the kernel module

* Problem: CMake fails when test returns 77 (skip)

Solution: set property to let it mark the test as skipped as intended
2018-03-09 17:47:42 +01:00
Simon Giesecke
ecb3b503c3 Problem: no output of details on test failure
Solution: set CTEST_OUTPUT_ON_FAILURE option
2018-02-12 17:17:32 +01:00
sigiesec
ac775ba48b Problem: clang-format-diff does not run
Solution: fix execution directory
2018-02-02 15:47:43 +01:00
sigiesec
749a85cb21 Problem: travis-ci is using outdated clang(-format)
Solution: explicitly select clang-5.0
2018-02-02 15:47:43 +01:00
sigiesec
26b5b5b2d9 Problem: out-of-scope files are considered by cmake clang-format targets
Solution: restrict to src, tests, perf, tools and include directories
2018-02-02 15:47:43 +01:00
sigiesec
4161793d19 Problem: clang-format not run on CI
Solution: add clang-format to cmake, and add another travis-ci build type
2018-02-02 15:47:43 +01:00
Min RK
35c4b68a09 fix inclusion of cmake modules in dist 2018-01-13 13:15:51 -08:00
Min RK
5f8488de6d move FindSodium to builds/cmake/Modules
with the rest of the CMake modules
2018-01-13 13:15:51 -08:00
Min RK
f8da0ac721 move cmake ZeroMQConfig.cmake.in to builds/cmake 2018-01-13 13:14:53 -08:00
evoskuil
f41b51ee04 Problem: NuGet packaging versions out of date. 2017-12-14 17:24:38 -08:00
Luca Boccassi
ac552ba448 Problem: accept4 not available on all platforms
Solution: check for availability in CMake and autoconf before using it
2017-11-18 11:33:53 +00:00
f18m
bfbb4ff2e9 Background threads enhancements (#2778)
* Background thread scheduling 

- add ZMQ_THREAD_AFFINITY ctx option; set all thread scheduling options
from the context of the secondary thread instead of using the main
process thread context!
- change ZMQ_THREAD_PRIORITY to support setting NICE of the background
thread when using SCHED_OTHER
2017-10-16 12:29:03 +01:00
Luca Boccassi
9be8cebd21 Merge pull request #2765 from GreatFruitOmsk/issue-2764
Problem: Race condition in IPC sockets
2017-10-06 09:25:33 +01:00
Ilya Kulakov
656cdb959a Problem: Race condition in IPC sockets
Solution: Don't unlink file on close

File may not belong to the socket at that point.
2017-10-05 14:57:10 -07:00
Alexander Dubovik
02c46463d7 fix build for msvc2017 2017-10-05 22:54:12 +03:00
Luca Boccassi
124e04659c Problem: ZMQ_HAVE_O_CLOEXEC not defined by CMake
Solution: add it to CMake's platform.hpp.in
2017-09-01 10:15:42 +01:00
Robin Stacey
83f54d90ad Problem: ZMQ_HAVE_O_CLOEXEC always disabled
Solution: Escape quotes in cmake test.
2017-09-01 16:37:27 +09:00
sigiesec
fc2b7cd5ea Problem: coverage includes tweetnacl, which is not our code
Solution: exclude tweetnacl from coverage
2017-08-23 14:42:52 +02:00
Luca Boccassi
e81a40b8bd Problem: CMake build ignores SO_BINDTODEVICE
Solution: add it to CMake's platform.hpp.in
2017-08-19 12:07:25 +01:00
Luca Boccassi
8ecfee475c Problem: missing files from VS2008 solution
Solution: generate list of sources and headers with:

 ls -1 src/*cpp | sort | sed 's|src/\(.*\)|      <File RelativePath="..\\..\\..\\..\\src\\\1" />|g'
 ls -1 src/*hpp | sort | sed 's|src/\(.*\)|      <File RelativePath="..\\..\\..\\..\\src\\\1" />|g'

and add them.
2017-08-18 12:45:12 +01:00
sigiesec
301f3c70c2 Problem: code duplication between curve_client_t and curve_server_t decode and encode
Solution: extracted common base class curve_mechanism_base_t
2017-08-18 11:34:22 +02:00
Luca Boccassi
9ac244a67c Problem: coverage CI job does not print test errors
Solution: run make check with VERBOSE=1
2017-08-17 17:20:56 +01:00
sigiesec
406af1ef67 Problem: ZAP tests are now generic but placed in test_security_curve.cpp
Solution: Move ZAP tests to own file test_security_zap.cpp, move common code to testutil_security.hpp
2017-08-17 11:45:18 +02:00
sigiesec
6e8a0b31be Problem: ZAP client code is duplicated in all mechanisms
Solution: created a zap_client_t class, extracted first function send_zap_request from curve_server_t
2017-08-16 18:04:30 +02:00
Jake Cobb
0cbdc18817 Problem: CMake build does not allow static linking libsodium
Solution: Pass along SODIUM_STATIC define if set in CMake config
2017-08-10 13:04:15 -04:00
Brian Russell
b963542e8f Add socket option BINDTODEVICE
Linux now supports Virtual Routing and Forwarding (VRF) as per:

https://www.kernel.org/doc/Documentation/networking/vrf.txt

In order for an application to bind or connect to a socket with an
address in a VRF, they need to first bind the socket to the VRF device:

    setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, dev, strlen(dev)+1);

Note "dev" is the VRF device, eg. VRF "blue", rather than an interface
enslaved to the VRF.

Add a new socket option, ZMQ_BINDTODEVICE, to bind a socket to a device.
In general, if a socket is bound to a device, eg. an interface, only
packets received from that particular device are processed by the socket.

If device is a VRF device, then subsequent binds/connects to that socket
use addresses in the VRF routing table.
2017-07-31 15:31:47 +01:00
Luca Boccassi
fbb6bbdcb8 Problem: reading from /dev/urandom is clunky
Solution: if available use the getrandom function as it doesn't
require any synchronization, state or cleanup
2017-07-28 11:28:19 +01:00
Luca Boccassi
2626fdfa23 Problem: tweetnacl leaks file descriptor on fork+exec
Solution: open with O_CLOEXEC if available or set FD_CLOEXEC if not
2017-07-28 11:27:55 +01:00
Luca Boccassi
86f9f1df7a Problem: CI doesn't build with debugging symbols
Solution: pass -g so that valgrind/asan can print useful backtraces
2017-05-01 22:57:05 +01:00
Luca Boccassi
463c2d75ae Problem: CI builds and test runs not done in parallel
Solution: run make with -j5, as now the tests support it.
2017-05-01 22:57:05 +01:00
Luca Boccassi
48792f8006 Problem: CI runs libsodium tests
Solution: don't, libzmq's CI tests are not responsible for testing
libsodium stable releases. Save some time in the CI.
2017-05-01 22:57:05 +01:00
bbdb68
1d58a00992 Problem: no windows UWP support
* add define for windows/UWP

* prevent issue with COM references

* gettickcount not available on uwp

* add compiler definitions

* add convenitnece cmake file

* brute force uwp compilation

* fix compiler version

* cosmetics
2017-04-04 09:50:33 +01:00
evoskuil
6c1fb4d0b8 Problem: NuGet pacakge out of date. 2017-03-29 10:44:10 -07:00
evoskuil
72714ad297 Problem: no nuget package for 4.2.2 2017-03-24 01:47:22 -07:00
evoskuil
f2d7b2cad8 Problem: curve not enabled by default in Visual Studio. 2017-03-23 22:29:19 -07:00
evoskuil
91a01f447d Problem: libsodium linked by default in Visual Studio projs. 2017-03-23 22:28:45 -07:00
evoskuil
dbb5e72638 Problem: Visual Studio projects intertwined and drifting. 2017-03-23 21:32:48 -07:00
chuggafan
7913e96271 I have added msys building, license stuff (#2387)
(msys building is buggy, please be aware, it fails to compile on my
machine) also I modified the buildall.bat/buildbase.bat to use correct
MSVC versions instead of "visual studio 2017"
2017-03-19 22:38:43 +00:00
mlodew
9091623243 Fixed lib and dll paths in visual studio build (#2375)
Fixed path to lib and dll files.
2017-03-19 16:50:33 +00:00
Luca Boccassi
3ab4796c5a Problem: ZMQ background threads are unnamed
Solution: use pthread API to set the name. For now call every thread
"ZMQ b/g thread". Would be nice to number the I/O threads and name
explicitly the reaper thread, but in reality a bit of internal API
churn would be necessary, so perhaps it's not worth it.
This is useful when debugging a process with many threads.
2017-03-12 00:46:15 +00:00
boringuy
d6f4263ce3 cmake WITH_LIBSODIUM option is broken (#2349)
* cmake WITH_LIBSODIUM option is broken

- Fixed the variable name in platform.hpp.in
- Fixed #if check for randombytes_close() when libsodium is used

* Fixed typo from previous commit

* Reverted compile error fix for randombytes_close()
2017-02-22 22:28:05 +00:00
zstang
3b0dfd528f #2341 fix
the root path name specified in this file cause the #2341 problem, the root path name is not need.
2017-02-21 17:35:36 +08:00
chuggafan
020ff65efa Updated buildbase and buildall to work with visual studio 2017 2017-01-16 14:54:40 -05:00
Luca Boccassi
bbae5d0f9a Problem: dpkg-query might fail in CI build and fail the build
Solution: rework the bash test to avoid build failures as intended
and make it an easier one-liner
2016-12-27 14:45:45 +01:00
Luca Boccassi
822def9b2b Problem: Travis rebuilds libsodium every time
Solution: use packages on Ubuntu and brews on OSX. The packages and
the brews are always kept up to date, so it's no use to rebuild the
libsodium stable branch manually everytime.
2016-12-27 11:48:38 +01:00
Luca Boccassi
f287c7a2aa Problem: eventfd leaks socket on fork+exec
Solution: if available, use eventfd with EFD_CLOEXEC flag to make
the process close the socket on fork+exec
2016-12-26 19:08:27 +01:00
Luca Boccassi
211898d243 Problem: epoll leaks socket on fork+exec
Solution: if available, use epoll_create1 with EPOLL_CLOEXEC flag to
make the process close the socket on fork+exec
2016-12-26 19:08:27 +01:00
Kos
43941052a9 add link libsodium.a 2016-12-22 14:25:00 +08:00
Kos
edad90f770 mingw32 fix 2016-12-22 09:35:49 +08:00
Anass Bouassaba
ad045512b9 Build support for VS2017, Windows SDK 10.0.14393.0, toolset v141 2016-12-09 09:21:11 +01:00
Dmitriy-GH
488cb5a022 MSVC 2015 project for compile libzmq.dll in WinXP compatible mode 2016-11-02 15:51:58 +05:00
Mário Kašuba
3996d4e20d Merge branch 'master' of github.com:zeromq/libzmq
# Conflicts:
#	builds/msvc/vs2012/libsodium.import.props
2016-10-10 11:02:32 +02:00
Bernd Langpap
96c306cc54 Problem: parameter %1 set hard to build target and prevents the skipping of pause
Solution: removed Pause
2016-07-04 12:13:44 +02:00
Bernd Langpap
73631bf1c9 modified build.bat to support non-pausing installation 2016-07-04 11:06:56 +02:00
Bernd Langpap
5de974a036 modified build.bat for msvc to support no-pausing script-based installation
Signed-off-by: Bernd Langpap <Bernd.Langpap@airbus.com>
2016-07-04 10:31:11 +02:00
Sam Lishak
d49e43bbc8 Problem: FD_SETSIZE not set to 16k for all build definitions
Solution: Set FD_SETSIZE to 16k for all other build definitions.
2016-06-13 09:42:54 +01:00
Michael Lutz
7a6ff07a01 Problem: Windows performance is not optimal due to select().
Solution: Provide poll() for Windows as well. This is a build option that
defaults to off as the resulting binary will only run on Windows Vista or
newer.

This is not tested with alternative Winsock service providers like VMCI,
but the documentation for WSAPoll does not mention limitations.

On my local machine, throughput improves by ~10 % (20 simultaneous
remote_thr workes to one local_thr, 10 byte messages), while latency
improves by ~30 % (measured with remote/local_lat).
2016-06-11 19:17:18 +02:00
Luca Boccassi
b4abaad269 Problem: Android CI uses outdated C++ ABI 4.8
Solution: switch to 4.9
2016-06-07 23:56:34 +01:00
Luca Boccassi
b872e7d9f7 Problem: Android CI NDK version out of date
Solution: update CI scripts to use newer r11c from r10e
2016-06-07 23:56:28 +01:00
Luca Boccassi
8be568916e Problem: Android CI script hardcodes ABI version
Solution: use a variable for easier maintenance, in sync with zproject
2016-06-07 23:18:21 +01:00
evoskuil
96a66bab3b Problem: msvc imports missing Rule.Category declarations. 2016-05-25 13:52:49 -07:00
evoskuil
c7f167377c Problem: unresolved dgram externals in msvc builds. 2016-05-18 12:25:51 -07:00
evoskuil
2b798e486a Problem: name conflicts from windows.h, draft API declared in pch. 2016-05-13 20:41:26 -07:00
evoskuil
5e0fb27cc6 Problem: tab characters are poor for source readability. 2016-05-13 03:25:30 -07:00
evoskuil
af524aed6b Problem: msvc dist has redundancies and missing elements. 2016-05-13 03:22:01 -07:00
evoskuil
9e26bb1885 Problem: typo in platform.hpp comment. 2016-05-13 02:30:37 -07:00
evoskuil
1c9d02d700 Problem: mo current nuget package. 2016-05-13 02:24:45 -07:00
evoskuil
7684ce4fcd Problem: incorrect white spacing for standard vcxproj file. 2016-05-13 01:48:08 -07:00
evoskuil
9622a830d0 Problem: inapplicable, redundant and invalid references in msvc pch. 2016-05-13 01:40:14 -07:00
evoskuil
2113feec39 Problem: msvc precompiled header config is a mess, tweetnacl is missing. 2016-05-13 01:04:22 -07:00
evoskuil
0db07394d0 Problem: msvc configuration options are invalid and/or inconsistent. 2016-05-13 01:00:58 -07:00
evoskuil
01ab149b96 Problem: copy of libsodium import props is unnecessary. 2016-05-13 00:56:09 -07:00
evoskuil
7425fcca80 Problem: incorrect include guard symbol. 2016-05-13 00:47:03 -07:00
evoskuil
40d7a4c896 Problem: redundant copies of msvc .props and .xml files. 2016-05-13 00:46:06 -07:00
evoskuil
f25a13bc8a Problem: configure.bat is incomplete and conflicts with MSVC UI. 2016-05-12 15:36:18 -07:00
evoskuil
bce1cf96d9 Problem: vc common props have platform specific conditions. 2016-05-12 03:36:39 -07:00
evoskuil
a3c3bcfe4a Problem: visual c++ invalid ToolsVersion warnings. 2016-05-12 03:31:52 -07:00
evoskuil
9cb7077e3d Problem: inconsistent msvc property sheet display name (vs2012). 2016-05-12 03:15:16 -07:00
evoskuil
b5342bc008 Problem: no tool for maintainers to build all vs solutions. 2016-05-12 03:14:37 -07:00
Doron Somech
fcc80d4ffb add draft option to windows configure 2016-05-03 10:18:46 +03:00
Aaron Linville
a57fd70844 Fix issue with unresolved external symbols for the gather and scatter classes by adding them to the MSVC 2010, 2012, 2013 and 2015 projects. 2016-04-22 19:26:55 -04:00
Luca Boccassi
a117c1f48d Problem: Travis CI CMake build does not run tests
Solution: add make test to the cmake/ci_build.sh script
2016-04-21 11:35:43 +01:00
Luca Boccassi
ea294afd8b Problem: CMake does not check for TIPC support
Solution: add macro in ZMQSourceRunChecks.cmake and optionally
include the TIPC sources if the support is available.
More importantly, only run the TIPC tests if the support is there.
2016-04-21 11:33:20 +01:00
Luca Boccassi
f18463f323 Problem: mkdtemp not available on all platforms
Solution: check for availability in autoconf and cmake, and if not
available fall back to random file name rather than random directory.
2016-04-11 00:18:51 +01:00
Matt Powley
f2018ab317 Fixes for Windows XP compatibility
A Visual Studio build from master (commit id: dac5b45dfb) using the v140_xp toolset yields a binary that is not XP compatible.

Two libraries contain exports that cannot be found:
 -  IPHLPAPI.DLL : if_nametoindex
 - KERNEL32.DLL : InitializeConditionVariable

The latter export is already dealt with in the file './src/condition_variable.hpp'; however this requires setting the _WIN32_WINNT pre-processor definition.
I am not experienced enough to figure a work around for the 'if_nametoindex' method, so I have created a new pre-processor definition 'ZMQ_HAVE_WINDOWS_TARGET_XP' and removed the calling of the function with the limitation that these builds cannot handle a IPv6 address with an adapter name.

To make it easier for people targeting XP with an MSVC build I have modified the MSBuild property file to add/modify the pre-processor definitions if they are building using a XP targeting tool set; such as v140_xp.
2016-03-31 15:45:00 +01:00
Matt Powley
260860dea1 Add .gitignore for Visual Studio builds in the 'builds/msvc' folder
* Added a new .gitignore file for excluding Visual Studio build output any popular plug-in generated content. (This was copied from the GitHub project https://github.com/github/gitignore).
* Removed the basic ignore settings from the root folder in favour of more precision within the subfolder's .gitignore file
* Added the new VC compiler's experimental Intellisense database file
2016-03-31 14:51:36 +01:00
Matt Powley
0e405a5a77 Use vs2015 MSBuild property sheets in older projects
All the older (vs2010 -> vs2013) projects had copies of the Visual Studio 2015 MSBuild applied to them when running the 'configure.bat' batch file. Any modifications to a property sheet was not applied to the other Visual Studio versions' projects unless the batch file was re-executed.

* Modified the older projects to reference the Visual Studio 2015 property sheets so changes are immediately applied
* Removed the batch file copy steps (which left the repository very dirty after execution)
2016-03-31 14:51:23 +01:00
Pieter Hintjens
396237f871 Problem: MSVC builds instructions aren't entirely clear
Solution: update them.
2016-03-30 14:19:20 +02:00
Luca Boccassi
dc27ad41d2 Problem: coveralls uses wrong path on Trusty
Solution: pass built-root when calling coveralls, to help it find the
right path to the source code.
2016-03-19 21:55:03 +00:00
Luca Boccassi
00e0957640 Problem: false positive on valgrind 3.10
Solution: update builds/valgrind/valgrind.supp to ignore glibc's
__libc_freeres calls. This code runs after the program exits, and
tries to de-allocate memory allocated internally by glibc, so it has
nothing to do with libzmq code. This suppression is added by default
in newer versions of Valgrind, not yet available on older
distributions.
2016-03-19 21:54:52 +00:00
Luca Boccassi
ebc7316069 Problem: CI doesn't run Valgrind
Solution: run Valgrind only on the default Linux build to avoid
increasing the runtime.
2016-03-19 21:54:52 +00:00
Benjamin Henrion
516efa46c0 add some doc for docker android compilation 2016-03-18 13:54:20 +01:00
Luca Boccassi
15fd419f22 Problem: test_large_msg requires 2GB of free RAM
Solution: remove temporarily until proper message limits have been
implemented, then a more granular test case can be added without
such high requirements which are problematic in embedded environment,
build systems, VMs and CI systems
2016-03-16 21:47:58 +00:00
Luca Boccassi
0cd7c0f807 Problem: no code coverage in CI
Solution: add new coverage build, and upload results to coveralls.io
2016-03-13 22:23:56 +00:00
Osiris
a6392b9e74 Problem: Windows PDB not created for RELEASE targets
Solution: Modified projects to create PDB file for RELEASE targets
	- also spread precompiled settings to all DevStudio solution versions

This change affects Windows builds only
2016-03-11 14:48:30 -06:00
Pieter Hintjens
0916c17b3a Merge pull request #1842 from opedroso/PRECOMPILED
Problem: Windows Build not using precompiled headers for all targets
2016-03-05 12:59:51 +02:00
Osiris
224c0670ee Problem: Windows Build not using precompiled headers for all targets
Solution: Enabled precompiled header settings in all targets
Before build time: ~6min 49 secs
Stop  Time: Fri 03/04/2016  8:29:50.13
Start Time: Fri 03/04/2016  8:23:00.28

After build time: ~4min 19 secs
Stop  Time: Fri 03/04/2016 12:12:10.24
Start Time: Fri 03/04/2016 12:07:51.78
2016-03-05 04:47:08 -06:00
Osiris
09d003aac0 Problem: Added "make clean" to Windows build scripts
Solution: Added ability to do equivalent of a "make clean" by executing:

O:\git\libzmq\builds\msvc\build>buildall.bat clean
Start Time: Fri 03/04/2016 14:33:56.50
Cleaning without libsodium
Cleaning ..\vs2013\libzmq.sln... ()
Platform=x86
Configuration=DynDebug
Configuration=DynRelease
Configuration=LtcgDebug
Configuration=LtcgRelease
Configuration=StaticDebug
Configuration=StaticRelease
Platform=x64
Configuration=DynDebug
Configuration=DynRelease
Configuration=LtcgDebug
Configuration=LtcgRelease
Configuration=StaticDebug
Configuration=StaticRelease
Cleaning complete: ..\vs2013\libzmq.sln

Stop  Time: Fri 03/04/2016 14:34:01.84
Start Time: Fri 03/04/2016 14:33:56.50

A clean takes ~5 secs to complete.
2016-03-05 04:37:01 -06:00