Commit Graph

285 Commits

Author SHA1 Message Date
Osiris
79538ed651 Problem: Windows build not using precompiled header
Solution: Phase II - made compile using precompiled header
2016-02-18 11:35:35 -06:00
Pieter Hintjens
27fe489843 Problem: VC++ gives warnings on inet_addr
Solution: in project.gyp, define _WINSOCK_DEPRECATED_NO_WARNINGS
2016-02-18 11:46:43 +01:00
Osiris
80024eca8c Problem: Windows build script requires edit for DevStudio version
Solution: Use CMD.EXE environment variable to extract DevStudio version
number and build using it. This even supports machines with multiple
DevStudio versions installed, as long as the build for each version is
done on a separate window with the correct environment.
If multiple version builds are desired from a single CMD.EXE, edit the
buildall.bat file to uncomment the build statements for each specific
version desired.
2016-02-17 09:42:53 -06:00
Pieter Hintjens
3443da216f Problem: node-gyp defaults to -fno-rtti, which breaks libzmq
Solution: override in project.gyp, for Linux and OS/X.
2016-02-17 12:06:45 +01:00
Pieter Hintjens
c78e4f33a3 Problem: if src/platform.hpp still exists, gyp uses this
Gyp needs its own platform.hpp; there is no way to delete this
file automatically.

Solution: copy gyp's platform.hpp into src, so that things build
properly no matter what the starting state. If you build with gyp
and then try to build using autotools' makefile, you'll get an
error from the platform.hpp.
2016-02-17 12:06:45 +01:00
Pieter Hintjens
9bebd4dce9 Problem: local build should do its own .gitignore
Solution: add .gitignore in builds/gyp
2016-02-17 12:06:45 +01:00
Pieter Hintjens
8559770cf3 Problem: in builds/gyp, socket limit is 4K on Windows
Solution: raise to 16K
2016-02-17 12:06:45 +01:00
Pieter Hintjens
bbcc79d188 Problem: tests don't build on Windows
There were numerous small issues with test cases:

- some lacked the right source file header
- some were not portable at all
- some were using internal libzmq APIs (headers)

Solution: fixed and cleaned up.
2016-02-12 15:48:37 +01:00
Pieter Hintjens
d148c3ea5d Problem: no clue how to run gyp on Windows
Solution: offer a build.bat to help the user.
2016-02-12 15:48:37 +01:00
Luca Boccassi
8bee4e2547 Merge pull request #1799 from hintjens/master
Making gyp builds work
2016-02-12 10:40:43 +00:00
Pieter Hintjens
8230c0d396 Problem: gyp does not build tests
Solution: it's a lot of work to define the tests in project.gyp
so I did this using gsl to generate the JSON, from a small XML
list of the test cases.

To keep this, and the hundreds of .mk files, away from the root
directory, I've moved the gyp files into builds/gyp, where you
would run them.

It all seems to work now. Next up, OS/X and Windows :)
2016-02-12 11:31:38 +01:00
Pieter Hintjens
a682f94a32 Problem: tcp_address.cpp won't compile on OS/X w/o ZMQ_HAVE_IFADDRS
This is rather insane since the code knows well enough what systems
support if_nametoindex. I blame this on over-use of autotools early
in libzmq's days.

Anyhow, this breaks gyp builds on OS/X.

Solution: add ZMQ_HAVE_IFADDRS to build/gyp/platform.hpp for OS/X.
2016-02-12 10:49:19 +01:00
Constantin Rack
22e830bece Merge pull request #1798 from hintjens/master
Getting gyp build working
2016-02-12 10:07:14 +01:00
Pieter Hintjens
6bef3fe9ad Problem: can't build libzmq.a using gyp
Solution: add necessary macros into builds/gyp/platform.hpp

Work for Linux now, other platforms to test.
2016-02-12 09:58:44 +01:00
Luca Boccassi
9393f06381 Problem: CI use of sodium or nacl is confusing
Solution: establish a matrix of CI options. On one axis we have the
build system (autotools, cmake, android) and on the other axis we
have the encryption options (tweetnacl, libsodium or none).
2016-02-11 22:39:36 +00:00
Luca Boccassi
01eb580739 Problem: typo in CMake platform.hpp breaks build
Solution: use ZMQ_USE_TWEETNACL as a define as expected instead of
HAVE_TWEETNACL
2016-02-11 21:41:21 +00:00
Pieter Hintjens
fde81d7e07 Problem: can't build using gyp
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.
2016-02-11 22:41:01 +01:00
Luca Boccassi
0bdc5d0457 Problem: CMake CI build still clones libsodium
Solution: avoid cloning libsodium, default build is tweetnacl
2016-02-11 20:27:06 +00:00
Luca Boccassi
4f5594c2ce Problem: Android CI build uses unstable libsodium
Solution: checkout stable branch before building
2016-02-11 20:25:21 +00:00
Luca Boccassi
3420e6e0dd Problem: CI still thinks libsodium is default
Solution: build by default with tweetnacl, and add sub-build project
to test libsodium
2016-02-11 20:16:17 +00:00
Pieter Hintjens
f8ed793f76 Problem: tweetnacl sources are a mess
- 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
2016-02-11 18:06:07 +01:00
Luca Boccassi
c23cc65735 Problem: no CMake Travis CI build
Solution: add builds/cmake/ci_build.sh and call it from travis.yml
2016-02-08 13:30:25 +00:00
Luca Boccassi
84544ca6e2 Problem: no CI build with tweetnacl
Solution: add builds/tweetnacl/ci_build.sh and add it in travis.yml
2016-02-08 12:31:05 +00:00
Pieter Hintjens
e0f02bdfb8 Problem: libzmq uses different build.bat style than zproject
Solution: at least for vs2015, add vs2015/build.bat to work the
same was as zproject.
2016-02-07 10:36:17 +01:00
Pieter Hintjens
0d7e7bfac0 Problem: MSVC project filters were out of date
Solution: update (with correct one from VS2015)
2016-02-06 14:12:43 +01:00
Pieter Hintjens
86aa7bb1bc Problem: commit a464eec7 really broke VS2015 builds
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.
2016-02-05 00:25:59 +01:00
Pieter Hintjens
a3d9b46a60 Problem: Android build is slow and noisy
Solution: use --without-docs (changed from --without-documentation)
and also --quiet.
2016-02-04 11:24:25 +01:00
Pieter Hintjens
31d181effb Problem: MSVC build does not detect libsodium
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'.
2016-02-03 23:45:01 +01:00
Pieter Hintjens
6a9af8ed62 Problem: can't build without libsodium from command line (MSVC)
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.)
2016-02-03 22:44:06 +01:00
Pieter Hintjens
d218e03884 Problem: project files have tool version in two places
Leading to extra work when copying between versions of VS.

