daq in snort become myself crazy this should be understand my skill but fail

hello,

i am not understand why i keep the errors following for fill daq in the last snort 3-1-31.0 :

CMake Error at /usr/local/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:283 (message):
   (missing: daq) , 
Call Stack (most recent call first):
  /usr/local/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:645 (_FPHSA_FAILURE_MESSAGE)
  cmake/Finddaq.cmake:22 (find_package_handle_standard_args)
  cmake/include_libraries.cmake:4 (find_package)
  CMakeLists.txt:29 (include)

i copy past near the line where the errors keep :

firstly Finddaq.cmake :

# - Find DAQ
# this module looks for DAQ
#
# DAQ:
# *_EXE -  the full path to the above command
# *_FOUND - if false, don't attempt to use above command

# to build:
# Signal Aquisition - DAQ needed
set(ERROR_MESSAGE
    "install DAQ to build the html user manual"
)

find_program(daq DAQ)

include(FindPackageHandleStandardArgs)
include_directories(/usr/local/bin/)
include_directories(/usr/bin/include/snort/daq/)
include_directories(/usr/bin/lib/snort/daq/)
include_directories(/usr/local/lib/)
include_directories(/usr/local/lib/pkgconfig/)
find_package_handle_standard_args(daq
    REQUIRED_VARS daq
    FAIL_MESSAGE "${ERROR_MESSAGE}"
)
mark_as_advanced(
    DAQ
)

the CMakeLists.txt :

# Pull in definitions of various install directories
include (${CMAKE_MODULE_PATH}/daq.cmake)
include (${CMAKE_MODULE_PATH}/Finddaq.cmake)
include (GNUInstallDirs)
include (${CMAKE_MODULE_PATH}/macros.cmake)
include (${CMAKE_MODULE_PATH}/create_options.cmake)
include (${CMAKE_MODULE_PATH}/include_libraries.cmake)
include (${CMAKE_MODULE_PATH}/platforms.cmake)
include (${CMAKE_MODULE_PATH}/configure_options.cmake)
#include (${CMAKE_MODULE_PATH}/compiler_features.cmake)
include (${CMAKE_MODULE_PATH}/sanity_checks.cmake)

the daq.cmake :

# - Find DAQ
# this module looks for DAQ
#
# DAQ:
# *_EXE -  the full path to the above command
# *_FOUND - if false, don't attempt to use above command

# to build:
# Signal Aquisition - DAQ needed
set(ERROR_MESSAGE
    "install DAQ to build the html user manual"
)

find_program(daq DAQ)

include(FindPackageHandleStandardArgs)
include_directories(/usr/local/bin/)
include_directories(/usr/bin/include/snort/daq/)
include_directories(/usr/bin/lib/snort/daq/)
include_directories(/usr/local/lib/)
include_directories(/usr/local/lib/pkgconfig/)
find_package_handle_standard_args(daq
    REQUIRED_VARS daq
    FAIL_MESSAGE "${ERROR_MESSAGE}"
)
mark_as_advanced(
    DAQ
)

FindPackageHandleStandartArgs.cmake near line 283 :

# internal helper macro
macro(_daq_FAILURE_MESSAGE _msg)
  set (daq_msg "${_msg}")
  if (daq_REASON_FAILURE_MESSAGE)
    string(APPEND daq_msg "\n    Reason given by package: ${daq_REASON_FAILURE_MESSAGE}\n")
  endif()
  if (${_NAME}_FIND_REQUIRED)
    message(FATAL_ERROR "${daq_msg}")
  else ()
    if (NOT ${_NAME}_FIND_QUIETLY)
      message(STATUS "${daq_msg}")
    endif ()
  endif ()
endmacro()


# internal helper macro
macro(_FPHSA_FAILURE_MESSAGE _msg)
  set (FPHSA_msg "${_msg}")
  if (FPHSA_REASON_FAILURE_MESSAGE)
    string(APPEND FPHSA_msg "\n    Reason given by package: ${FPHSA_REASON_FAILURE_MESSAGE}\n")
  endif()
  if (${_NAME}_FIND_REQUIRED)
    message(FATAL_ERROR "${FPHSA_msg}, ${daq_msg}")
  else ()
    if (NOT ${_NAME}_FIND_QUIETLY)
      message(STATUS "${FPHSA_msg}")
    endif ()
  endif ()
endmacro()

FindPackageHandleStandartArgs.cmake near the line 645 :

  # print the result:
  if (${_NAME}_FOUND)
    FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG} ${COMPONENT_MSG}" "${DETAILS}")
  else ()

    if(daq_CONFIG_MODE)
      _daq_HANDLE_FAILURE_CONFIG_MODE()
    else()
      if(NOT VERSION_OK)
        set(RESULT_MSG)
        if (_FIRST_REQUIRED_VAR)
          string (APPEND RESULT_MSG "found ${${_FIRST_REQUIRED_VAR}}")
        endif()
        if (COMPONENT_MSG)
          if (RESULT_MSG)
            string (APPEND RESULT_MSG ", ")
          endif()
          string (APPEND RESULT_MSG "${FOUND_COMPONENTS_MSG}")
        endif()
        _FPHSA_FAILURE_MESSAGE("${daq_FAIL_MESSAGE}: ${VERSION_MSG} (${RESULT_MSG})")
      else()
        _FPHSA_FAILURE_MESSAGE("${daq_FAIL_MESSAGE} (missing:${MISSING_VARS}) ${VERSION_MSG}")
      endif()
    endif()

  endif ()

  set(${_NAME}_FOUND ${${_NAME}_FOUND} PARENT_SCOPE)
  set(${_NAME_UPPER}_FOUND ${${_NAME}_FOUND} PARENT_SCOPE)

