You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "Subham-KRLX (via GitHub)" <gi...@apache.org> on 2025/11/14 10:59:48 UTC

[PR] Add China mirror support for dependencies [iceberg-cpp]

Subham-KRLX opened a new pull request, #319:
URL: https://github.com/apache/iceberg-cpp/pull/319

   Fixes #239


-- 
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] chore: add support to customize download url of vendored dependencies [iceberg-cpp]

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on PR #319:
URL: https://github.com/apache/iceberg-cpp/pull/319#issuecomment-3573525947

   Thanks for improving this! @Subham-KRLX Thanks @zhjwpku @Xuanwo @HuaHuaY for the review!


-- 
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] Add China mirror support for dependencies [iceberg-cpp]

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on code in PR #319:
URL: https://github.com/apache/iceberg-cpp/pull/319#discussion_r2540718072


##########
cmake_modules/IcebergThirdpartyToolchain.cmake:
##########
@@ -221,9 +246,17 @@ endfunction()
 function(resolve_nanoarrow_dependency)
   prepare_fetchcontent()
 
+  if(DEFINED ENV{ICEBERG_NANOARROW_URL})

Review Comment:
   Could you help define these variables to the top of this file: https://github.com/apache/iceberg-cpp/blob/main/cmake_modules/IcebergThirdpartyToolchain.cmake#L24



##########
BUILD_CHINA.md:
##########
@@ -0,0 +1,118 @@
+<!--
+  ~ 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.
+-->
+
+# Building in China
+
+This guide helps developers in China who may experience network issues when downloading dependencies from GitHub or international mirrors.
+
+## Using Custom Mirror URLs
+
+If you experience download timeouts, you can override the default dependency URLs using environment variables:
+
+```bash
+export ICEBERG_ARROW_URL="<your-mirror-url>/apache-arrow-22.0.0.tar.gz"
+export ICEBERG_NANOARROW_URL="<your-mirror-url>/apache-arrow-nanoarrow-0.7.0.tar.gz"
+export ICEBERG_CROARING_URL="<your-mirror-url>/CRoaring-v4.3.11.tar.gz"
+export ICEBERG_NLOHMANN_JSON_URL="<your-mirror-url>/json-v3.11.3.tar.xz"
+export ICEBERG_SPDLOG_URL="<your-mirror-url>/spdlog-v1.15.3.tar.gz"
+export ICEBERG_CPR_URL="<your-mirror-url>/cpr-1.12.0.tar.gz"
+
+# For Avro (git repository):
+export ICEBERG_AVRO_GIT_URL="<your-git-mirror>/avro.git"
+# Or if you have a tarball:
+export ICEBERG_AVRO_URL="<your-mirror-url>/avro.tar.gz"
+```
+
+Then build as usual:
+
+```bash
+cmake -S . -B build
+cmake --build build
+```
+
+## Alternative Solutions
+
+1. **Use system packages**: Install dependencies via your system package manager
+2. **Use a proxy**: Set `https_proxy` environment variable
+3. **Pre-download**: Manually download tarballs to `~/.cmake/Downloads/`
+
+## Getting Help
+
+If you continue experiencing build issues, please open an issue at https://github.com/apache/iceberg-cpp/issues with details about which dependency failed.
+
+# Building in China

Review Comment:
   This document seems not well organized. I'm not sure if it is a good practice to mention China explicitly. In order not to maintain this file, can we remove it and only modify README to let users know that we can use env variables to customize thirdparty dependencies?



-- 
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] Add China mirror support for dependencies [iceberg-cpp]

Posted by "HuaHuaY (via GitHub)" <gi...@apache.org>.
HuaHuaY commented on code in PR #319:
URL: https://github.com/apache/iceberg-cpp/pull/319#discussion_r2527893592


##########
README.md:
##########
@@ -31,6 +31,8 @@ C++ implementation of [Apache Iceberg™](https://iceberg.apache.org/).
 - CMake 3.25 or higher
 - C++23 compliant compiler
 
+> **Note**: For developers in China experiencing network issues when downloading dependencies, see [BUILD_CHINA.md](BUILD_CHINA.md) for mirror configuration.

Review Comment:
   Agree with you. And we have CMake options such as `ICEBERG_ARROW_URL` which allow users to customize urls.



-- 
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] Add China mirror support for dependencies [iceberg-cpp]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #319:
URL: https://github.com/apache/iceberg-cpp/pull/319#discussion_r2528426042


##########
README.md:
##########
@@ -31,6 +31,8 @@ C++ implementation of [Apache Iceberg™](https://iceberg.apache.org/).
 - CMake 3.25 or higher
 - C++23 compliant compiler
 
+> **Note**: For developers in China experiencing network issues when downloading dependencies, see [BUILD_CHINA.md](BUILD_CHINA.md) for mirror configuration.

Review Comment:
   Here is my -1 too. I don't think it's good idea to add other mirrors in `ARROW_SOURCE_URL` too. 



-- 
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] chore: add support to customize download url of vendored dependencies [iceberg-cpp]

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac merged PR #319:
URL: https://github.com/apache/iceberg-cpp/pull/319


-- 
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] Add China mirror support for dependencies [iceberg-cpp]

Posted by "Subham-KRLX (via GitHub)" <gi...@apache.org>.
Subham-KRLX commented on PR #319:
URL: https://github.com/apache/iceberg-cpp/pull/319#issuecomment-3562654228

   @wgtmac Thank you for the feedback I have addressed both of your comments
   
    Documented all ICEBERG_*_URL environment variables at the top of IcebergThirdpartyToolchain.cmake (L24-40)
   Removed BUILD_CHINA.md 
   Updated README.md with generic guidance on customizing dependency URLs
   
   The PR now only adds optional environment variables with documentation keeping everything flexible without region-specific docs.
   


