lordgamez commented on code in PR #2174:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2174#discussion_r3273694760


##########
cmake/ZLIB.cmake:
##########
@@ -0,0 +1,45 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+include(FetchContent)
+
+set(ZLIB_BUILD_TESTING OFF CACHE BOOL "" FORCE)
+set(ZLIB_BUILD_SHARED OFF CACHE BOOL "" FORCE)
+
+FetchContent_Declare(
+    zlib
+    URL "https://github.com/madler/zlib/archive/refs/tags/v1.3.2.tar.gz";
+    URL_HASH 
"SHA256=b99a0b86c0ba9360ec7e78c4f1e43b1cbdf1e6936c8fa0f6835c0cd694a495a1"
+    SYSTEM

Review Comment:
   Good idea, but unfortunately for some reason it does not seem to work with 
RockyLinux, maybe the FindZLIB.cmake module is different in the rocky image.
   ```
   2026-05-20T11:12:40.7138217Z #12 420.4 CMake Error at 
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
   2026-05-20T11:12:40.7139389Z #12 420.4   Could NOT find ZLIB (missing: 
ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
   2026-05-20T11:12:40.7140224Z #12 420.4 Call Stack (most recent call first):
   2026-05-20T11:12:40.7141317Z #12 420.4   
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 
(_FPHSA_FAILURE_MESSAGE)
   2026-05-20T11:12:40.7142623Z #12 420.4   
/usr/share/cmake/Modules/FindZLIB.cmake:200 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
   2026-05-20T11:12:40.7143601Z #12 420.4   CMakeLists.txt:166 (find_package)
   2026-05-20T11:12:40.7144259Z #12 420.4 
   2026-05-20T11:12:40.7145102Z #12 420.4 
   2026-05-20T11:12:40.7145688Z #12 420.4 -- Configuring incomplete, errors 
occurred!
   ```
   I am not sure if it's worth debugging, I would keep the current solution for 
now.



-- 
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