apache / apache/arrow

[C++] Test, fix, and document debug builds with vcpkg packages

Open
#27,647 4 comments 0 reactions 0 assignees View on GitHub
Component: C++ Type: task
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

ARROW-11580 makes it straightforward to use vcpkg for dependencies. This has been well-tested with **release** builds, but there are some loose ends with **debug** builds. vcpkg installs debug libraries for the dependencies, but there are some problems linking them when `-DCMAKE_BUILD_TYPE=DEBUG`. I was able to get a debug build to succeed on Windows with VS 2019 by turning some features off
```java

-DARROW_FLIGHT=OFF ^
-DARROW_GANDIVA=OFF ^
-DARROW_WITH_THRIFT=OFF ^
-DARROW_PARQUET=OFF ^
```
but there were linking errors when I turned any of those on. I think some of these errors can be resolved by setting additional `\*\_MSVC\_\*` prefix/suffix variables or by working around limitations of which dependencies vcpkg can and cannot install as dynamic link libraries.

I tested this after installing dynamic link libraries with vcpkg and with `-DARROW_DEPENDENCY_USE_SHARED=ON`. We should also test debug builds with static dependencies and on Linux and Mac.

**Reporter**: [Ian Cook](https://issues.apache.org/jira/browse/ARROW-11796) / @ianmcook
#### Related issues:
- [[C++] Cannot build debug with MSVC and vcpkg](https://github.com/apache/arrow/issues/30897) (relates to)
- [[C++][Doc] Improve Developing on Windows docs](https://github.com/apache/arrow/issues/27233) (relates to)
- [[C++] Add CMake option ARROW_DEPENDENCY_SOURCE=VCPKG](https://github.com/apache/arrow/issues/27450) (depends upon)

**Note**: *This issue was originally created as [ARROW-11796](https://issues.apache.org/jira/browse/ARROW-11796). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

Contributor guide

Open the contributing guide

Research direction

Start with the CMake/vcpkg configuration and the listed ARROW_FLIGHT, ARROW_GANDIVA, ARROW_WITH_THRIFT, and ARROW_PARQUET feature flags. Reproduce debug builds with shared and static dependencies on Windows, Linux, and macOS, then investigate the linker failures. Done means the relevant debug configurations build successfully and the supported setup is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system, documentation, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.