From b08b180854eddddf32fca846a6e8923a54f13372 Mon Sep 17 00:00:00 2001 From: Leo Parente <23251360+leoparente@users.noreply.github.com> Date: Fri, 19 Jun 2026 14:58:30 -0300 Subject: [PATCH 1/8] chore(deps): upgrade conan dependencies Bump: - catch2 3.14.0 -> 3.15.1 - libpcap 1.10.5 -> 1.10.6 - npcap 1.70 -> 1.86 (Windows) - opentelemetry-cpp 1.24.0 -> 1.26.0 - spdlog 1.15.0 -> 1.17.0 - libcurl 8.19.0 -> 8.20.0 Drop the explicit fmt/10.2.1 pin; fmt is now pulled transitively via spdlog (fmt/12.x). protobuf is intentionally left at 6.33.5: opentelemetry-cpp/1.26.0 requires protobuf<7, so a bump to 7.x is not currently viable. Co-Authored-By: Claude Opus 4.8 (1M context) --- conanfile.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/conanfile.py b/conanfile.py index c87f24cbc..36527e29d 100644 --- a/conanfile.py +++ b/conanfile.py @@ -7,7 +7,7 @@ class Pktvisor(ConanFile): generators = "CMakeToolchain", "CMakeDeps" def requirements(self): - self.requires("catch2/3.14.0") + self.requires("catch2/3.15.1") self.requires("cpp-httplib/0.18.3") self.requires("docopt.cpp/0.6.3") self.requires("fast-cpp-csv-parser/cci.20240102") @@ -16,19 +16,19 @@ def requirements(self): self.requires("nlohmann_json/3.11.3") self.requires("openssl/3.6.2") if self.settings.os != "Windows": - self.requires("libpcap/1.10.5", force=True) + self.requires("libpcap/1.10.6", force=True) else: - self.requires("npcap/1.70") - self.requires("opentelemetry-cpp/1.24.0") + self.requires("npcap/1.86") + self.requires("opentelemetry-cpp/1.26.0") self.requires("pcapplusplus/25.05") self.requires("protobuf/6.33.5") self.requires("sigslot/1.2.3") - self.requires("fmt/10.2.1", force=True) - self.requires("spdlog/1.15.0") + #self.requires("fmt/10.2.1", force=True) + self.requires("spdlog/1.17.0") self.requires("uvw/3.4.0") self.requires("yaml-cpp/0.8.0") self.requires("robin-hood-hashing/3.11.5") - self.requires("libcurl/8.19.0") + self.requires("libcurl/8.20.0") if ( "libc" not in self.settings.compiler.fields or self.settings.compiler.libc != "musl" From f4dd0cc4a810db52758d0894e39cc4b25d8c7a0b Mon Sep 17 00:00:00 2001 From: Leo Parente <23251360+leoparente@users.noreply.github.com> Date: Fri, 19 Jun 2026 15:20:38 -0300 Subject: [PATCH 2/8] chore(deps): force npcap/1.86 override on Windows Mirror the libpcap force=True override for the Windows npcap requirement so the pinned version wins over any transitive constraint. Co-Authored-By: Claude Opus 4.8 (1M context) --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 36527e29d..331d067f3 100644 --- a/conanfile.py +++ b/conanfile.py @@ -18,7 +18,7 @@ def requirements(self): if self.settings.os != "Windows": self.requires("libpcap/1.10.6", force=True) else: - self.requires("npcap/1.86") + self.requires("npcap/1.86", force=True) self.requires("opentelemetry-cpp/1.26.0") self.requires("pcapplusplus/25.05") self.requires("protobuf/6.33.5") From 6af854d24af48837982abf338daacf7a503c5d98 Mon Sep 17 00:00:00 2001 From: Leo Parente <23251360+leoparente@users.noreply.github.com> Date: Fri, 19 Jun 2026 15:20:38 -0300 Subject: [PATCH 3/8] fix(build): define OPENTELEMETRY_PROTO_API for opentelemetry-cpp 1.26.0 opentelemetry-cpp 1.26.0 generates its protobuf headers with `protoc --cpp_out=dllexport_decl=OPENTELEMETRY_PROTO_API`. For a static build the macro must expand to nothing. Upstream defines it on the proto CMake target, but the Conan recipe does not propagate that definition to consumers, so the generated *.pb.h fail to compile in pktvisor (the macro is parsed as a stray type name, cascading into bogus protobuf errors). The generated headers are included from several targets (visor-core, handler unit tests, visor_test helpers), so define the macro globally. Co-Authored-By: Claude Opus 4.8 (1M context) --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 52bbab345..9d94ae5fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,6 +107,15 @@ set(VISOR_STATIC_PLUGINS) enable_testing() message(STATUS "Building pktvisor version ${CMAKE_PROJECT_VERSION_MAJOR}.${CMAKE_PROJECT_VERSION_MINOR}.${CMAKE_PROJECT_VERSION_PATCH}${VISOR_PRERELEASE}") + +# opentelemetry-cpp (>= 1.26.0) generates its protobuf headers with +# protoc --cpp_out=dllexport_decl=OPENTELEMETRY_PROTO_API. For a static build the +# macro must expand to nothing; upstream defines it on the proto target, but the +# Conan recipe does not propagate that definition to consumers. The generated +# *.pb.h are included from several targets (visor-core, handler tests, visor_test +# helpers), so define it globally here for every consumer of those headers. +add_compile_definitions(OPENTELEMETRY_PROTO_API=) + add_subdirectory(3rd) add_subdirectory(libs) add_subdirectory(src) From 6a14d2ae743349895501ec109c3acf6832316b9c Mon Sep 17 00:00:00 2001 From: Leo Parente <23251360+leoparente@users.noreply.github.com> Date: Fri, 19 Jun 2026 15:27:33 -0300 Subject: [PATCH 4/8] fix(build): include for fmt::join (fmt 12) fmt 10 exposed fmt::join transitively, but fmt 12 no longer does, so every translation unit using fmt::join must include explicitly. Add the include to the files that use it (GeoDB, StreamHandler, InputStream, DNS v1/v2 stream handlers, NetProbe input). Co-Authored-By: Claude Opus 4.8 (1M context) --- src/GeoDB.cpp | 1 + src/InputStream.h | 1 + src/StreamHandler.h | 1 + src/handlers/dns/v1/DnsStreamHandler.cpp | 1 + src/handlers/dns/v2/DnsStreamHandler.cpp | 1 + src/inputs/netprobe/NetProbeInputStream.cpp | 1 + 6 files changed, 6 insertions(+) diff --git a/src/GeoDB.cpp b/src/GeoDB.cpp index a6e70a49f..bb7b02a1c 100644 --- a/src/GeoDB.cpp +++ b/src/GeoDB.cpp @@ -5,6 +5,7 @@ #include "GeoDB.h" #include #include +#include #include namespace visor::geo { diff --git a/src/InputStream.h b/src/InputStream.h index bd866922c..7225f32bd 100644 --- a/src/InputStream.h +++ b/src/InputStream.h @@ -7,6 +7,7 @@ #include "AbstractModule.h" #include "InputEventProxy.h" #include "StreamHandler.h" +#include namespace visor { diff --git a/src/StreamHandler.h b/src/StreamHandler.h index f74cc0c39..9198d62f9 100644 --- a/src/StreamHandler.h +++ b/src/StreamHandler.h @@ -10,6 +10,7 @@ #include "InputEventProxy.h" #include #include +#include #include #include diff --git a/src/handlers/dns/v1/DnsStreamHandler.cpp b/src/handlers/dns/v1/DnsStreamHandler.cpp index d10fbc09e..d027036b0 100644 --- a/src/handlers/dns/v1/DnsStreamHandler.cpp +++ b/src/handlers/dns/v1/DnsStreamHandler.cpp @@ -5,6 +5,7 @@ #include "DnsStreamHandler.h" #include "HandlerModulePlugin.h" #include "utils.h" +#include #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpedantic" diff --git a/src/handlers/dns/v2/DnsStreamHandler.cpp b/src/handlers/dns/v2/DnsStreamHandler.cpp index 78d4d1370..1f1337841 100644 --- a/src/handlers/dns/v2/DnsStreamHandler.cpp +++ b/src/handlers/dns/v2/DnsStreamHandler.cpp @@ -5,6 +5,7 @@ #include "DnsStreamHandler.h" #include "HandlerModulePlugin.h" #include "utils.h" +#include #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpedantic" diff --git a/src/inputs/netprobe/NetProbeInputStream.cpp b/src/inputs/netprobe/NetProbeInputStream.cpp index 629475bca..2f3b4a6be 100644 --- a/src/inputs/netprobe/NetProbeInputStream.cpp +++ b/src/inputs/netprobe/NetProbeInputStream.cpp @@ -7,6 +7,7 @@ #include "PingProbe.h" #include "TcpProbe.h" #include "ThreadName.h" +#include #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpedantic" From 6cbb65c8a3dfa4b38c6d71e31eae74fc2dc8f4ca Mon Sep 17 00:00:00 2001 From: Leo Parente <23251360+leoparente@users.noreply.github.com> Date: Fri, 19 Jun 2026 15:51:15 -0300 Subject: [PATCH 5/8] chore: shorten OPENTELEMETRY_PROTO_API comment to one line Co-Authored-By: Claude Opus 4.8 (1M context) --- CMakeLists.txt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d94ae5fc..d7e297f15 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,12 +108,7 @@ enable_testing() message(STATUS "Building pktvisor version ${CMAKE_PROJECT_VERSION_MAJOR}.${CMAKE_PROJECT_VERSION_MINOR}.${CMAKE_PROJECT_VERSION_PATCH}${VISOR_PRERELEASE}") -# opentelemetry-cpp (>= 1.26.0) generates its protobuf headers with -# protoc --cpp_out=dllexport_decl=OPENTELEMETRY_PROTO_API. For a static build the -# macro must expand to nothing; upstream defines it on the proto target, but the -# Conan recipe does not propagate that definition to consumers. The generated -# *.pb.h are included from several targets (visor-core, handler tests, visor_test -# helpers), so define it globally here for every consumer of those headers. +# opentelemetry-cpp 1.26.0 generates proto headers with dllexport_decl but the Conan recipe doesn't propagate the macro to consumers; define it empty (static build). add_compile_definitions(OPENTELEMETRY_PROTO_API=) add_subdirectory(3rd) From 631dae4c8f159507a2f2c2b39c11d3559c770fa1 Mon Sep 17 00:00:00 2001 From: Leo Parente <23251360+leoparente@users.noreply.github.com> Date: Fri, 19 Jun 2026 15:51:15 -0300 Subject: [PATCH 6/8] chore(deps): upgrade openssl 3.6.3, yaml-cpp 0.9.0; drop dead fmt comment openssl 3.6.2 -> 3.6.3 and yaml-cpp 0.8.0 -> 0.9.0. openssl stays on the 3.x line: a transitive dependency caps it at <4, so 4.0.1 conflicts in the graph. Also removes the leftover commented-out fmt/10.2.1 pin (fmt is now resolved transitively via spdlog). Co-Authored-By: Claude Opus 4.8 (1M context) --- conanfile.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/conanfile.py b/conanfile.py index 331d067f3..d48b4b9ba 100644 --- a/conanfile.py +++ b/conanfile.py @@ -14,7 +14,7 @@ def requirements(self): self.requires("json-schema-validator/2.4.0") self.requires("libmaxminddb/1.12.2") self.requires("nlohmann_json/3.11.3") - self.requires("openssl/3.6.2") + self.requires("openssl/3.6.3") if self.settings.os != "Windows": self.requires("libpcap/1.10.6", force=True) else: @@ -23,10 +23,9 @@ def requirements(self): self.requires("pcapplusplus/25.05") self.requires("protobuf/6.33.5") self.requires("sigslot/1.2.3") - #self.requires("fmt/10.2.1", force=True) self.requires("spdlog/1.17.0") self.requires("uvw/3.4.0") - self.requires("yaml-cpp/0.8.0") + self.requires("yaml-cpp/0.9.0") self.requires("robin-hood-hashing/3.11.5") self.requires("libcurl/8.20.0") if ( From bac9daa2d17cd743049a5f6105ea0fedf1352fea Mon Sep 17 00:00:00 2001 From: Leo Parente <23251360+leoparente@users.noreply.github.com> Date: Fri, 19 Jun 2026 17:21:08 -0300 Subject: [PATCH 7/8] fix(build): import OPENTELEMETRY_PROTO_API on Windows (otel proto is a DLL) On Windows the Conan opentelemetry-cpp/1.26.0 package builds opentelemetry_proto as a shared library (DLL + import lib), so its proto symbols are exported and consumers must reference them with __declspec(dllimport). Defining the macro empty (correct for the static libs on macOS/Linux) left the symbols unresolved on MSVC (LNK2019 on _Gauge_default_instance_, ScopeMetrics/ExportMetricsServiceRequest vftables). Use dllimport on Windows, empty elsewhere. Co-Authored-By: Claude Opus 4.8 (1M context) --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d7e297f15..57e81f4fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,8 +108,12 @@ enable_testing() message(STATUS "Building pktvisor version ${CMAKE_PROJECT_VERSION_MAJOR}.${CMAKE_PROJECT_VERSION_MINOR}.${CMAKE_PROJECT_VERSION_PATCH}${VISOR_PRERELEASE}") -# opentelemetry-cpp 1.26.0 generates proto headers with dllexport_decl but the Conan recipe doesn't propagate the macro to consumers; define it empty (static build). -add_compile_definitions(OPENTELEMETRY_PROTO_API=) +# opentelemetry-cpp 1.26.0 generates proto headers with dllexport_decl=OPENTELEMETRY_PROTO_API; the Conan recipe doesn't propagate the macro. On Windows the proto package is a DLL (consumers must import); elsewhere it expands to nothing. +if(WIN32) + add_compile_definitions("OPENTELEMETRY_PROTO_API=__declspec(dllimport)") +else() + add_compile_definitions(OPENTELEMETRY_PROTO_API=) +endif() add_subdirectory(3rd) add_subdirectory(libs) From e9454d00d4339aa42e369b32668ef1e76229696f Mon Sep 17 00:00:00 2001 From: Leo Parente <23251360+leoparente@users.noreply.github.com> Date: Fri, 19 Jun 2026 18:59:55 -0300 Subject: [PATCH 8/8] chore(deps): upgrade nlohmann_json 3.12.0 and cpp-httplib 0.27.0 nlohmann_json 3.11.3 -> 3.12.0 with force=True: opentelemetry-cpp and json-schema-validator pin an exact 3.11.3, so the override is required to resolve the graph (nlohmann_json is header-only and API-compatible). cpp-httplib 0.18.3 -> 0.27.0. This is the highest musl-safe version: starting at 0.28.0 the ConanCenter recipe unconditionally links libanl (non-blocking getaddrinfo) with no opt-out, which musl lacks and breaks the static cross-builds. 0.27.0 predates that change (needs only pthread). Co-Authored-By: Claude Opus 4.8 (1M context) --- conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conanfile.py b/conanfile.py index d48b4b9ba..017a0f72a 100644 --- a/conanfile.py +++ b/conanfile.py @@ -8,12 +8,12 @@ class Pktvisor(ConanFile): def requirements(self): self.requires("catch2/3.15.1") - self.requires("cpp-httplib/0.18.3") + self.requires("cpp-httplib/0.27.0") self.requires("docopt.cpp/0.6.3") self.requires("fast-cpp-csv-parser/cci.20240102") self.requires("json-schema-validator/2.4.0") self.requires("libmaxminddb/1.12.2") - self.requires("nlohmann_json/3.11.3") + self.requires("nlohmann_json/3.12.0", force=True) self.requires("openssl/3.6.3") if self.settings.os != "Windows": self.requires("libpcap/1.10.6", force=True)