ARROW-15415: [C++] Fixes for MSVC + vcpkg Debug build#13108
Conversation
|
I have been working with these changes in my local, but there is one final error I haven't been able to figure out how to fix. arrow/cpp/src/arrow/util/tracing.h Line 64 in d00caa9 I am able to get this to work if I change it to a This build is configured with |
There was a problem hiding this comment.
+1 to this change. I had noticed it myself but hadn't gotten around to making a PR.
|
For the tracing impl incomplete type issue, it seemed like the fix was to make sure that any file with the line: #include "arrow/compute/exec/exec_plan.h" // contains #include "arrow/util/tracing.h"Also has the line #include "arrow/util/tracing_internal.h" |
Hmm, isn't that a problem? |
|
It seems something else is implicitly using |
|
Shouldn't we be able to remove |
|
@github-actions crossbow submit test-build-vcpkg-win |
@westonpace Worked before I rebase, but looks like #13040 introduced a reference to arrow/cpp/src/arrow/dataset/file_base.cc Line 486 in 5f7a5a4 Should I replace that with something like below? arrow/cpp/src/arrow/dataset/file_csv.cc Lines 182 to 185 in 5f7a5a4 |
|
Revision: ff8cb17419d49121507a640c43e4f9f894fb2efd Submitted crossbow builds: ursacomputing/crossbow @ actions-2102
|
|
Ah, that will be a problem. Well, |
I'm not sure what you mean by this. It seems like we want to have |
|
@github-actions crossbow submit test-build-vcpkg-win |
|
Revision: 95b93a29f997ff47da8c644848f604c2ca6fb6d1 Submitted crossbow builds: ursacomputing/crossbow @ actions-c95608c96f
|
Then you can make the Or we just create our own |
| std::shared_ptr<const KeyValueMetadata> metadata = NULLPTR) | ||
| : ExecPlan(exec_context), metadata_(std::move(metadata)) {} | ||
| : ExecPlan(exec_context), metadata_(std::move(metadata)) { | ||
| span_ = arrow::internal::tracing::OTSpan(); |
There was a problem hiding this comment.
I'm not sure why, but we segfault in the first line of StartProducing(). I believe this is because I am not initialized span_ correctly. In the header file, it's type is is the public Span class arrow::util::tracing::Span, but for the macros to work it needs to be initialized as an arrow::internal::tracing::OTSpan so that is has the shared_ptr field. (When the spans are used just internally, I was able to solve this same segfault by switching the declaration to OTSpan, but that won't work for the member variables.)
Any idea what might be going wrong?
There was a problem hiding this comment.
How about something like this: westonpace@85090cc
Then we can still use span but the details are hidden.
There was a problem hiding this comment.
Thanks, Weston. That works much better.
Co-authored-by: Weston Pace <weston.pace@gmail.com>
|
This builds and tests successfully on my local Windows setup now. |
westonpace
left a comment
There was a problem hiding this comment.
Big thanks for doing this. These issues have been a pain in my side every time I need to build on Windows. I'm glad you figured out the Thrift one because I was never able to get that working.
|
@lidavidm can you take a look at the OT changes? |
|
Also, CC @mbrobbel |
These are the changes needed for me to be able to compile Arrow in MSCV (from Visual Studio 2022) with the following CMakeUserPresets entry:
{ "name": "user-cpp-debug-mscv", "inherits": [ "ninja-debug"], "cacheVariables": { "ARROW_DEPENDENCY_SOURCE": "VCPKG", "CMAKE_BUILD_TYPE": "Debug", "VCPKG_TARGET_TRIPLET": "x64-windows", "VCPKG_LIBRARY_LINKAGE": "dynamic", "ARROW_DEPENDENCY_USE_SHARED": "ON", "ARROW_BUILD_EXAMPLES": "ON" } }