-- 
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] Add China mirror support for dependencies [iceberg-cpp]

Posted by "HuaHuaY (via GitHub)" <gi...@apache.org>.
HuaHuaY commented on code in PR #319:
URL: https://github.com/apache/iceberg-cpp/pull/319#discussion_r2527893592


##########
README.md:
##########
@@ -31,6 +31,8 @@ C++ implementation of [Apache Iceberg™](https://iceberg.apache.org/).
 - CMake 3.25 or higher
 - C++23 compliant compiler
 
+> **Note**: For developers in China experiencing network issues when downloading dependencies, see [BUILD_CHINA.md](BUILD_CHINA.md) for mirror configuration.

Review Comment:
   Agree with you.



-- 
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] Add China mirror support for dependencies [iceberg-cpp]

Posted by "HuaHuaY (via GitHub)" <gi...@apache.org>.
HuaHuaY commented on code in PR #319:
URL: https://github.com/apache/iceberg-cpp/pull/319#discussion_r2527893592


##########
README.md:
##########
@@ -31,6 +31,8 @@ C++ implementation of [Apache Iceberg™](https://iceberg.apache.org/).
 - CMake 3.25 or higher
 - C++23 compliant compiler
 
+> **Note**: For developers in China experiencing network issues when downloading dependencies, see [BUILD_CHINA.md](BUILD_CHINA.md) for mirror configuration.

Review Comment:
   Agree with you. We have CMake options such as `ICEBERG_ARROW_URL` which allow users to customize urls. If other projects use specific urls for China, I would also support following this approach.



-- 
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] Add China mirror support for dependencies [iceberg-cpp]

Posted by "zhjwpku (via GitHub)" <gi...@apache.org>.
zhjwpku commented on code in PR #319:
URL: https://github.com/apache/iceberg-cpp/pull/319#discussion_r2550071135


##########
README.md:
##########
@@ -31,6 +31,10 @@ C++ implementation of [Apache Iceberg™](https://iceberg.apache.org/).
 - CMake 3.25 or higher
 - C++23 compliant compiler
 
+## Customizing Dependency URLs
+
+If you experience network issues when downloading dependencies, you can customize the download URLs using environment variables. See the available options documented in [`cmake_modules/IcebergThirdpartyToolchain.cmake`](cmake_modules/IcebergThirdpartyToolchain.cmake#L24-L40).

Review Comment:
   IcebergThirdpartyToolchain.cmake can be changed, the link you put here is not stable. Why not directly put the quoted lines here?



-- 
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] Add China mirror support for dependencies [iceberg-cpp]

Posted by "Subham-KRLX (via GitHub)" <gi...@apache.org>.
Subham-KRLX commented on code in PR #319:
URL: https://github.com/apache/iceberg-cpp/pull/319#discussion_r2529503386


##########
README.md:
##########
@@ -31,6 +31,8 @@ C++ implementation of [Apache Iceberg™](https://iceberg.apache.org/).
 - CMake 3.25 or higher
 - C++23 compliant compiler
 
+> **Note**: For developers in China experiencing network issues when downloading dependencies, see [BUILD_CHINA.md](BUILD_CHINA.md) for mirror configuration.

Review Comment:
   After researching Apache best practices I removed all hardcoded mirror URLs and kept only optional environment variables for custom mirrors just like ICEBERG_ARROW_URL. I added documentation showing how users can set these variables if needed. No defaults changed—everything still defaults to the original URLs. This keeps the build flexible respects Apache guidelines and helps developers facing network issues. Please review and let me know if you need any changes.



-- 
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] Add China mirror support for dependencies [iceberg-cpp]

Posted by "zhjwpku (via GitHub)" <gi...@apache.org>.
zhjwpku commented on code in PR #319:
URL: https://github.com/apache/iceberg-cpp/pull/319#discussion_r2527838039


##########
README.md:
##########
@@ -31,6 +31,8 @@ C++ implementation of [Apache Iceberg™](https://iceberg.apache.org/).
 - CMake 3.25 or higher
 - C++23 compliant compiler
 
+> **Note**: For developers in China experiencing network issues when downloading dependencies, see [BUILD_CHINA.md](BUILD_CHINA.md) for mirror configuration.

Review Comment:
   -1 from me. sorry about that :(
   
   One quick question: do other Apache projects handle this the same way for China?
   
   iceberg-cpp should build against system libraries dependencies, and I think that's probably the right direction.



-- 
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] Add China mirror support for dependencies [iceberg-cpp]

Posted by "Subham-KRLX (via GitHub)" <gi...@apache.org>.
Subham-KRLX commented on code in PR #319:
URL: https://github.com/apache/iceberg-cpp/pull/319#discussion_r2528186112


##########
README.md:
##########
@@ -31,6 +31,8 @@ C++ implementation of [Apache Iceberg™](https://iceberg.apache.org/).
 - CMake 3.25 or higher
 - C++23 compliant compiler
 
+> **Note**: For developers in China experiencing network issues when downloading dependencies, see [BUILD_CHINA.md](BUILD_CHINA.md) for mirror configuration.

Review Comment:
   Thanks for the review!
   To clarify: this PR doesn’t introduce region specific behavior or change defaults. It only provides optional mirror URLs just like `ICEBERG_ARROW_URL` to make the build workable for developers in China who frequently hit GitHub timeouts.
   
   If preferred, I can simplify the PR so it only adds optional CMake variables + documentation, matching how other Apache projects handle this.
   Please let me know and I’ll update it accordingly.



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