Closed nnicandro closed 5 years ago
This is awesome. For my system, I have to run ./configure
for libzmq with the flag --with-poller=epoll
. I've hacked that into the Makefile, but I'm honestly not sure why the default of --with-poller=auto
isn't working on my system nor what the best way of allowing end-users to specify arbitrary ./configure
flags would be. Maybe that's a use-case not worth supporting and users who need it just need to build their own libzmq?
It would make sense to be able to pass arbitrary configure options, both for the poller interface issue and since libzmq
has a lot of configure options that may be useful other than the default ones emacs-zmq
uses. But I think if one were going to supply other configure options they would just roll their own libzmq
and link it with ZMQ_CFLAGS
and ZMQ_LIBS
.
I don't know what the best way to supply arbitrary configure options either. Maybe just add an option ZMQ_CONFIGURE_OPTS
in the Makefile which overrides the defaults or ZMQ_EXTRA_CONFIGURE_OPTS
which just adds to the defaults? I'm leaning more towards the latter.
Since there is the option to set ZMQ_CFLAGS
and ZMQ_LIBS
or just add in the configure flag directly in the Makefile. I think we should just leave it as is for right now and revisit the issue if there are more problems with configuring libzmq
on more systems.
Just reporting that this change is working wonderfully in the many systems I've been checking. It's indeed awesome.
Actually this messed up my ability to use zmq installed elsewhere. Something isn't quite right in the Makefile:
adam: [emacs-zmq] $ export ZMQ_CFLAGS="-I/usr/local/include"
adam: [emacs-zmq] $ export ZMQ_LIBS="-L/usr/local/lib"
adam: [emacs-zmq] $ make
ZMQ_LIBS = -L/usr/local/lib
ZMQ_CFLAGS = -I/usr/local/include
Makefile:53: *** One of ZMQ_LIBS or ZMQ_CFLAGS not set. Stop.
If I just remove that check from the Makefile, I get:
adam: [emacs-zmq] $ make
cd src && ./configure PKG_CONFIG_PATH=/home/adam/.dotfiles/emacs-packages/emacs-zmq/libzmq/build/v4.3.1/lib/pkgconfig: \
--libdir=/home/adam/.dotfiles/emacs-packages/emacs-zmq/src
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libzmq... yes
configure: error: ZMQ not built with draft API.
make: *** [Makefile:50: src/Makefile] Error 1
And if I go ahead and add the flag that it's looking for to ZMQ_CFLAGS
, I get a compilation error:
adam: [emacs-zmq] $ ZMQ_CFLAGS="$ZMQ_CFLAGS:-DZMQ_BUILD_DRAFT_API=1" make
cd src && ./configure PKG_CONFIG_PATH=/home/adam/.dotfiles/emacs-packages/emacs-zmq/libzmq/build/v4.3.1/lib/pkgconfig: \
--libdir=/home/adam/.dotfiles/emacs-packages/emacs-zmq/src
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libzmq... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for libtool-sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
config.status: executing libtool commands
make CPPFLAGS=-DEZMQ_DEBUG=0 -C src install
make[1]: Entering directory '/home/adam/.dotfiles/emacs-packages/emacs-zmq/src'
/bin/sh ./libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\"emacs-zmq\" -DPACKAGE_TARNAME=\"emacs-zmq\" -DPACKAGE_VERSION=\"0.1\" -DPACKAGE_STRING=\"emacs-zmq\ 0.1\" -DPACKAGE_BUGREPORT=\"nathanielnicandro@gmail.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"emacs-zmq\" -DVERSION=\"0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -DEZMQ_DEBUG=0 -I/usr/local/include:-DZMQ_BUILD_DRAFT_API=1 -pthread -O3 -g -O2 -MT emacs_zmq_la-constants.lo -MD -MP -MF .deps/emacs_zmq_la-constants.Tpo -c -o emacs_zmq_la-constants.lo `test -f 'constants.c' || echo './'`constants.c
libtool: compile: gcc -DPACKAGE_NAME=\"emacs-zmq\" -DPACKAGE_TARNAME=\"emacs-zmq\" -DPACKAGE_VERSION=\"0.1\" "-DPACKAGE_STRING=\"emacs-zmq 0.1\"" -DPACKAGE_BUGREPORT=\"nathanielnicandro@gmail.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"emacs-zmq\" -DVERSION=\"0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -DEZMQ_DEBUG=0 -I/usr/local/include:-DZMQ_BUILD_DRAFT_API=1 -pthread -O3 -g -O2 -MT emacs_zmq_la-constants.lo -MD -MP -MF .deps/emacs_zmq_la-constants.Tpo -c constants.c -fPIC -DPIC -o .libs/emacs_zmq_la-constants.o
In file included from constants.c:1:
constants.c: In function 'ezmq_expose_constants':
constants.c:18:39: error: 'ZMQ_BINDTODEVICE' undeclared (first use in this function); did you mean 'ZMQ_SNDTIMEO'?
EZMQ_DEFCONST("zmq-BINDTODEVICE", ZMQ_BINDTODEVICE);
^~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:18:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-BINDTODEVICE", ZMQ_BINDTODEVICE);
^~~~~~~~~~~~~
constants.c:18:39: note: each undeclared identifier is reported only once for each function it appears in
EZMQ_DEFCONST("zmq-BINDTODEVICE", ZMQ_BINDTODEVICE);
^~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:18:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-BINDTODEVICE", ZMQ_BINDTODEVICE);
^~~~~~~~~~~~~
constants.c:21:33: error: 'ZMQ_CLIENT' undeclared (first use in this function); did you mean 'ZMQ_EVENTS'?
EZMQ_DEFCONST("zmq-CLIENT", ZMQ_CLIENT);
^~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:21:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-CLIENT", ZMQ_CLIENT);
^~~~~~~~~~~~~
constants.c:34:32: error: 'ZMQ_DGRAM' undeclared (first use in this function); did you mean 'ZMQ_STREAM'?
EZMQ_DEFCONST("zmq-DGRAM", ZMQ_DGRAM);
^~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:34:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-DGRAM", ZMQ_DGRAM);
^~~~~~~~~~~~~
constants.c:35:31: error: 'ZMQ_DISH' undeclared (first use in this function); did you mean 'ZMQ_PUSH'?
EZMQ_DEFCONST("zmq-DISH", ZMQ_DISH);
^~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:35:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-DISH", ZMQ_DISH);
^~~~~~~~~~~~~
constants.c:48:54: error: 'ZMQ_EVENT_HANDSHAKE_FAILED_AUTH' undeclared (first use in this function); did you mean 'ZMQ_EVENT_CLOSE_FAILED'?
EZMQ_DEFCONST("zmq-EVENT-HANDSHAKE-FAILED-AUTH", ZMQ_EVENT_HANDSHAKE_FAILED_AUTH);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:48:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-EVENT-HANDSHAKE-FAILED-AUTH", ZMQ_EVENT_HANDSHAKE_FAILED_AUTH);
^~~~~~~~~~~~~
constants.c:49:59: error: 'ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL' undeclared (first use in this function); did you mean 'ZMQ_EVENT_CLOSE_FAILED'?
EZMQ_DEFCONST("zmq-EVENT-HANDSHAKE-FAILED-NO-DETAIL", ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:49:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-EVENT-HANDSHAKE-FAILED-NO-DETAIL", ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL);
^~~~~~~~~~~~~
constants.c:50:58: error: 'ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL' undeclared (first use in this function); did you mean 'ZMQ_EVENT_CLOSE_FAILED'?
EZMQ_DEFCONST("zmq-EVENT-HANDSHAKE-FAILED-PROTOCOL", ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:50:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-EVENT-HANDSHAKE-FAILED-PROTOCOL", ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL);
^~~~~~~~~~~~~
constants.c:51:52: error: 'ZMQ_EVENT_HANDSHAKE_SUCCEEDED' undeclared (first use in this function); did you mean 'ZMQ_EVENT_ACCEPTED'?
EZMQ_DEFCONST("zmq-EVENT-HANDSHAKE-SUCCEEDED", ZMQ_EVENT_HANDSHAKE_SUCCEEDED);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:51:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-EVENT-HANDSHAKE-SUCCEEDED", ZMQ_EVENT_HANDSHAKE_SUCCEEDED);
^~~~~~~~~~~~~
constants.c:57:33: error: 'ZMQ_GATHER' undeclared (first use in this function); did you mean 'ZMQ_RATE'?
EZMQ_DEFCONST("zmq-GATHER", ZMQ_GATHER);
^~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:57:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-GATHER", ZMQ_GATHER);
^~~~~~~~~~~~~
constants.c:60:46: error: 'ZMQ_GSSAPI_NT_HOSTBASED' undeclared (first use in this function); did you mean 'ZMQ_GSSAPI_SERVER'?
EZMQ_DEFCONST("zmq-GSSAPI-NT-HOSTBASED", ZMQ_GSSAPI_NT_HOSTBASED);
^~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:60:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-GSSAPI-NT-HOSTBASED", ZMQ_GSSAPI_NT_HOSTBASED);
^~~~~~~~~~~~~
constants.c:61:51: error: 'ZMQ_GSSAPI_NT_KRB5_PRINCIPAL' undeclared (first use in this function); did you mean 'ZMQ_GSSAPI_SERVICE_PRINCIPAL'?
EZMQ_DEFCONST("zmq-GSSAPI-NT-KRB5-PRINCIPAL", ZMQ_GSSAPI_NT_KRB5_PRINCIPAL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:61:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-GSSAPI-NT-KRB5-PRINCIPAL", ZMQ_GSSAPI_NT_KRB5_PRINCIPAL);
^~~~~~~~~~~~~
constants.c:62:46: error: 'ZMQ_GSSAPI_NT_USER_NAME' undeclared (first use in this function); did you mean 'ZMQ_PLAIN_USERNAME'?
EZMQ_DEFCONST("zmq-GSSAPI-NT-USER-NAME", ZMQ_GSSAPI_NT_USER_NAME);
^~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:62:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-GSSAPI-NT-USER-NAME", ZMQ_GSSAPI_NT_USER_NAME);
^~~~~~~~~~~~~
constants.c:65:52: error: 'ZMQ_GSSAPI_PRINCIPAL_NAMETYPE' undeclared (first use in this function); did you mean 'ZMQ_GSSAPI_PRINCIPAL'?
EZMQ_DEFCONST("zmq-GSSAPI-PRINCIPAL-NAMETYPE", ZMQ_GSSAPI_PRINCIPAL_NAMETYPE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:65:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-GSSAPI-PRINCIPAL-NAMETYPE", ZMQ_GSSAPI_PRINCIPAL_NAMETYPE);
^~~~~~~~~~~~~
constants.c:68:60: error: 'ZMQ_GSSAPI_SERVICE_PRINCIPAL_NAMETYPE' undeclared (first use in this function); did you mean 'ZMQ_GSSAPI_SERVICE_PRINCIPAL'?
EZMQ_DEFCONST("zmq-GSSAPI-SERVICE-PRINCIPAL-NAMETYPE", ZMQ_GSSAPI_SERVICE_PRINCIPAL_NAMETYPE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:68:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-GSSAPI-SERVICE-PRINCIPAL-NAMETYPE", ZMQ_GSSAPI_SERVICE_PRINCIPAL_NAMETYPE);
^~~~~~~~~~~~~
constants.c:101:37: error: 'ZMQ_MSG_T_SIZE' undeclared (first use in this function); did you mean 'ZMQ_MAXMSGSIZE'?
EZMQ_DEFCONST("zmq-MSG-T-SIZE", ZMQ_MSG_T_SIZE);
^~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:101:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-MSG-T-SIZE", ZMQ_MSG_T_SIZE);
^~~~~~~~~~~~~
constants.c:117:60: error: 'ZMQ_PROTOCOL_ERROR_ZAP_BAD_REQUEST_ID' undeclared (first use in this function)
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZAP-BAD-REQUEST-ID", ZMQ_PROTOCOL_ERROR_ZAP_BAD_REQUEST_ID);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:117:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZAP-BAD-REQUEST-ID", ZMQ_PROTOCOL_ERROR_ZAP_BAD_REQUEST_ID);
^~~~~~~~~~~~~
constants.c:118:62: error: 'ZMQ_PROTOCOL_ERROR_ZAP_INVALID_METADATA' undeclared (first use in this function)
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZAP-INVALID-METADATA", ZMQ_PROTOCOL_ERROR_ZAP_INVALID_METADATA);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:118:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZAP-INVALID-METADATA", ZMQ_PROTOCOL_ERROR_ZAP_INVALID_METADATA);
^~~~~~~~~~~~~
constants.c:119:65: error: 'ZMQ_PROTOCOL_ERROR_ZAP_INVALID_STATUS_CODE' undeclared (first use in this function)
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZAP-INVALID-STATUS-CODE", ZMQ_PROTOCOL_ERROR_ZAP_INVALID_STATUS_CODE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:119:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZAP-INVALID-STATUS-CODE", ZMQ_PROTOCOL_ERROR_ZAP_INVALID_STATUS_CODE);
^~~~~~~~~~~~~
constants.c:120:61: error: 'ZMQ_PROTOCOL_ERROR_ZAP_MALFORMED_REPLY' undeclared (first use in this function)
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZAP-MALFORMED-REPLY", ZMQ_PROTOCOL_ERROR_ZAP_MALFORMED_REPLY);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:120:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZAP-MALFORMED-REPLY", ZMQ_PROTOCOL_ERROR_ZAP_MALFORMED_REPLY);
^~~~~~~~~~~~~
constants.c:121:57: error: 'ZMQ_PROTOCOL_ERROR_ZAP_UNSPECIFIED' undeclared (first use in this function)
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZAP-UNSPECIFIED", ZMQ_PROTOCOL_ERROR_ZAP_UNSPECIFIED);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:121:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZAP-UNSPECIFIED", ZMQ_PROTOCOL_ERROR_ZAP_UNSPECIFIED);
^~~~~~~~~~~~~
constants.c:122:60: error: 'ZMQ_PROTOCOL_ERROR_ZMTP_CRYPTOGRAPHIC' undeclared (first use in this function)
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-CRYPTOGRAPHIC", ZMQ_PROTOCOL_ERROR_ZMTP_CRYPTOGRAPHIC);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:122:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-CRYPTOGRAPHIC", ZMQ_PROTOCOL_ERROR_ZMTP_CRYPTOGRAPHIC);
^~~~~~~~~~~~~
constants.c:123:63: error: 'ZMQ_PROTOCOL_ERROR_ZMTP_INVALID_METADATA' undeclared (first use in this function)
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-INVALID-METADATA", ZMQ_PROTOCOL_ERROR_ZMTP_INVALID_METADATA);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:123:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-INVALID-METADATA", ZMQ_PROTOCOL_ERROR_ZMTP_INVALID_METADATA);
^~~~~~~~~~~~~
constants.c:124:63: error: 'ZMQ_PROTOCOL_ERROR_ZMTP_INVALID_SEQUENCE' undeclared (first use in this function)
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-INVALID-SEQUENCE", ZMQ_PROTOCOL_ERROR_ZMTP_INVALID_SEQUENCE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:124:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-INVALID-SEQUENCE", ZMQ_PROTOCOL_ERROR_ZMTP_INVALID_SEQUENCE);
^~~~~~~~~~~~~
constants.c:125:59: error: 'ZMQ_PROTOCOL_ERROR_ZMTP_KEY_EXCHANGE' undeclared (first use in this function)
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-KEY-EXCHANGE", ZMQ_PROTOCOL_ERROR_ZMTP_KEY_EXCHANGE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:125:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-KEY-EXCHANGE", ZMQ_PROTOCOL_ERROR_ZMTP_KEY_EXCHANGE);
^~~~~~~~~~~~~
constants.c:126:70: error: 'ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_ERROR' undeclared (first use in this function)
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-MALFORMED-COMMAND-ERROR", ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_ERROR);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:126:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-MALFORMED-COMMAND-ERROR", ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_ERROR);
^~~~~~~~~~~~~
constants.c:127:70: error: 'ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_HELLO' undeclared (first use in this function)
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-MALFORMED-COMMAND-HELLO", ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_HELLO);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:127:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-MALFORMED-COMMAND-HELLO", ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_HELLO);
^~~~~~~~~~~~~
constants.c:128:73: error: 'ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_INITIATE' undeclared (first use in this function)
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-MALFORMED-COMMAND-INITIATE", ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_INITIATE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:128:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-MALFORMED-COMMAND-INITIATE", ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_INITIATE);
^~~~~~~~~~~~~
constants.c:129:72: error: 'ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_MESSAGE' undeclared (first use in this function)
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-MALFORMED-COMMAND-MESSAGE", ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_MESSAGE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:129:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-MALFORMED-COMMAND-MESSAGE", ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_MESSAGE);
^~~~~~~~~~~~~
constants.c:130:70: error: 'ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_READY' undeclared (first use in this function)
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-MALFORMED-COMMAND-READY", ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_READY);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:130:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-MALFORMED-COMMAND-READY", ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_READY);
^~~~~~~~~~~~~
constants.c:131:76: error: 'ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_UNSPECIFIED' undeclared (first use in this function)
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-MALFORMED-COMMAND-UNSPECIFIED", ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_UNSPECIFIED);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:131:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-MALFORMED-COMMAND-UNSPECIFIED", ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_UNSPECIFIED);
^~~~~~~~~~~~~
constants.c:132:72: error: 'ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_WELCOME' undeclared (first use in this function)
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-MALFORMED-COMMAND-WELCOME", ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_WELCOME);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:132:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-MALFORMED-COMMAND-WELCOME", ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_WELCOME);
^~~~~~~~~~~~~
constants.c:133:65: error: 'ZMQ_PROTOCOL_ERROR_ZMTP_MECHANISM_MISMATCH' undeclared (first use in this function)
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-MECHANISM-MISMATCH", ZMQ_PROTOCOL_ERROR_ZMTP_MECHANISM_MISMATCH);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:133:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-MECHANISM-MISMATCH", ZMQ_PROTOCOL_ERROR_ZMTP_MECHANISM_MISMATCH);
^~~~~~~~~~~~~
constants.c:134:65: error: 'ZMQ_PROTOCOL_ERROR_ZMTP_UNEXPECTED_COMMAND' undeclared (first use in this function)
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-UNEXPECTED-COMMAND", ZMQ_PROTOCOL_ERROR_ZMTP_UNEXPECTED_COMMAND);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:134:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-UNEXPECTED-COMMAND", ZMQ_PROTOCOL_ERROR_ZMTP_UNEXPECTED_COMMAND);
^~~~~~~~~~~~~
constants.c:135:58: error: 'ZMQ_PROTOCOL_ERROR_ZMTP_UNSPECIFIED' undeclared (first use in this function)
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-UNSPECIFIED", ZMQ_PROTOCOL_ERROR_ZMTP_UNSPECIFIED);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:135:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-PROTOCOL-ERROR-ZMTP-UNSPECIFIED", ZMQ_PROTOCOL_ERROR_ZMTP_UNSPECIFIED);
^~~~~~~~~~~~~
constants.c:140:32: error: 'ZMQ_RADIO' undeclared (first use in this function); did you mean 'ZMQ_RATE'?
EZMQ_DEFCONST("zmq-RADIO", ZMQ_RADIO);
^~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:140:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-RADIO", ZMQ_RADIO);
^~~~~~~~~~~~~
constants.c:159:34: error: 'ZMQ_SCATTER' undeclared (first use in this function); did you mean 'ZMQ_RATE'?
EZMQ_DEFCONST("zmq-SCATTER", ZMQ_SCATTER);
^~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:159:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-SCATTER", ZMQ_SCATTER);
^~~~~~~~~~~~~
constants.c:160:33: error: 'ZMQ_SERVER' undeclared (first use in this function); did you mean 'ZMQ_CURVE'?
EZMQ_DEFCONST("zmq-SERVER", ZMQ_SERVER);
^~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:160:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-SERVER", ZMQ_SERVER);
^~~~~~~~~~~~~
constants.c:180:50: error: 'ZMQ_THREAD_AFFINITY_CPU_ADD' undeclared (first use in this function); did you mean 'ZMQ_THREAD_PRIORITY_DFLT'?
EZMQ_DEFCONST("zmq-THREAD-AFFINITY-CPU-ADD", ZMQ_THREAD_AFFINITY_CPU_ADD);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:180:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-THREAD-AFFINITY-CPU-ADD", ZMQ_THREAD_AFFINITY_CPU_ADD);
^~~~~~~~~~~~~
constants.c:181:53: error: 'ZMQ_THREAD_AFFINITY_CPU_REMOVE' undeclared (first use in this function); did you mean 'ZMQ_THREAD_PRIORITY_DFLT'?
EZMQ_DEFCONST("zmq-THREAD-AFFINITY-CPU-REMOVE", ZMQ_THREAD_AFFINITY_CPU_REMOVE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:181:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-THREAD-AFFINITY-CPU-REMOVE", ZMQ_THREAD_AFFINITY_CPU_REMOVE);
^~~~~~~~~~~~~
constants.c:182:45: error: 'ZMQ_THREAD_NAME_PREFIX' undeclared (first use in this function); did you mean 'ZMQ_THREAD_SAFE'?
EZMQ_DEFCONST("zmq-THREAD-NAME-PREFIX", ZMQ_THREAD_NAME_PREFIX);
^~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:182:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-THREAD-NAME-PREFIX", ZMQ_THREAD_NAME_PREFIX);
^~~~~~~~~~~~~
constants.c:206:45: error: 'ZMQ_ZAP_ENFORCE_DOMAIN' undeclared (first use in this function); did you mean 'ZMQ_ZAP_DOMAIN'?
EZMQ_DEFCONST("zmq-ZAP-ENFORCE-DOMAIN", ZMQ_ZAP_ENFORCE_DOMAIN);
^~~~~~~~~~~~~~~~~~~~~~
core.h:40:40: note: in definition of macro 'INT'
#define INT(i) env->make_integer(env, (i))
^
constants.c:206:5: note: in expansion of macro 'EZMQ_DEFCONST'
EZMQ_DEFCONST("zmq-ZAP-ENFORCE-DOMAIN", ZMQ_ZAP_ENFORCE_DOMAIN);
^~~~~~~~~~~~~
make[1]: *** [Makefile:503: emacs_zmq_la-constants.lo] Error 1
make[1]: Leaving directory '/home/adam/.dotfiles/emacs-packages/emacs-zmq/src'
make: *** [Makefile:46: lib] Error 2
Sorry if the fix for all of this is obvious, but my knowledge of both C and C build systems is weak to nonexistent. Running the same command (ZMQ_CFLAGS="$ZMQ_CFLAGS:DZMQ_BUILD_DRAFT_API=1
) is successful before this PR at 69645d8.
ZMQ_CFLAGS
should be passed like ZMQ_CFLAGS="$ZMQ_CFLAGS -DZMQ_BUILD_DRAFT_API=1"
without the :
.
For the One of ZMQ_LIBS or ZMQ_CFLAGS not set
error, thanks for catching that. My mistake. I simplified it from something I had previously, but it looks like it wasn't a complete refactor.
Fixes #1