zeromq.node icon indicating copy to clipboard operation
zeromq.node copied to clipboard

Installation warnings on OSX

Open pronebird opened this issue 9 years ago • 3 comments

Hey, that's what I get during installation of zmq. Seems like some of scripts are old.

➜ zeromq-node npm install zmq --save

[email protected] install /Users/pronebird/Downloads/zeromq-node/node_modules/zmq node-gyp rebuild

CXX(target) Release/obj.target/zmq/binding.o In file included from ../binding.cc:29: /usr/local/Cellar/zeromq/4.2.0/include/zmq_utils.h:40:32: warning: unknown warning group '-Wcpp', ignored [-Wunknown-pragmas] #pragma GCC diagnostic warning "-Wcpp" ^ /usr/local/Cellar/zeromq/4.2.0/include/zmq_utils.h:41:32: warning: unknown warning group '-Werror', ignored [-Wunknown-pragmas] #pragma GCC diagnostic ignored "-Werror" ^ /usr/local/Cellar/zeromq/4.2.0/include/zmq_utils.h:44:9: warning: Warning: zmq_utils.h is deprecated. All its functionality is provided by zmq.h. [-W#pragma-messages] #pragma message("Warning: zmq_utils.h is deprecated. All its functionality is provided by zmq.h.") ^ 3 warnings generated. SOLINK_MODULE(target) Release/zmq.node clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 ld: warning: directory not found for option '-L/opt/local/lib'

pronebird avatar Dec 02 '16 11:12 pronebird

I'm not a C++ guru, but all 3 of these warning stem from zmq_utils.h being included here in bind.cc. It looks like this deprecation warning was added in version 4.2.0 of libzmq: commit.

I am not sure if it's possible to do any pre-processor magic in bind.cc to only include zmq_utils.h if the version of libzmq is 4.2.0 or greater. ¯\(ツ)

haysclark avatar Feb 22 '17 03:02 haysclark

@haysclark thanks for investigating this!

zmq_utils.h functionality has been moved to zmq.h since 4.2.0, therefore zmq_utils.h has to be included only when building against zmq < 4.2.0

Something like that should work:

// zmq 4.2.0 deprecates the use of zmq_utils.h
#if ZMQ_VERSION < ZMQ_MAKE_VERSION(4,2,0)
#include <zmq_utils.h>
#endif

pronebird avatar Feb 22 '17 10:02 pronebird

@haysclark thanks for investigating this!

zmq_utils.h functionality has been moved to zmq.h since 4.2.0, therefore zmq_utils.h has to be included only when building against zmq < 4.2.0

Something like that should work:

// zmq 4.2.0 deprecates the use of zmq_utils.h
#if ZMQ_VERSION < ZMQ_MAKE_VERSION(4,2,0)
#include <zmq_utils.h>
#endif

which file fill content like you last lines of comments? I add your tips codes to zmq.h and zmq_util.h repectly respectively, but it doesn't work.

PuzoLiang avatar Jul 27 '19 23:07 PuzoLiang