You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "dongxiao1198 (via GitHub)" <gi...@apache.org> on 2025/05/19 07:30:34 UTC
[PR] feat: add zlib dependency [iceberg-cpp]
dongxiao1198 opened a new pull request, #101:
URL: https://github.com/apache/iceberg-cpp/pull/101
find zlib package in ThirdpartyToolchain.cmake and enable ARROW_WITH_ZLIB
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: add zlib dependency [iceberg-cpp]
Posted by "dongxiao1198 (via GitHub)" <gi...@apache.org>.
dongxiao1198 commented on code in PR #101:
URL: https://github.com/apache/iceberg-cpp/pull/101#discussion_r2095224359
##########
cmake_modules/IcebergThirdpartyToolchain.cmake:
##########
@@ -86,6 +86,9 @@ function(resolve_arrow_dependency)
set(ARROW_DEPENDENCY_SOURCE
"BUNDLED"
CACHE STRING "" FORCE)
+ set(ARROW_WITH_ZLIB
Review Comment:
DONE
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: add zlib dependency [iceberg-cpp]
Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on code in PR #101:
URL: https://github.com/apache/iceberg-cpp/pull/101#discussion_r2095044690
##########
cmake_modules/IcebergThirdpartyToolchain.cmake:
##########
@@ -86,6 +86,9 @@ function(resolve_arrow_dependency)
set(ARROW_DEPENDENCY_SOURCE
"BUNDLED"
CACHE STRING "" FORCE)
+ set(ARROW_WITH_ZLIB
Review Comment:
We should also add `set(ZLIB_SOURCE "SYSTEM" CACHE STRING "" FORCE)`
##########
cmake_modules/IcebergThirdpartyToolchain.cmake:
##########
@@ -285,3 +287,20 @@ function(resolve_nlohmann_json_dependency)
endfunction()
resolve_nlohmann_json_dependency()
+
+# ----------------------------------------------------------------------
+# zlib
+
+function(resolve_zlib_dependency)
+ # use system zlib, zlib is required by arrow and avro
+ find_package(ZLIB REQUIRED)
+ if(ZLIB_FOUND)
+ list(APPEND ICEBERG_SYSTEM_DEPENDENCIES ZLIB)
+ message(STATUS "ZLIB_FOUND")
+ message(STATUS "ZLIB_LIBRARIES: ${ZLIB_LIBRARIES}")
+ message(STATUS "ZLIB_INCLUDE_DIR: ${ZLIB_INCLUDE_DIR}")
+ endif()
+
+endfunction()
+
+resolve_zlib_dependency()
Review Comment:
We need to move all of these to the top. `resolve_zlib_dependency()` should be called before `resolve_arrow_dependency()` and `resolve_avro_dependency()`
##########
cmake_modules/IcebergThirdpartyToolchain.cmake:
##########
@@ -285,3 +287,20 @@ function(resolve_nlohmann_json_dependency)
endfunction()
resolve_nlohmann_json_dependency()
+
+# ----------------------------------------------------------------------
+# zlib
+
+function(resolve_zlib_dependency)
+ # use system zlib, zlib is required by arrow and avro
+ find_package(ZLIB REQUIRED)
+ if(ZLIB_FOUND)
+ list(APPEND ICEBERG_SYSTEM_DEPENDENCIES ZLIB)
+ message(STATUS "ZLIB_FOUND")
Review Comment:
Can we use a single `message` call?
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: add zlib dependency [iceberg-cpp]
Posted by "dongxiao1198 (via GitHub)" <gi...@apache.org>.
dongxiao1198 commented on code in PR #101:
URL: https://github.com/apache/iceberg-cpp/pull/101#discussion_r2095292516
##########
cmake_modules/IcebergThirdpartyToolchain.cmake:
##########
@@ -285,3 +287,20 @@ function(resolve_nlohmann_json_dependency)
endfunction()
resolve_nlohmann_json_dependency()
+
+# ----------------------------------------------------------------------
+# zlib
+
+function(resolve_zlib_dependency)
+ # use system zlib, zlib is required by arrow and avro
+ find_package(ZLIB REQUIRED)
+ if(ZLIB_FOUND)
+ list(APPEND ICEBERG_SYSTEM_DEPENDENCIES ZLIB)
+ message(STATUS "ZLIB_FOUND")
+ message(STATUS "ZLIB_LIBRARIES: ${ZLIB_LIBRARIES}")
+ message(STATUS "ZLIB_INCLUDE_DIR: ${ZLIB_INCLUDE_DIR}")
+ endif()
+
+endfunction()
+
+resolve_zlib_dependency()
Review Comment:
I movet them back to the end of file, that will be better.
##########
cmake_modules/IcebergThirdpartyToolchain.cmake:
##########
@@ -285,3 +287,20 @@ function(resolve_nlohmann_json_dependency)
endfunction()
resolve_nlohmann_json_dependency()
+
+# ----------------------------------------------------------------------
+# zlib
+
+function(resolve_zlib_dependency)
+ # use system zlib, zlib is required by arrow and avro
+ find_package(ZLIB REQUIRED)
+ if(ZLIB_FOUND)
+ list(APPEND ICEBERG_SYSTEM_DEPENDENCIES ZLIB)
+ message(STATUS "ZLIB_FOUND")
+ message(STATUS "ZLIB_LIBRARIES: ${ZLIB_LIBRARIES}")
+ message(STATUS "ZLIB_INCLUDE_DIR: ${ZLIB_INCLUDE_DIR}")
+ endif()
+
+endfunction()
+
+resolve_zlib_dependency()
Review Comment:
I moved them back to the end of file, that will be better.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: add zlib dependency [iceberg-cpp]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko merged PR #101:
URL: https://github.com/apache/iceberg-cpp/pull/101
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: add zlib dependency [iceberg-cpp]
Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on code in PR #101:
URL: https://github.com/apache/iceberg-cpp/pull/101#discussion_r2095220979
##########
cmake_modules/IcebergThirdpartyToolchain.cmake:
##########
@@ -285,3 +287,20 @@ function(resolve_nlohmann_json_dependency)
endfunction()
resolve_nlohmann_json_dependency()
+
+# ----------------------------------------------------------------------
+# zlib
+
+function(resolve_zlib_dependency)
+ # use system zlib, zlib is required by arrow and avro
+ find_package(ZLIB REQUIRED)
+ if(ZLIB_FOUND)
+ list(APPEND ICEBERG_SYSTEM_DEPENDENCIES ZLIB)
+ message(STATUS "ZLIB_FOUND")
+ message(STATUS "ZLIB_LIBRARIES: ${ZLIB_LIBRARIES}")
+ message(STATUS "ZLIB_INCLUDE_DIR: ${ZLIB_INCLUDE_DIR}")
+ endif()
+
Review Comment:
```suggestion
set(ICEBERG_SYSTEM_DEPENDENCIES
${ICEBERG_SYSTEM_DEPENDENCIES}
PARENT_SCOPE)
```
The CI is failed: https://github.com/apache/iceberg-cpp/actions/runs/15106986625/job/42457669021?pr=101 We need to add this to the parent scope
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: add zlib dependency [iceberg-cpp]
Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on code in PR #101:
URL: https://github.com/apache/iceberg-cpp/pull/101#discussion_r2095218184
##########
cmake_modules/IcebergThirdpartyToolchain.cmake:
##########
@@ -285,3 +287,20 @@ function(resolve_nlohmann_json_dependency)
endfunction()
resolve_nlohmann_json_dependency()
+
+# ----------------------------------------------------------------------
+# zlib
+
+function(resolve_zlib_dependency)
+ # use system zlib, zlib is required by arrow and avro
+ find_package(ZLIB REQUIRED)
+ if(ZLIB_FOUND)
+ list(APPEND ICEBERG_SYSTEM_DEPENDENCIES ZLIB)
+ message(STATUS "ZLIB_FOUND")
Review Comment:
BTW, we should also check if target `ZLIB::ZLIB` exists
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] feat: add zlib dependency [iceberg-cpp]
Posted by "dongxiao1198 (via GitHub)" <gi...@apache.org>.
dongxiao1198 commented on code in PR #101:
URL: https://github.com/apache/iceberg-cpp/pull/101#discussion_r2095290384
##########
cmake_modules/IcebergThirdpartyToolchain.cmake:
##########
@@ -285,3 +287,20 @@ function(resolve_nlohmann_json_dependency)
endfunction()
resolve_nlohmann_json_dependency()
+
+# ----------------------------------------------------------------------
+# zlib
+
+function(resolve_zlib_dependency)
+ # use system zlib, zlib is required by arrow and avro
+ find_package(ZLIB REQUIRED)
+ if(ZLIB_FOUND)
+ list(APPEND ICEBERG_SYSTEM_DEPENDENCIES ZLIB)
+ message(STATUS "ZLIB_FOUND")
Review Comment:
i found those code in zlib cmake script
add_library(ZLIB::ZLIB STATIC IMPORTED)
set(ZLIB_LIBRARIES ${ZLIB_STATIC_LIB})
set(ZLIB_INCLUDE_DIRS "${ZLIB_PREFIX}/include")
set_target_properties(ZLIB::ZLIB PROPERTIES IMPORTED_LOCATION ${ZLIB_LIBRARIES})
so i think there is no need to check it.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org