JakeChampion commented on PR #12201:
URL: https://github.com/apache/trafficserver/pull/12201#issuecomment-3498963027

   > ## Fedora 43 Build Support
   > 
   > For Fedora 43 (and potentially other RHEL-based systems), the zstd package 
doesn't ship CMake config files, only pkg-config files. Here's a suggested 
enhancement to add pkg-config fallback support:
   > 
   > ```diff
   > diff --git a/CMakeLists.txt b/CMakeLists.txt
   > index 692b11985a..0e1d26e08f 100644
   > --- a/CMakeLists.txt
   > +++ b/CMakeLists.txt
   > @@ -365,7 +365,20 @@ if(zstd_FOUND)
   >      endif()
   >    endif()
   >  else()
   > -  set(HAVE_ZSTD_H FALSE)
   > +  # Try pkg-config as fallback
   > +  find_package(PkgConfig QUIET)
   > +  if(PKG_CONFIG_FOUND)
   > +    pkg_check_modules(ZSTD QUIET IMPORTED_TARGET libzstd)
   > +    if(ZSTD_FOUND)
   > +      add_library(zstd::zstd ALIAS PkgConfig::ZSTD)
   > +      set(HAVE_ZSTD_H TRUE)
   > +      message(STATUS "Found zstd via pkg-config: ${ZSTD_VERSION}")
   > +    else()
   > +      set(HAVE_ZSTD_H FALSE)
   > +    endif()
   > +  else()
   > +    set(HAVE_ZSTD_H FALSE)
   > +  endif()
   >  endif()
   >  
   >  # ncurses is used in traffic_top
   > ```
   > 
   > This allows the build to find zstd on distributions that only provide 
`libzstd.pc` without CMake package config files. Tested successfully on Fedora 
43 with libzstd-devel 1.5.7.
   
   @bryancall could this be done in a follow up or would we want this as part 
of the current pull request?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to