maybe cmake doesn’t understand my type because the system frose on the loading ?

thank you in advance for your time,

regards.

dorian rosse.

i am to back :

i have pass the errors but i am happening one little error than i don’t understand :

CMake Warning:
  Manually-specified variables were not used by the project:

    DAQ_INCLUDE_DIR_HINT
    DAQ_LIBRARIES_DIR_HINT

the line edited for pass the errors :

firstly Finddaq.cmake :

# - Find daq
# this module looks for daq
#
# daq:
# *_FOUND - if false, don't attempt to use above command

# to build:
# Signal Aquisition - daq needed
set(ERROR_MESSAGE
    "install daq to build the html user manual"
)

find_program(daq DAQ)

include(FindPackageHandleStandardArgs)
include_directories(/usr/local/bin/)
include_directories(/usr/bin/include/snort/daq/)
include_directories(/usr/bin/lib/snort/daq/)
include_directories(/usr/local/lib/)
include_directories(/usr/local/lib/pkgconfig/)
find_package_handle_standard_args(daq
    REQUIRED_VARS daq
    FAIL_MESSAGE "${ERROR_MESSAGE}"
)
mark_as_advanced(
    daq
)

include_libraries.cmake was call daq in requirement but it should be call in optional :

# required libraries
find_package(Threads REQUIRED)
find_package(DNET REQUIRED)
find_package(FlexLexer REQUIRED)
find_package(HWLOC REQUIRED)
find_package(LuaJIT REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(PCAP REQUIRED)
find_package(PCRE REQUIRED)
find_package(ZLIB REQUIRED)
if (ENABLE_UNIT_TESTS)
    find_package(CppUTest REQUIRED)
endif (ENABLE_UNIT_TESTS)

# optional libraries
find_package(Atomic QUIET)
find_package(LibLZMA QUIET)
find_package(Asciidoc QUIET)
find_package(DBLATEX QUIET)
find_package(Ruby QUIET 1.8.7)
find_package(HS QUIET 4.4.0)
if (ENABLE_SAFEC)
    find_package(SafeC QUIET)
endif (ENABLE_SAFEC)
find_package(ICONV QUIET)
find_package(UUID QUIET)
find_package(Libunwind)
find_package(daq QUIET)

the CMakeLists.txt :

# Pull in definitions of various install directories
include (GNUInstallDirs)
include (${CMAKE_MODULE_PATH}/Finddaq.cmake)
include (${CMAKE_MODULE_PATH}/macros.cmake)
include (${CMAKE_MODULE_PATH}/create_options.cmake)
include (${CMAKE_MODULE_PATH}/include_libraries.cmake)
include (${CMAKE_MODULE_PATH}/platforms.cmake)
include (${CMAKE_MODULE_PATH}/configure_options.cmake)
#include (${CMAKE_MODULE_PATH}/compiler_features.cmake)
include (${CMAKE_MODULE_PATH}/sanity_checks.cmake)

the daq.cmake i have delete it because cmake use only Finddaq.cmake for the daq call,

FindPackageHandleStandartArgs.cmake near the line 645 :

  # print the result:
  if (${_NAME}_FOUND)
    FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG} ${COMPONENT_MSG}" "${DETAILS}")
  else ()

    if(daq_CONFIG_MODE)
      _daq_HANDLE_FAILURE_CONFIG_MODE()
    else()
      if(NOT VERSION_OK)
        set(RESULT_MSG)
        if (_FIRST_REQUIRED_VAR)
          string (APPEND RESULT_MSG "found ${${_FIRST_REQUIRED_VAR}}")
        endif()
        if (COMPONENT_MSG)
          if (RESULT_MSG)
            string (APPEND RESULT_MSG ", ")
          endif()
          string (APPEND RESULT_MSG "${FOUND_COMPONENTS_MSG}")
        endif()
        _FPHSA_FAILURE_MESSAGE("${daq_FAIL_MESSAGE}: ${VERSION_MSG} (${RESULT_MSG})")
      else()
        _FPHSA_FAILURE_MESSAGE("${daq_FAIL_MESSAGE} (missing:${MISSING_VARS}) ${VERSION_MSG}")
      endif()
    endif()

  endif ()

  set(${_NAME}_FOUND ${${_NAME}_FOUND} PARENT_SCOPE)
  set(${_NAME_UPPER}_FOUND ${${_NAME}_FOUND} PARENT_SCOPE)

regards.

dorian rosse.