Unlike version 3, version 4 does not make substantial changes to the spead2 API, although it does drop deprecated functionality. It replaces the build system and increases the minimum version requirements, which may have implications for how you install, link to or use spead2.
The following deprecated functionality has been removed:
Functionality | Replacement |
---|---|
:cpp!recv::udp_ibv_reader::default_buffer_size |
:cpprecv::udp_ibv_config::default_buffer_size |
:cpp!recv::udp_ibv_reader::default_max_poll |
:cpprecv::udp_ibv_config::default_max_poll |
:cpp!send::udp_ibv_stream::default_buffer_size |
:cppsend::udp_ibv_config::default_buffer_size |
:cpp!send::udp_ibv_stream::default_max_poll |
:cppsend::udp_ibv_config::default_max_poll |
:cpprecv::udp_ibv_reader constructors that do not take a :cpprecv::udp_ibv_config |
constructor that takes a :cpprecv::udp_ibv_config |
:cppsend::udp_ibv_stream constructor that does not take a :cppsend::udp_ibv_config |
constructor that takes a :cppsend::udp_ibv_config |
:cppsend::inproc_stream constructor taking a single queue |
pass a vector containing a single queue |
:cpp!send::inproc_stream::get_queue |
:cppsend::inproc_stream::get_queues [0] |
:cppsend::tcp_stream and :cppsend::udp_stream constructors taking a single endpoint |
pass a vector containing a single endpoint |
:py!recv.Stream.DEFAULT_UDP_IBV_BUFFER_SIZE |
:py.recv.UdpIbvConfig.DEFAULT_BUFFER_SIZE |
---|---|
:py!recv.Stream.DEFAULT_UDP_IBV_MAX_SIZE |
:py.recv.UdpIbvConfig.DEFAULT_MAX_SIZE |
:py!recv.Stream.DEFAULT_UDP_IBV_MAX_POLL |
:py.recv.UdpIbvConfig.DEFAULT_MAX_POLL |
:py!send.UdpIbvStream.DEFAULT_BUFFER_SIZE |
:py.send.UdpIbvConfig.DEFAULT_BUFFER_SIZE |
:py!send.UdpIbvStream.DEFAULT_MAX_POLL |
:py.send.UdpIbvConfig.DEFAULT_MAX_POLL |
:py.recv.Stream.add_udp_ibv_reader overload that does not take a :py.recv.UdpIbvConfig |
Pass a :py.recv.UdpIbvConfig |
:py.send.UdpIbvStream constructors that do not take a :py.send.UdpIbvConfig |
Pass a :py.send.UdpIbvConfig |
:py.send.InprocStream constructor taking a single queue |
Pass a list containing a single queue |
:py!send.InprocStream.queue |
:py.send.InprocStream.queues [0] |
:py.send.TcpStream and :py.send.UdpStream constructors taking a single hostname and port |
Pass a list containing a single ({host}, {port}) tuple |
The autotools build system has been replaced by Meson. This mainly affects C++ users, as for Python this is hidden behind the Python packaging interface. Refer to the Introduction <introduction>
for installation instructions.
The old build system had a number of options to adjust the build. The table below shows corresponding Meson options:
autotools | meson |
---|---|
--enable-debug-symbols |
debug=true or buildtype=... |
--enable-debug-log |
max_log_level=debug |
--enable-coverage |
b_coverage=true |
--disable-optimized |
optimization=0 or buildtype=debug |
--enable-lto |
b_lto=true |
--enable-shared |
default_library=both |
--without-program-options |
tools=disabled |
--without-ibv |
ibv=disabled |
--without-mlx5dv |
mlx5dv=disabled |
--without-ibv-hw-rate-limit |
ibv_hw_rate_limit=disabled |
--without-pcap |
pcap=disabled |
--without-cap |
cap=disabled |
--without-recvmmsg |
recvmmsg=disabled |
--without-sendmmsg |
sendmmsg=disabled |
--without-eventfd |
eventfd=disabled |
--without-posix-semaphores |
posix_semaphores=disabled |
--without-pthread_setaffinity_np |
pthread_setaffinity_np=disabled |
--without-fmv |
fmv=disabled |
--without-movntdq |
sse2_stream=disabled |
--without-cuda |
cuda=disabled |
--without-gdrapi |
gdrapi=disabled |
Link-time optimization no longer requires intervention to select suitable versions of ar
and ranlib
; Meson takes care of it.
The codebase now uses C++17, whereas older versions used C++11. This might require a newer C++ compiler. See the Introduction <introduction>
for minimum compiler versions.
Additionally, when compiling against the C++ API, you may need to pass compiler arguments to select at least C++17 (e.g. !--std=c++17
). GCC 11+ and Clang 16+ support C++17 without a compiler flag, but keep in mind that your users might use older compilers.
Boost 1.69+ is now required: from this release, boost_system is a header-only library. You no longer need to link against any Boost libraries when linking against spead2.
The detection logic for libpcap has changed. It used to first try pkg-config
, then fall back to testing compilation. It now tries pkg-config
first and falls back to pcap-config
. If neither of those methods works, you may need to upgrade your pcap library.
In older versions of spead2, some of the code was generated and included in the release tarballs. If you used a release, you would be unaware of this, but trying to build directly from git would require you to run a bootstrap.sh
script.
Meson doesn't have good support for including generated code into releases, so these generated files are no longer included in the releases, and they are instead created as part of the build. This requires Python, with the jinja2
, pycparser
and packaging
packaging installed.
An advantage of this approach is that it is now possible to directly build from a git checkout without any preparatory steps.
When building the Python bindings from source, it was previously only possible to adjust the build-time configuration by editing source files. With the new build system, it's now possible to pass options on the command line.
Meson-python doesn't support editable installs with build isolation. To make an editable install, use pip install --no-build-isolation -e .
.