Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Installation warnings on OSX #580

Open
pronebird opened this issue Dec 2, 2016 · 3 comments
Open

Installation warnings on OSX #580

pronebird opened this issue Dec 2, 2016 · 3 comments

Comments

@pronebird
Copy link

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

➜ zeromq-node npm install zmq --save

zmq@2.15.3 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'

@haysclark
Copy link

haysclark commented Feb 22, 2017

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. ¯\(ツ)

@pronebird
Copy link
Author

pronebird commented Feb 22, 2017

@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

@PuzoLiang
Copy link

PuzoLiang commented Jul 27, 2019

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants