Skip to content

Draft API does not work with ZMQ #4324

@PrecisionRichard

Description

@PrecisionRichard

Issue description

I am trying to use the ZMQ_RADIO and ZMQ_DISH to test out using UDP. However, I cannot figure out how to build with the DRAFT API's It seems like it should be working but when I build I get undeclared identifier 'ZMQ_RADIO' I don't really see any documentation on how to use the draft API's so I'm not sure how to troubleshoot.

Below is the CMake command I'm using to include libzmq and build it from source.

  include(ExternalProject)
  include(FetchContent)
  option(BUILD_TESTS "" OFF)
  option(WITH_LIBSODIUM "" OFF)
  option(BUILD_SHARED "" OFF)
  option(ENABLE_DRAFTS "" ON)
  option(BUILD_STATIC "" ON)
  FetchContent_Declare(
          libzmq
          GIT_REPOSITORY https://github.com/zeromq/libzmq.git
          GIT_TAG v4.3.4
          )
  FetchContent_MakeAvailable(libzmq)
  set(ZeroMQ_LIBRARY ${ZEROMQ_LIBRARY}-static)

Environment

  • libzmq version (commit hash if unreleased): v4.3.4
  • OS: Ubuntu 21.10

Minimal test code / Steps to reproduce the issue

I am building libzmq to use in QT. When I use the above CMake command to include it the ZMQ_BUILD_DRAFT_API is not set when I build libzmq and therefore I cannot use the draft api even though ENABLE_DRAFTS was set

What's the actual result? (include assertion message & call stack if applicable)

