-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[C++] Error when building Arrow-CPP w/ Azure Filesystem for Conda-Forge #41990
Comments
Ah, using Could you try this? diff --git a/cpp/src/arrow/filesystem/azurefs.cc b/cpp/src/arrow/filesystem/azurefs.cc
index bb8309a247..b4975a3098 100644
--- a/cpp/src/arrow/filesystem/azurefs.cc
+++ b/cpp/src/arrow/filesystem/azurefs.cc
@@ -1398,19 +1398,14 @@ class AzureFileSystem::Impl {
std::unique_ptr<Blobs::BlobServiceClient> blob_service_client_;
HNSSupport cached_hns_support_ = HNSSupport::kUnknown;
+ public:
Impl(AzureOptions options, io::IOContext io_context)
: io_context_(std::move(io_context)), options_(std::move(options)) {}
- public:
- static Result<std::unique_ptr<AzureFileSystem::Impl>> Make(AzureOptions options,
- io::IOContext io_context) {
- auto self = std::unique_ptr<AzureFileSystem::Impl>(
- new AzureFileSystem::Impl(std::move(options), std::move(io_context)));
- ARROW_ASSIGN_OR_RAISE(self->blob_service_client_,
- self->options_.MakeBlobServiceClient());
- ARROW_ASSIGN_OR_RAISE(self->datalake_service_client_,
- self->options_.MakeDataLakeServiceClient());
- return self;
+ Status Init() {
+ ARROW_ASSIGN_OR_RAISE(blob_service_client_, options_.MakeBlobServiceClient());
+ ARROW_ASSIGN_OR_RAISE(datalake_service_client_, options_.MakeDataLakeServiceClient());
+ return Status::OK();
}
io::IOContext& io_context() { return io_context_; }
@@ -2893,19 +2888,23 @@ class AzureFileSystem::Impl {
std::atomic<LeaseGuard::SteadyClock::time_point> LeaseGuard::latest_known_expiry_time_ =
SteadyClock::time_point{SteadyClock::duration::zero()};
-AzureFileSystem::AzureFileSystem(std::unique_ptr<Impl>&& impl)
- : FileSystem(impl->io_context()), impl_(std::move(impl)) {
+AzureFileSystem::AzureFileSystem(const AzureOptions& options,
+ const io::IOContext& io_context)
+ : FileSystem(io_context), impl_(std::make_unique<Impl>(options, io_context)) {
default_async_is_sync_ = false;
}
+Status AzureFileSystem::Init() { return impl_->Init(); }
+
void AzureFileSystem::ForceCachedHierarchicalNamespaceSupport(int hns_support) {
impl_->ForceCachedHierarchicalNamespaceSupport(hns_support);
}
Result<std::shared_ptr<AzureFileSystem>> AzureFileSystem::Make(
const AzureOptions& options, const io::IOContext& io_context) {
- ARROW_ASSIGN_OR_RAISE(auto impl, AzureFileSystem::Impl::Make(options, io_context));
- return std::shared_ptr<AzureFileSystem>(new AzureFileSystem(std::move(impl)));
+ std::shared_ptr<AzureFileSystem> filesystem(new AzureFileSystem(options, io_context));
+ ARROW_RETURN_NOT_OK(filesystem->Init());
+ return filesystem;
}
const AzureOptions& AzureFileSystem::options() const { return impl_->options(); }
diff --git a/cpp/src/arrow/filesystem/azurefs.h b/cpp/src/arrow/filesystem/azurefs.h
index 350014954f..2f6ecb53a1 100644
--- a/cpp/src/arrow/filesystem/azurefs.h
+++ b/cpp/src/arrow/filesystem/azurefs.h
@@ -232,7 +232,8 @@ class ARROW_EXPORT AzureFileSystem : public FileSystem {
class Impl;
std::unique_ptr<Impl> impl_;
- explicit AzureFileSystem(std::unique_ptr<Impl>&& impl);
+ explicit AzureFileSystem(const AzureOptions& options, const io::IOContext& io_context);
+ Status Init();
friend class TestAzureFileSystem;
void ForceCachedHierarchicalNamespaceSupport(int hns_support); |
Thanks for the patch! It leads to:
I'll try switching off unity builds next... |
Without unity build:
|
I've started a new attempt at fixing this on windows. If you have any other ideas for how to fix this, I'd be very happy to try an updated patch. |
Thanks. It still failed... It seems that we need to break down this problem. For example, we can enable Azure support on our Windows CI job to detect whether this is a conda specific problem or not. |
Tested with v17, failure persists. |
Error persists with arrow v18 |
Describe the bug, including details regarding any error messages, version, and platform.
In this PR (conda-forge/arrow-cpp-feedstock#1431), I attempted to modify the Conda recipe to add the necessary dependencies for packaging the Azure filesystem in the
arrow-cpp
packages on conda-forge. I was able to successfully build the package for Linux and MacOS, but ran into an error when compiling on MSVC:I'm not familiar with Windows / MSVC so need some help debugging.
Component(s)
C++
The text was updated successfully, but these errors were encountered: