I'm adding gyp support so that we can easily pull in libzmq
and other C/C++ projects into gyp packages, especially via
node-gyp.
Solution: add gyp definition
This works only for Windows, OS/X, and Linux. We set a single
macro in project.gyp according to the system, and the rest is
done in builds/gyp/platform.hpp. The values in that file are
not dynamic. Your mileage will vary.
- they have no copyright / license statement
- they are in some randomish directory structure
- they are a mix of postable and non-portable files
- they do not conform to conditional compile environment
Overall, it makes it rather more work than needed, in build scripts.
Solution: clean up tweetnacl sauce.
- merged code into single tweetnacl.c and .h
- standard copyright header, DJB to AUTHORS
- moved into src/ along with all other source files
- all system and conditional compilation hidden in these files
- thus, they can be compiled and packaged in all cases
- ZMQ_USE_TWEETNACL is set when we're using built-in tweetnacl
- HAVE_LIBSODIUM is set when we're using external libsodium
Took me over 8 hours to track down the cause of bizarre link
errors when building with libsodium. The VS project files are
not simple things.
Note to self and other maintainers: when someone is obviously
out of their depth, do not merge their changes to build scripts
without cynical appraisal.
Solution: undo the damage.
Caused by error in last commit which used HAVE_LIBSODIUM instead
of HAVE_SODIUM.
Solution: use HAVE_LIBSODIUM as we do in other configure scripts.
The project is called 'libsodium' and not 'sodium'.
There is an option to enable/disable libsodium via the Visual Studio
UI. This is not practical for command-line usage (via msbuild).
Solution: add configure.bat that searches for libsodium in sibling
directory to libzmq; if it finds it, defines HAVE_LIBSODIUM 1.
This is consistent with zproject, which has the same problem and
is getting the same solution for all dependency resolution on
Windows.
Note that this approach also provides a way to support tweetnacl
via a configure option.
Also, removed duplicate props files and re-copy in configure.bat
as it was an insane nightmare to update these by hand. (and not
clear that they were identical. Now it's forced.)
I hope restoring this from a previous version doesn't do any damage, it
is missing in the current version of this repository and is vital for
the lib to compile anywhere.
Solution: specify the necessary EXTRA_DIST
I added a Makefile.am in builds that covers all systems except msvc,
which already has a Makefile.am that does this.
Fixes#1505
Of course people still "can" distributed the sources under the
LGPLv3. However we provide COPYING.LESSER with additional grants.
Solution: specify these grants in the header of each source file.
I attempted to fix up the properties files manifests in the Makefile,
but neglected the end-of-line escape characters. It was good enough
to pass whatever make dist on Linux did, but I had no Windows build
env to test in. The broken change was in commit de4a442.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Solution: increased to 4096 by default for all MSVC builds, for MinGW,
and for CMake.
Note: this is a speculative change, it needs confirmation before we
can keep it. Particularly, there is some doubt that changing this in
libzmq will affect upstream applications using libzmq.dll.
Updated:
builds/zos/README.md: Updated with portability notes resulting
from building zeromq/libzmq/master as of 2014-07-23 on z/OS
UNIX System Services.
Current z/OS UNIX status: all expected tests pass, except
"test_proxy", which hangs and times out.
Updated:
builds/zos/runtests: Extract tests to run from tests/Makefile.am
at runtime, rather than hard coding tests list (to simplfy
later maintenance). test_*_tipc is excluded as BUILD_TIPC is
not defined on z/OS UNIX System Services. XFAIL_TESTS are also
excluded, following current logic in tests/Makefile.am
Updated:
builds/zos/cxxall: Defines ZMQ_HAVE_ZOS for platform portability;
define ZMQ_USE_POLL _instead_ of ZMQ_FORCE_POLL, due to change
in src/poller.hpp since ZeroMQ 4.0.x branch
Updated:
builds/zos/README.md: Outlined process to transfer source from
GitHub to z/OS UNIX System Services, including character set
conversion for the source
Updated:
README.md: describes process of building/using DLL
makelibzmq: Build DLL as well as static library (unless BUILD_DLL=false)
maketests: Dynamically link to ../src/libzmq.so if present
runtests: Explicitly place ../src at start of LIBPATH
makeclean: Also remove files created for DLL
cxxall: Bumped updated date to reflect last edit
builds/zos includes:
README.md: Overview of z/OS UNIX System Services port (Markdown)
makelibzmq: Compile src/*.cpp and make libzmq.a
maketests: Compile tests/*.cpp and make test_* executables
runtests: Run tests/test_* executables and report results
makeclean: Remove built files
zc++: /bin/c++ wrapper supplying required build arguments
cxxall: run zc++ for all *.cpp files in directory
platform.hpp: pre-generated (and edited) src/platform.hpp for z/OS
test_fork.cpp: updated tests/test_fork.cpp that completes on z/OS