Build fails on windows with ARROW_PYTHON=ON
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
The build fails with the following error when ARROW_PYTHON=ON.
```java
LINK : fatal error LNK1104: cannot open file 'optimized.lib'
```
Possible cause:
Cmake's target_link_libararies accepts **optimized** as a build config.
```java
target_link_libraries( [item1 [item2 [...]]] [[debug|optimized|general] ] ...)
```
Seems this flag is considered as a library name in the build.
**Environment**: OS: Windows 10
Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
System processor: AMD64
Generator: Visual Studio 16 2019
**Reporter**: [Chathura Widanage](https://issues.apache.org/jira/browse/ARROW-13470) / @chathurawidanage
#### Related issues:
- [[C++] Cannot build debug with MSVC and vcpkg](https://github.com/apache/arrow/issues/30897) (relates to)
#### Original Issue Attachments:
- [log1.txt](https://issues.apache.org/jira/secure/attachment/13031130/log1.txt)
- [log2.txt](https://issues.apache.org/jira/secure/attachment/13031131/log2.txt)
**Note**: *This issue was originally created as [ARROW-13470](https://issues.apache.org/jira/browse/ARROW-13470). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*
Contributor guide
Research direction
Reproduce the Windows build with ARROW_PYTHON=ON using the reported Visual Studio 2019 environment, then inspect the CMake target_link_libraries usage implicated by the optimized.lib linker error. Done means the configuration links successfully without treating optimized as a library name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, python
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100