Solution: remove second unnecessary definition.
2016-02-02 22:49:15 +01:00
Pieter Hintjens
4ce9c7c742 Problem: does not build on VS2015
Solution: add missing project files

(Also, updated FD_SETSIZE to 16K as a bonus.)
2016-02-02 22:31:18 +01:00
Pieter Hintjens
b92055fa56 Problem: not building on VS2015
Solution: fixed project files, and warning in timers.cpp
2016-02-02 22:05:56 +01:00
Pieter Hintjens
44c6b0484e Revert "Revert "Problem: deprecated use and reference of zmq_term"" 2016-02-01 23:00:06 +01:00
Pieter Hintjens
1708bfefb7 Revert "Problem: deprecated use and reference of zmq_term" 2016-02-01 22:41:51 +01:00
Constantin Rack
a26bb743d4 Problem: docs are still referring to deprecated zmq_term
Solution: Replace with `zmq_ctx_term`
2016-02-01 22:00:35 +01:00
Pieter Hintjens
6f94af8cca Problem: various errors in build scripts
- zmq_utils.h was removed
- udp_address.cpp and udp_engine.cpp were added

Solution: patch all affected build scripts
2016-02-01 11:18:08 +01:00
sunkin351
9b01ae826e Restoring zmq_utils.h from previous version
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.
2016-01-31 20:19:04 -08:00
sunkin351
a464eec7df Added "udp_address" and "udp_engine" to enable windows build
Altered VS2015 files to enable building of the library.
2016-01-31 17:54:31 -08:00
Pieter Hintjens
2ae4c55bf5 Problem: radio/dish class broke Windows builds
Solution: add these new classes to MSVC project files
2016-01-29 11:07:21 +01:00
Constantin Rack
a539b0c6e8 Problem: copyright year is still 2015
Solution: update to 2016
2016-01-28 15:07:31 +01:00
Benjamin Henrion
e19454e388 Problem: OpenWRT Makefile still uses tarballs, now using GIT HEAD master 2016-01-15 11:19:24 +01:00
Pieter Hintjens
055995e535 Problem: builds directory contains packaging scripts
Specifically, the RedHat tools.

Solution: move this into packaging/
2016-01-15 10:25:38 +01:00
Pieter Hintjens
d8d9ee3243 Problem: no support for OpenWRT
Solution: copy ZeroMQ packaging script from
https://github.com/vperron/openwrt-zmq-packages

Note: this is not usable as-such, needs fixing.
2016-01-15 10:10:06 +01:00
Pieter Hintjens
c49eef46ec Problem: Android build is too slow
Solution: use parallel make (-j 4) and don't build man pages.
2016-01-05 17:31:17 +01:00
Pieter Hintjens
6bb0cc1fd5 Problem: still one error in vcxproj files
Solution: fix and try again.

(We could start to think of using zproject to generate these build
scripts as the only difference is C/C++)
2015-12-21 18:57:31 +01:00
Pieter Hintjens
137afd5610 Problem: includes timer.cpp/hpp instead of timers.cpp/hpp
Solution: fix it.
2015-12-21 18:36:49 +01:00
Pieter Hintjens
065fbcdc8f Problem: performance tests don't link on Windows/MSVC
Solution: add Iphlpapi.lib to libraries to link against
2015-12-21 13:07:13 +01:00
Pieter Hintjens
6665bffe11 Problem: MSVC projects don't include timers.cpp/hpp
Solution: add these
2015-12-21 11:09:11 +01:00
Pieter Hintjens
627809568b Problem: on Windows, link fails on missing Iphlpapi.lib
Solution: add to project dependencies
2015-12-21 10:52:40 +01:00
Constantin Rack
33c5985eb2 Problem: build scripts don't need full git history
Solution: add `--depth 1` parameter to `git clone` commands
2015-12-19 13:17:22 +01:00