--- CMakeLists.txt.orig	2025-08-08 18:59:37 UTC
+++ CMakeLists.txt
@@ -40,7 +40,7 @@ set(CMAKE_C_STANDARD 11)
 set(CMAKE_INSTALL_MESSAGE LAZY)
 
 set(CMAKE_C_STANDARD 11)
-set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_STANDARD 17)
 set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "netdata")
 
 option(USE_CXX_11 "Use C++11 instead of C++14 (should only be used on legacy systems that cannot support C++14, may disable some features)" False)
@@ -95,7 +95,7 @@ set(NETDATA_RUNTIME_PREFIX "${CMAKE_INSTALL_PREFIX}")
 set(OS_WINDOWS     False)
 
 set(NETDATA_RUNTIME_PREFIX "${CMAKE_INSTALL_PREFIX}")
-set(BINDIR usr/sbin)
+set(BINDIR sbin)
 
 if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
         set(OS_MACOS True)
@@ -410,7 +410,7 @@ include(NetdataBacktrace)
 include(NetdataJSONC)
 include(NetdataYAML)
 include(NetdataBacktrace)
-include(NetdataDlib)
+#include(NetdataDlib)
 
 if(ENABLE_LEGACY_EBPF_PROGRAMS)
         include(NetdataEBPFLegacy)
@@ -435,9 +435,9 @@ endif()
         netdata_bundle_sentry()
 endif()
 
-if(ENABLE_ML)
-  netdata_bundle_dlib()
-endif()
+#if(ENABLE_ML)
+#  netdata_bundle_dlib()
+#endif()
 
 #
 # check include files
@@ -3171,9 +3171,9 @@ add_executable(netdata
         "$<$<BOOL:${OS_WINDOWS}>:${NETDATA_RES_FILES}>"
 )
 
-if(ENABLE_ML)
-  netdata_add_dlib_to_target(netdata)
-endif()
+#if(ENABLE_ML)
+#  netdata_add_dlib_to_target(netdata)
+#endif()
 
 if(OS_WINDOWS)
         add_executable(NetdataClaim ${CLAIM_WINDOWS_FILES} ${NETDATA_CLAIM_RES_FILES})
@@ -3297,6 +3297,7 @@ if(ENABLE_PLUGIN_GO)
             COMPONENT plugin-go
             DESTINATION libexec/netdata/plugins.d)
 
+#[[
     # Build and install nd-mcp (stdio-golang bridge) exactly like go.d.plugin
     if (OS_WINDOWS)
         set(ND_MCP_NAME nd-mcp.exe)
@@ -3309,6 +3310,7 @@ if(ENABLE_PLUGIN_GO)
             ${CMAKE_BINARY_DIR}/${ND_MCP_NAME}
             COMPONENT plugin-go
             DESTINATION "${BINDIR}")
+]]
 endif()
 
 #
@@ -3330,12 +3332,12 @@ endif()
   string(REGEX REPLACE "/$" "" NETDATA_RUNTIME_PREFIX "${NETDATA_RUNTIME_PREFIX}")
 endif()
 
-set(CACHE_DIR "${NETDATA_RUNTIME_PREFIX}/var/cache/netdata")
-set(CONFIG_DIR "${NETDATA_RUNTIME_PREFIX}/etc/netdata")
-set(LIBCONFIG_DIR "${NETDATA_RUNTIME_PREFIX}/lib/netdata/conf.d")
-set(LOG_DIR "${NETDATA_RUNTIME_PREFIX}/var/log/netdata")
-set(PLUGINS_DIR "${NETDATA_RUNTIME_PREFIX}/libexec/netdata/plugins.d")
-set(VARLIB_DIR "${NETDATA_RUNTIME_PREFIX}/var/lib/netdata")
+set(CACHE_DIR "%%NETDATA_CACHE%%")
+set(CONFIG_DIR "%%ETCDIR%%")
+set(LIBCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/lib/netdata/conf.d")
+set(LOG_DIR "%%NETDATA_LOG%%")
+set(PLUGINS_DIR "${CMAKE_INSTALL_PREFIX}/libexec/netdata/plugins.d")
+set(VARLIB_DIR "%%NETDATA_PERST%%")
 
 # A non-default value is only used when building Debian packages (/var/lib/netdata/www)
 if(NOT DEFINED WEB_DIR)
@@ -3388,11 +3390,12 @@ install(TARGETS netdata COMPONENT netdata DESTINATION 
 
 install(TARGETS netdata COMPONENT netdata DESTINATION "${BINDIR}")
 
-install(DIRECTORY COMPONENT netdata DESTINATION var/cache/netdata)
-install(DIRECTORY COMPONENT netdata DESTINATION var/log/netdata)
-install(DIRECTORY COMPONENT netdata DESTINATION var/lib/netdata/registry)
-install(DIRECTORY COMPONENT netdata DESTINATION var/lib/netdata/cloud.d)
-install(DIRECTORY COMPONENT netdata DESTINATION var/run/netdata)
+
+install(DIRECTORY COMPONENT netdata DESTINATION %%NETDATA_CACHE%%)
+install(DIRECTORY COMPONENT netdata DESTINATION %%NETDATA_LOG%%)
+install(DIRECTORY COMPONENT netdata DESTINATION %%NETDATA_PERST%%/registery)
+install(DIRECTORY COMPONENT netdata DESTINATION %%NETDATA_PERST%%/cloud.d)
+install(DIRECTORY COMPONENT netdata DESTINATION %%NETDATA_RUN%%)
 install(DIRECTORY COMPONENT netdata DESTINATION etc/netdata)
 install(DIRECTORY COMPONENT netdata DESTINATION etc/netdata/custom-plugins.d)
 install(DIRECTORY COMPONENT netdata DESTINATION etc/netdata/health.d)
@@ -3407,11 +3410,11 @@ set(sbindir_POST "${NETDATA_RUNTIME_PREFIX}/${BINDIR}"
 set(pkglibexecdir_POST "${NETDATA_RUNTIME_PREFIX}/libexec/netdata")
 set(localstatedir_POST "${NETDATA_RUNTIME_PREFIX}/var")
 set(sbindir_POST "${NETDATA_RUNTIME_PREFIX}/${BINDIR}")
-set(configdir_POST "${NETDATA_RUNTIME_PREFIX}/etc/netdata")
-set(libconfigdir_POST "${NETDATA_RUNTIME_PREFIX}/lib/netdata/conf.d")
-set(cachedir_POST "${NETDATA_RUNTIME_PREFIX}/var/cache/netdata")
-set(registrydir_POST "${NETDATA_RUNTIME_PREFIX}/var/lib/netdata/registry")
-set(varlibdir_POST "${NETDATA_RUNTIME_PREFIX}/var/lib/netdata")
+set(configdir_POST "%%ETCDIR%%")
+set(libconfigdir_POST "${CMAKE_INSTALL_PREFIX}/lib/netdata/conf.d")
+set(cachedir_POST "%%NETDATA_CACHE%%")
+set(registrydir_POST "%%NETDATA_PERST%%/registery")
+set(varlibdir_POST "%%NETDATA_PERST%%")
 set(netdata_user_POST "${NETDATA_USER}")
 set(netdata_group_POST "${NETDATA_USER}")
 
@@ -3929,8 +3932,8 @@ if(ENABLE_DASHBOARD)
 #
 
 if(ENABLE_DASHBOARD)
-  include(NetdataDashboard)
-  bundle_dashboard()
+  #include(NetdataDashboard)
+  #bundle_dashboard()
 
   install(FILES
           COMPONENT dashboard