-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Found WrapOpenGL: TRUE
-- Could NOT find XKB (missing: XKB_LIBRARY XKB_INCLUDE_DIR) (Required is at least version "0.5.0")
-- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1l")
-- Found WrapOpenSSLHeaders: /usr/include (found version "1.1.1l")
-- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
-- Detected ZMQ Version - 4.3.4
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_C11
-- Performing Test COMPILER_SUPPORTS_C11 - Success
-- Performing Test CXX_HAS_TAUT_WARNING
-- Performing Test CXX_HAS_TAUT_WARNING - Success
-- Performing Test CC_HAS_TAUT_WARNING
-- Performing Test CC_HAS_TAUT_WARNING - Success
-- Build and install draft classes and methods
-- Using radix tree implementation to manage subscriptions
-- Enable WebSocket transport
-- Found GnuTLS: /usr/lib/x86_64-linux-gnu/libgnutls.so (found suitable version "3.7.1", minimum required is "3.6.7")
-- Enable WSS transport
-- Checking for module 'libbsd'
-- Found libbsd, version 0.11.3
-- Using libbsd
-- Looking for strlcpy
-- Looking for strlcpy - not found
-- Using tweetnacl for CURVE security
-- Looking for kqueue
-- Looking for kqueue - not found
-- Looking for epoll_create
-- Looking for epoll_create - found
-- Looking for epoll_create1
-- Looking for epoll_create1 - found
-- Using polling method in I/O threads: epoll
-- Using polling method in zmq_poll(er)* API: poll
-- Using 64 bytes alignment for lock-free data structures
-- Looking for include file windows.h
-- Looking for include file windows.h - not found
-- Looking for include file condition_variable
-- Looking for include file condition_variable - found
-- Using condition_variable_t implementation: stl11
-- Looking for include file ifaddrs.h
-- Looking for include file ifaddrs.h - found
-- Looking for include file sys/uio.h
-- Looking for include file sys/uio.h - found
-- Looking for include file sys/eventfd.h
-- Looking for include file sys/eventfd.h - found
-- Checking whether EFD_CLOEXEC is supported
-- Performing Test ZMQ_HAVE_EVENTFD_CLOEXEC
-- Performing Test ZMQ_HAVE_EVENTFD_CLOEXEC - Success
-- Looking for if_nametoindex
-- Looking for if_nametoindex - found
-- Looking for SO_PEERCRED
-- Looking for SO_PEERCRED - found
-- Looking for LOCAL_PEERCRED
-- Looking for LOCAL_PEERCRED - not found
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- Looking for fork
-- Looking for fork - found
-- Looking for gethrtime
-- Looking for gethrtime - not found
-- Looking for mkdtemp
-- Looking for mkdtemp - found
-- Looking for accept4
-- Looking for accept4 - found
-- Looking for strnlen
-- Looking for strnlen - found
-- Performing Test HAVE_FLAG
-Wall
-- Performing Test HAVE_FLAG_-Wall - Failed
-- Performing Test HAVE_FLAG_-Wextra
-- Performing Test HAVE_FLAG_-Wextra - Failed
-- Performing Test HAVE_FLAG_-Wno-long-long
-- Performing Test HAVE_FLAG_-Wno-long-long - Failed
-- Performing Test HAVE_FLAG_-Wno-uninitialized
-- Performing Test HAVE_FLAG_-Wno-uninitialized - Failed
-- Performing Test HAVE_FLAG_-pedantic
-- Performing Test HAVE_FLAG_-pedantic - Failed
-- Checking whether noexcept is supported
-- Performing Test ZMQ_HAVE_NOEXCEPT
-- Performing Test ZMQ_HAVE_NOEXCEPT - Success
-- Checking whether SOCK_CLOEXEC is supported
-- Performing Test ZMQ_HAVE_SOCK_CLOEXEC
-- Performing Test ZMQ_HAVE_SOCK_CLOEXEC - Success
-- Checking whether O_CLOEXEC is supported
-- Performing Test ZMQ_HAVE_O_CLOEXEC
-- Performing Test ZMQ_HAVE_O_CLOEXEC - Success
-- Checking whether SO_BINDTODEVICE is supported
-- Performing Test ZMQ_HAVE_SO_BINDTODEVICE
-- Performing Test ZMQ_HAVE_SO_BINDTODEVICE - Success
-- Checking whether SO_KEEPALIVE is supported
-- Performing Test ZMQ_HAVE_SO_KEEPALIVE
-- Performing Test ZMQ_HAVE_SO_KEEPALIVE - Success
-- Checking whether SO_PRIORITY is supported
-- Performing Test ZMQ_HAVE_SO_PRIORITY
-- Performing Test ZMQ_HAVE_SO_PRIORITY - Success
-- Checking whether TCP_KEEPCNT is supported
-- Performing Test ZMQ_HAVE_TCP_KEEPCNT
Checking for updated license succeeded (2 licenses fetched)
-- Performing Test ZMQ_HAVE_TCP_KEEPCNT - Success
-- Checking whether TCP_KEEPIDLE is supported
-- Performing Test ZMQ_HAVE_TCP_KEEPIDLE
-- Performing Test ZMQ_HAVE_TCP_KEEPIDLE - Success
-- Checking whether TCP_KEEPINTVL is supported
-- Performing Test ZMQ_HAVE_TCP_KEEPINTVL
-- Performing Test ZMQ_HAVE_TCP_KEEPINTVL - Success
-- Checking whether TCP_KEEPALIVE is supported
-- Performing Test ZMQ_HAVE_TCP_KEEPALIVE
-- Performing Test ZMQ_HAVE_TCP_KEEPALIVE - Failed
-- Checking whether TIPC is supported
-- Performing Test ZMQ_HAVE_TIPC
-- Performing Test ZMQ_HAVE_TIPC - Success
-- Checking pthread_setname signature
-- Performing Test ZMQ_HAVE_PTHREAD_SETNAME_1
-- Performing Test ZMQ_HAVE_PTHREAD_SETNAME_1 - Failed
-- Performing Test ZMQ_HAVE_PTHREAD_SETNAME_2
-- Performing Test ZMQ_HAVE_PTHREAD_SETNAME_2 - Success
-- Performing Test ZMQ_HAVE_PTHREAD_SETNAME_3
-- Performing Test ZMQ_HAVE_PTHREAD_SETNAME_3 - Failed
-- Performing Test ZMQ_HAVE_PTHREAD_SET_NAME
-- Performing Test ZMQ_HAVE_PTHREAD_SET_NAME - Failed
-- Checking pthread_setaffinity signature
-- Performing Test ZMQ_HAVE_PTHREAD_SET_AFFINITY
-- Performing Test ZMQ_HAVE_PTHREAD_SET_AFFINITY - Success
-- Checking whether getrandom is supported
-- Performing Test ZMQ_HAVE_GETRANDOM
-- Performing Test ZMQ_HAVE_GETRANDOM - Success
-- Could NOT find AsciiDoc (missing: ASCIIDOC_EXECUTABLE)
-- Could NOT find XKB (missing: XKB_LIBRARY XKB_INCLUDE_DIR) (Required is at least version "0.5.0")
-- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
-- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
-- Configuring done
-- Generating done

When I build I get undeclared identifier 'ZMQ_RADIO'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions