From 951fc1b0714d6fdc89dcc801be9fb3bd4ec9b235 Mon Sep 17 00:00:00 2001 From: Marco Treglia Date: Thu, 4 Dec 2025 14:21:01 +0100 Subject: [PATCH] required pkg-config lib-curl v7.87.0 in the profiler Resolving compiling issue when building with previous version of lib-curl. If locally is present an older version of lib-curl the profiler build fails with: ``` 29 | curl_easy_setopt( curl, CURLOPT_CA_CACHE_TIMEOUT, 604800L ); | ^~~~~~~~~~~~~~~~~~~~~~~~ | CURLOPT_DNS_CACHE_TIMEOUT include/curl/curl.h:3109:68: note: expanded from macro 'curl_easy_setopt' 3109 | #define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param) | ^ include/curl/curl.h:1398:11: note: 'CURLOPT_DNS_CACHE_TIMEOUT' declared here 1398 | CURLOPT(CURLOPT_DNS_CACHE_TIMEOUT, CURLOPTTYPE_LONG, 92), | ^ tracy/profiler/src/profiler/TracyLlmApi.cpp:144:46: error: use of undeclared identifier 'CURL_WRITEFUNC_ERROR'; did you mean 'CURLE_WRITE_ERROR'? 144 | if( !v.callback( json ) ) return CURL_WRITEFUNC_ERROR; | ^~~~~~~~~~~~~~~~~~~~ | CURLE_WRITE_ERROR include/curl/curl.h:524:3: note: 'CURLE_WRITE_ERROR' declared here 524 | CURLE_WRITE_ERROR, /* 23 */ | ^ 2 errors generated. ``` Both CURLOPT_CA_CACHE_TIMEOUT and CURL_WRITEFUNC_ERROR were added in https://curl.se/ch/7.87.0.html Now checking the version will avoid such issues: -- Checking for module 'libcurl>=7.87.0' -- Package dependency requirement 'libcurl >= 7.87.0' could not be satisfied. Package 'libcurl' has version '7.84.0', required version is '>= 7.87.0' -- CPM: Adding package libcurl@ (curl-8_17_0 to ...) --- cmake/vendor.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/vendor.cmake b/cmake/vendor.cmake index 5cca4161..f4d21383 100644 --- a/cmake/vendor.cmake +++ b/cmake/vendor.cmake @@ -271,7 +271,7 @@ if(NOT EMSCRIPTEN) # libcurl - pkg_check_modules(LIBCURL libcurl) + pkg_check_modules(LIBCURL libcurl>=7.87.0) if (LIBCURL_FOUND AND NOT DOWNLOAD_LIBCURL) add_library(TracyLibcurl INTERFACE) target_include_directories(TracyLibcurl INTERFACE ${LIBCURL_INCLUDE_DIRS})