wgtmac commented on code in PR #39729:
URL: https://github.com/apache/arrow/pull/39729#discussion_r1561117971
##########
ci/conan/all/conanfile.py:
##########
@@ -136,283 +117,147 @@ class ArrowConan(ConanFile):
short_paths = True
@property
- def _minimum_cpp_standard(self):
+ def _min_cppstd(self):
# arrow >= 10.0.0 requires C++17.
# https://github.com/apache/arrow/pull/13991
- return 11 if Version(self.version) < "10.0.0" else 17
+ return "11" if Version(self.version) < "10.0.0" else "17"
@property
def _compilers_minimum_version(self):
return {
- "gcc": "8",
- "clang": "7",
- "apple-clang": "10",
- }
+ "11": {
+ "clang": "3.9",
+ },
+ "17": {
+ "gcc": "8",
+ "clang": "7",
+ "apple-clang": "10",
+ "Visual Studio": "15",
+ "msvc": "191",
+ },
+ }.get(self._min_cppstd, {})
def export_sources(self):
export_conandata_patches(self)
+ copy(self, "conan_cmake_project_include.cmake", self.recipe_folder,
os.path.join(self.export_sources_folder, "src"))
def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
- if Version(self.version) < "2.0.0":
- del self.options.simd_level
- del self.options.runtime_simd_level
- elif Version(self.version) < "6.0.0":
- self.options.simd_level = "sse4_2"
- if Version(self.version) < "6.0.0":
- del self.options.with_gcs
- if Version(self.version) < "7.0.0":
- del self.options.skyhook
- del self.options.with_flight_sql
- del self.options.with_opentelemetry
if Version(self.version) < "8.0.0":
del self.options.substrait
+ if is_msvc(self):
+ self.options.with_boost = True
def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")
- def validate(self):
- if self.info.settings.compiler.cppstd:
- check_min_cppstd(self, self._minimum_cpp_standard)
-
- if self._minimum_cpp_standard == 11:
- if self.info.settings.compiler == "clang" and
self.info.settings.compiler.version <= Version("3.9"):
- raise ConanInvalidConfiguration("This recipe does not support
this compiler version")
- else:
- check_min_vs(self, 191)
- if not is_msvc(self):
- minimum_version =
self._compilers_minimum_version.get(str(self.info.settings.compiler), False)
- if minimum_version and
Version(self.info.settings.compiler.version) < minimum_version:
- raise ConanInvalidConfiguration(
- f"{self.ref} requires C++{self._minimum_cpp_standard},
which your compiler does not support."
- )
-
- if self.options.shared:
- del self.options.fPIC
- if self.options.compute == False and not self._compute(True):
- raise ConanInvalidConfiguration("compute options is required (or
choose auto)")
- if self.options.acero == False and not self._acero(True):
- raise ConanInvalidConfiguration("acero options is required (or
choose auto)")
- if self.options.parquet == False and self._parquet(True):
- raise ConanInvalidConfiguration("parquet options is required (or
choose auto)")
- if self.options.dataset_modules == False and
self._dataset_modules(True):
- raise ConanInvalidConfiguration("dataset_modules options is
required (or choose auto)")
- if self.options.get_safe("skyhook", False):
- raise ConanInvalidConfiguration("CCI has no librados recipe (yet)")
- if self.options.with_jemalloc == False and self._with_jemalloc(True):
- raise ConanInvalidConfiguration("with_jemalloc option is required
(or choose auto)")
- if self.options.with_re2 == False and self._with_re2(True):
- raise ConanInvalidConfiguration("with_re2 option is required (or
choose auto)")
- if self.options.with_protobuf == False and self._with_protobuf(True):
- raise ConanInvalidConfiguration("with_protobuf option is required
(or choose auto)")
- if self.options.with_gflags == False and self._with_gflags(True):
- raise ConanInvalidConfiguration("with_gflags options is required
(or choose auto)")
- if self.options.with_flight_rpc == False and
self._with_flight_rpc(True):
- raise ConanInvalidConfiguration("with_flight_rpc options is
required (or choose auto)")
- if self.options.with_grpc == False and self._with_grpc(True):
- raise ConanInvalidConfiguration("with_grpc options is required (or
choose auto)")
- if self.options.with_boost == False and self._with_boost(True):
- raise ConanInvalidConfiguration("with_boost options is required
(or choose auto)")
- if self.options.with_openssl == False and self._with_openssl(True):
- raise ConanInvalidConfiguration("with_openssl options is required
(or choose auto)")
- if self.options.with_llvm == False and self._with_llvm(True):
- raise ConanInvalidConfiguration("with_llvm options is required (or
choose auto)")
- if self.options.with_cuda:
- raise ConanInvalidConfiguration("CCI has no cuda recipe (yet)")
- if self.options.with_orc:
- raise ConanInvalidConfiguration("CCI has no orc recipe (yet)")
- if self.options.with_s3 and not self.options["aws-sdk-cpp"].config:
- raise ConanInvalidConfiguration("arrow:with_s3 requires
aws-sdk-cpp:config is True.")
-
- if self.options.shared and self._with_jemalloc():
- if self.options["jemalloc"].enable_cxx:
- raise ConanInvalidConfiguration("jemmalloc.enable_cxx of a
static jemalloc must be disabled")
-
- if Version(self.version) < "6.0.0" and
self.options.get_safe("simd_level") == "default":
- raise ConanInvalidConfiguration(f"In {self.ref}, simd_level
options is not supported `default` value.")
-
def layout(self):
cmake_layout(self, src_folder="src")
- def _compute(self, required=False):
- if required or self.options.compute == "auto":
- return bool(self._parquet()) or bool(self._acero())
- else:
- return bool(self.options.compute)
-
- def _acero(self, required=False):
- if required or self.options.acero == "auto":
- return bool(self._dataset_modules())
- else:
- return bool(self.options.acero)
-
- def _parquet(self, required=False):
- if required or self.options.parquet == "auto":
- return bool(self.options.get_safe("substrait", False))
- else:
- return bool(self.options.parquet)
-
- def _plasma(self, required=False):
- if Version(self.version) >= "12.0.0":
- return False
- else:
- return required or self.options.plasma
-
- def _dataset_modules(self, required=False):
- if required or self.options.dataset_modules == "auto":
- return bool(self.options.get_safe("substrait", False))
- else:
- return bool(self.options.dataset_modules)
-
- def _with_jemalloc(self, required=False):
- if required or self.options.with_jemalloc == "auto":
- return bool("BSD" in str(self.settings.os))
- else:
- return bool(self.options.with_jemalloc)
-
- def _with_re2(self, required=False):
- if required or self.options.with_re2 == "auto":
- if self.options.gandiva or self.options.parquet:
- return True
- if Version(self) >= "7.0.0" and (self._compute() or
self._dataset_modules()):
- return True
- return False
- else:
- return bool(self.options.with_re2)
-
- def _with_protobuf(self, required=False):
- if required or self.options.with_protobuf == "auto":
- return bool(self.options.gandiva or self._with_flight_rpc() or
self.options.with_orc or self.options.get_safe("substrait", False))
- else:
- return bool(self.options.with_protobuf)
-
- def _with_flight_rpc(self, required=False):
- if required or self.options.with_flight_rpc == "auto":
- return bool(self.options.get_safe("with_flight_sql", False))
- else:
- return bool(self.options.with_flight_rpc)
-
- def _with_gflags(self, required=False):
- if required or self.options.with_gflags == "auto":
- return bool(self._plasma() or self._with_glog() or
self._with_grpc())
- else:
- return bool(self.options.with_gflags)
-
- def _with_glog(self, required=False):
- if required or self.options.with_glog == "auto":
- return False
- else:
- return bool(self.options.with_glog)
-
- def _with_grpc(self, required=False):
- if required or self.options.with_grpc == "auto":
- return self._with_flight_rpc()
- else:
- return bool(self.options.with_grpc)
-
- def _with_boost(self, required=False):
- if required or self.options.with_boost == "auto":
- if self.options.gandiva:
- return True
- version = Version(self.version)
- if version.major == "1":
- if self._parquet() and self.settings.compiler == "gcc" and
self.settings.compiler.version < Version("4.9"):
- return True
- elif version.major >= "2":
- if is_msvc(self):
- return True
- return False
- else:
- return bool(self.options.with_boost)
-
- def _with_thrift(self, required=False):
- # No self.options.with_thrift exists
- return bool(required or self._parquet())
-
- def _with_utf8proc(self, required=False):
- if required or self.options.with_utf8proc == "auto":
- return bool(self._compute() or self.options.gandiva)
- else:
- return bool(self.options.with_utf8proc)
-
- def _with_llvm(self, required=False):
- if required or self.options.with_llvm == "auto":
- return bool(self.options.gandiva)
- else:
- return bool(self.options.with_llvm)
-
- def _with_openssl(self, required=False):
- if required or self.options.with_openssl == "auto":
- return bool(self.options.encryption or self._with_flight_rpc() or
self.options.with_s3)
- else:
- return bool(self.options.with_openssl)
-
- def _with_rapidjson(self):
- if self.options.with_json:
- return True
- if Version(self.version) >= "7.0.0" and self.options.encryption:
- return True
- return False
+ def _requires_rapidjson(self):
+ return self.options.with_json or self.options.encryption
def requirements(self):
- if self._with_thrift():
- self.requires("zlib/1.2.13")
+ if self.options.with_thrift:
self.requires("thrift/0.17.0")
- if self._with_protobuf():
- self.requires("protobuf/3.21.4")
- if self._with_jemalloc():
+ if self.options.with_protobuf:
+ self.requires("protobuf/3.21.9")
+ if self.options.with_jemalloc:
self.requires("jemalloc/5.3.0")
if self.options.with_mimalloc:
self.requires("mimalloc/1.7.6")
- if self._with_boost():
- self.requires("boost/1.80.0")
- if self._with_gflags():
+ if self.options.with_boost:
+ self.requires("boost/1.84.0")
Review Comment:
It seems that the boost version is too high for us.
```
-- [
/home/conan/.conan/data/cmake/3.29.0/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/share/cmake-3.29/Modules/FindBoost.cmake:1821
] _boost_PATH_SUFFIXES =
"boost-1_81_0;boost_1_81_0;boost/boost-1_81_0;boost/boost_1_81_0;boost-1_81;boost_1_81;boost/boost-1_81;boost/boost_1_81;boost-1_80_0;boost_1_80_0;boost/boost-1_80_0;boost/boost_1_80_0;boost-1_80;boost_1_80;boost/boost-1_80;boost/boost_1_80;boost-1_79_0;boost_1_79_0;boost/boost-1_79_0;boost/boost_1_79_0;boost-1_79;boost_1_79;boost/boost-1_79;boost/boost_1_79;boost-1_78_0;boost_1_78_0;boost/boost-1_78_0;boost/boost_1_78_0;boost-1_78;boost_1_78;boost/boost-1_78;boost/boost_1_78;boost-1_77_0;boost_1_77_0;boost/boost-1_77_0;boost/boost_1_77_0;boost-1_77;boost_1_77;boost/boost-1_77;boost/boost_1_77;boost-1_76_0;boost_1_76_0;boost/boost-1_76_0;boost/boost_1_76_0;boost-1_76;boost_1_76;boost/boost-1_76;boost/boost_1_76;boost-1_75_0;boost_1_75_0;boost/boost-1_75_0;boost/boost_1_75_0;boost-1_75;boost_1_75;boost/boost-1_75;boost
/boost_1_75;boost-1_74_0;boost_1_74_0;boost/boost-1_74_0;boost/boost_1_74_0;boost-1_74;boost_1_74;boost/boost-1_74;boost/boost_1_74;boost-1_73_0;boost_1_73_0;boost/boost-1_73_0;boost/boost_1_73_0;boost-1_73;boost_1_73;boost/boost-1_73;boost/boost_1_73;boost-1_72_0;boost_1_72_0;boost/boost-1_72_0;boost/boost_1_72_0;boost-1_72;boost_1_72;boost/boost-1_72;boost/boost_1_72;boost-1_71_0;boost_1_71_0;boost/boost-1_71_0;boost/boost_1_71_0;boost-1_71;boost_1_71;boost/boost-1_71;boost/boost_1_71;boost-1_70_0;boost_1_70_0;boost/boost-1_70_0;boost/boost_1_70_0;boost-1_70;boost_1_70;boost/boost-1_70;boost/boost_1_70;boost-1_69_0;boost_1_69_0;boost/boost-1_69_0;boost/boost_1_69_0;boost-1_69;boost_1_69;boost/boost-1_69;boost/boost_1_69;boost-1_68_0;boost_1_68_0;boost/boost-1_68_0;boost/boost_1_68_0;boost-1_68;boost_1_68;boost/boost-1_68;boost/boost_1_68;boost-1_67_0;boost_1_67_0;boost/boost-1_67_0;boost/boost_1_67_0;boost-1_67;boost_1_67;boost/boost-1_67;boost/boost_1_67;boost-1_66_0;boost_1_66_0
;boost/boost-1_66_0;boost/boost_1_66_0;boost-1_66;boost_1_66;boost/boost-1_66;boost/boost_1_66;boost-1_65_0;boost_1_65_0;boost/boost-1_65_0;boost/boost_1_65_0;boost-1_65;boost_1_65;boost/boost-1_65;boost/boost_1_65;boost-1_64_0;boost_1_64_0;boost/boost-1_64_0;boost/boost_1_64_0;boost-1_64;boost_1_64;boost/boost-1_64;boost/boost_1_64;boost-1_63_0;boost_1_63_0;boost/boost-1_63_0;boost/boost_1_63_0;boost-1_63;boost_1_63;boost/boost-1_63;boost/boost_1_63;boost-1_62_0;boost_1_62_0;boost/boost-1_62_0;boost/boost_1_62_0;boost-1_61;boost_1_61;boost/boost-1_61;boost/boost_1_61;boost-1_61_0;boost_1_61_0;boost/boost-1_61_0;boost/boost_1_61_0;boost-1_62;boost_1_62;boost/boost-1_62;boost/boost_1_62;boost-1_60_0;boost_1_60_0;boost/boost-1_60_0;boost/boost_1_60_0;boost-1_60;boost_1_60;boost/boost-1_60;boost/boost_1_60;boost-1_84_0;boost_1_84_0;boost/boost-1_84_0;boost/boost_1_84_0;boost-1_84;boost_1_84;boost/boost-1_84;boost/boost_1_84;boost-1_83_0;boost_1_83_0;boost/boost-1_83_0;boost/boost_1_83_
0;boost-1_83;boost_1_83;boost/boost-1_83;boost/boost_1_83;boost-1_82_0;boost_1_82_0;boost/boost-1_82_0;boost/boost_1_82_0;boost-1_82;boost_1_82;boost/boost-1_82;boost/boost_1_82;boost-1_81_0;boost_1_81_0;boost/boost-1_81_0;boost/boost_1_81_0;boost-1_81;boost_1_81;boost/boost-1_81;boost/boost_1_81;boost-1_80_0;boost_1_80_0;boost/boost-1_80_0;boost/boost_1_80_0;boost-1_80;boost_1_80;boost/boost-1_80;boost/boost_1_80;boost-1_79_0;boost_1_79_0;boost/boost-1_79_0;boost/boost_1_79_0;boost-1_79;boost_1_79;boost/boost-1_79;boost/boost_1_79;boost-1_78_0;boost_1_78_0;boost/boost-1_78_0;boost/boost_1_78_0;boost-1_78;boost_1_78;boost/boost-1_78;boost/boost_1_78;boost-1_77_0;boost_1_77_0;boost/boost-1_77_0;boost/boost_1_77_0;boost-1_77;boost_1_77;boost/boost-1_77;boost/boost_1_77;boost-1_76_0;boost_1_76_0;boost/boost-1_76_0;boost/boost_1_76_0;boost-1_76;boost_1_76;boost/boost-1_76;boost/boost_1_76;boost-1_75_0;boost_1_75_0;boost/boost-1_75_0;boost/boost_1_75_0;boost-1_75;boost_1_75;boost/boost-1
_75;boost/boost_1_75;boost-1_74_0;boost_1_74_0;boost/boost-1_74_0;boost/boost_1_74_0;boost-1_74;boost_1_74;boost/boost-1_74;boost/boost_1_74;boost-1_73_0;boost_1_73_0;boost/boost-1_73_0;boost/boost_1_73_0;boost-1_73;boost_1_73;boost/boost-1_73;boost/boost_1_73;boost-1_72_0;boost_1_72_0;boost/boost-1_72_0;boost/boost_1_72_0;boost-1_72;boost_1_72;boost/boost-1_72;boost/boost_1_72;boost-1_71_0;boost_1_71_0;boost/boost-1_71_0;boost/boost_1_71_0;boost-1_71;boost_1_71;boost/boost-1_71;boost/boost_1_71;boost-1_70_0;boost_1_70_0;boost/boost-1_70_0;boost/boost_1_70_0;boost-1_70;boost_1_70;boost/boost-1_70;boost/boost_1_70;boost-1_69_0;boost_1_69_0;boost/boost-1_69_0;boost/boost_1_69_0;boost-1_69;boost_1_69;boost/boost-1_69;boost/boost_1_69;boost-1_68_0;boost_1_68_0;boost/boost-1_68_0;boost/boost_1_68_0;boost-1_68;boost_1_68;boost/boost-1_68;boost/boost_1_68;boost-1_67_0;boost_1_67_0;boost/boost-1_67_0;boost/boost_1_67_0;boost-1_67;boost_1_67;boost/boost-1_67;boost/boost_1_67;boost-1_66_0;boo
st_1_66_0;boost/boost-1_66_0;boost/boost_1_66_0;boost-1_66;boost_1_66;boost/boost-1_66;boost/boost_1_66;boost-1_65_1;boost_1_65_1;boost/boost-1_65_1;boost/boost_1_65_1;boost-1_65_0;boost_1_65_0;boost/boost-1_65_0;boost/boost_1_65_0;boost-1_65;boost_1_65;boost/boost-1_65;boost/boost_1_65;boost-1_64_0;boost_1_64_0;boost/boost-1_64_0;boost/boost_1_64_0;boost-1_64;boost_1_64;boost/boost-1_64;boost/boost_1_64;boost-1_63_0;boost_1_63_0;boost/boost-1_63_0;boost/boost_1_63_0;boost-1_63;boost_1_63;boost/boost-1_63;boost/boost_1_63;boost-1_62_0;boost_1_62_0;boost/boost-1_62_0;boost/boost_1_62_0;boost-1_62;boost_1_62;boost/boost-1_62;boost/boost_1_62;boost-1_61_0;boost_1_61_0;boost/boost-1_61_0;boost/boost_1_61_0;boost-1_61;boost_1_61;boost/boost-1_61;boost/boost_1_61;boost-1_60_0;boost_1_60_0;boost/boost-1_60_0;boost/boost_1_60_0;boost-1_60;boost_1_60;boost/boost-1_60;boost/boost_1_60;boost-1_59_0;boost_1_59_0;boost/boost-1_59_0;boost/boost_1_59_0;boost-1_59;boost_1_59;boost/boost-1_59;boost/
boost_1_59;boost-1_58_0;boost_1_58_0;boost/boost-1_58_0;boost/boost_1_58_0;boost-1_58;boost_1_58;boost/boost-1_58;boost/boost_1_58"
-- [
/home/conan/.conan/data/cmake/3.29.0/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/share/cmake-3.29/Modules/FindBoost.cmake:1906
] Boost_LIB_PREFIX = ""
-- [
/home/conan/.conan/data/cmake/3.29.0/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/share/cmake-3.29/Modules/FindBoost.cmake:1907
] Boost_NAMESPACE = "boost"
-- [
/home/conan/.conan/data/cmake/3.29.0/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/share/cmake-3.29/Modules/FindBoost.cmake:953
] _boost_COMPILER = "-gcc" (guessed)
-- [
/home/conan/.conan/data/cmake/3.29.0/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/share/cmake-3.29/Modules/FindBoost.cmake:1943
] _boost_MULTITHREADED = "-mt"
-- [
/home/conan/.conan/data/cmake/3.29.0/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/share/cmake-3.29/Modules/FindBoost.cmake:2021
] _boost_ARCHITECTURE_TAG = "" (detected)
-- [
/home/conan/.conan/data/cmake/3.29.0/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/share/cmake-3.29/Modules/FindBoost.cmake:2025
] _boost_RELEASE_ABI_TAG = "-"
-- [
/home/conan/.conan/data/cmake/3.29.0/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/share/cmake-3.29/Modules/FindBoost.cmake:2026
] _boost_DEBUG_ABI_TAG = "-d"
-- [
/home/conan/.conan/data/cmake/3.29.0/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/share/cmake-3.29/Modules/FindBoost.cmake:2086
] _boost_LIBRARY_SEARCH_DIRS_RELEASE =
"Boost_INCLUDE_DIR-NOTFOUND/lib;Boost_INCLUDE_DIR-NOTFOUND/../lib;Boost_INCLUDE_DIR-NOTFOUND/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
CMake Error at
/home/conan/.conan/data/cmake/3.29.0/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:230
(message):
Could NOT find Boost (missing: Boost_INCLUDE_DIR) (Required is at least
version "1.58")
Call Stack (most recent call first):
/home/conan/.conan/data/cmake/3.29.0/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:600
(_FPHSA_FAILURE_MESSAGE)
/home/conan/.conan/data/cmake/3.29.0/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/share/cmake-3.29/Modules/FindBoost.cmake:2393
(find_package_handle_standard_args)
cmake_modules/ThirdpartyToolchain.cmake:310 (find_package)
cmake_modules/ThirdpartyToolchain.cmake:1288 (resolve_dependency)
CMakeLists.txt:543 (include)
-- [
/home/conan/.conan/data/cmake/3.29.0/_/_/package/4db1be536558d833e52e862fd84d64d75c2b3656/share/cmake-3.29/Modules/FindBoost.cmake:2087
] _boost_LIBRARY_SEARCH_DIRS_DEBUG =
"Boost_INCLUDE_DIR-NOTFOUND/lib;Boost_INCLUDE_DIR-NOTFOUND/../lib;Boost_INCLUDE_DIR-NOTFOUND/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
```
--
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]