[
https://issues.apache.org/jira/browse/ARROW-13470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17480335#comment-17480335
]
Will Jones commented on ARROW-13470:
------------------------------------
I've just encountered this on Windows too. Adding {{message("Python libs:
${PYTHON_LIBRARIES}")}} to line 73 in
[cpp/src/arrow/python|https://github.com/apache/arrow/blob/master/cpp/src/arrow/python/CMakeLists.txt#L72]
yields this on Windows:
{code}
[cmake] Python libs:
optimized;C:/Users/voltron/AppData/Local/Programs/Python/Python310/libs/python310.lib;debug;C:/Users/voltron/AppData/Local/Programs/Python/Python310/libs/python310_d.lib
{code}
But this on my Mac:
{code}
[cmake] Python libs: /Users/willjones/.pyenv/versions/3.8.12/lib/libpython3.8.a
{code}
I installed Python on Windows with debug symbols and debug library, and it
seems that CMake is wanting to pass both the the linker. (I was getting an
error trying to do a debug build on Windows without the Python debug library,
which is why I reinstalled Python with that included.) However, I don't think
this line of {{add_arrow_lib()}} is prepared for that:
https://github.com/apache/arrow/blob/e291d0f408df588048b6971819fc4e65b0093154/cpp/cmake_modules/BuildUtils.cmake#L373
> Build fails on windows with ARROW_PYTHON=ON
> -------------------------------------------
>
> Key: ARROW-13470
> URL: https://issues.apache.org/jira/browse/ARROW-13470
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Affects Versions: 4.0.0, 4.0.1
> 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
> Priority: Major
> Attachments: log1.txt, log2.txt
>
>
> The build fails with the following error when ARROW_PYTHON=ON.
>
> {code:java}
> LINK : fatal error LNK1104: cannot open file 'optimized.lib'{code}
> Possible cause:
> Cmake's target_link_libararies accepts *optimized* as a build config.
> {code:java}
> target_link_libraries(<target> [item1 [item2 [...]]]
> [[debug|optimized|general] <item>] ...){code}
> Seems this flag is considered as a library name in the build.
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)