[
https://issues.apache.org/jira/browse/ARROW-16993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17563500#comment-17563500
]
Kouhei Sutou commented on ARROW-16993:
--------------------------------------
Thanks.
{noformat}
-- Could NOT find Boost: missing: system filesystem (found
/usr/local/lib/cmake/Boost-1.76.0/BoostConfig.cmake (found suitable version
"1.76.0", minimum required is "1.58"))
{noformat}
is the root cause. You have system Boost but it doesn't include system and
filesystem components. So {{Boost::headers}} is loaded but system Boost
detection is failed. If system Boost detection is failed, we use bundled Boost
and create {{Boost::headers}} for bundled Boost but {{Boost::headers}} already
exists. It causes this error.
CMake doesn't provide a feature to remove a created target
({{Boost::headers}}). We may be able to support this case by reusing
(overriding) {{Boost::headers}} defined by system Boost but it may not be a
good CMake manner...
I think that installing Boost's system and filesystem components to your system
is the best solution for this case for now.
> [C++] cmake: `cannot create imported target "Boost::headers"`
> -------------------------------------------------------------
>
> Key: ARROW-16993
> URL: https://issues.apache.org/jira/browse/ARROW-16993
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++
> Reporter: Jefferson Carpenter
> Assignee: Kouhei Sutou
> Priority: Major
> Attachments: CMakeError.log, CMakeOutput.log, cmake_stdout.txt
>
>
> Hi,
> I just tried to build arrow/cpp using cmake, and on the master branch I get
> the error
>
> {code:java}
> arrow-build $ cmake -DARROW_PARQUET=ON -DCMAKE_BUILD_TYPE=DEBUG ../arrow/cpp/
> ...
> CMake Error at cmake_modules/ThirdpartyToolchain.cmake:873 (add_library):
> add_library cannot create imported target "Boost::headers" because another
> target with the same name already exists.
> Call Stack (most recent call first):
> cmake_modules/ThirdpartyToolchain.cmake:139 (build_boost)
> cmake_modules/ThirdpartyToolchain.cmake:236 (build_dependency)
> cmake_modules/ThirdpartyToolchain.cmake:1014 (resolve_dependency)
> CMakeLists.txt:552 (include)
> ...
> -- Configuring incomplete, errors occurred!
> See also "/app/arrow-build/CMakeFiles/CMakeOutput.log".
> See also "/app/arrow-build/CMakeFiles/CMakeError.log".{code}
> and CMake exits with status 1. The project configures successfully on the
> apache-arrow-8.0.0 tag. Running a git bisect, the defect was introduced in
> the commit:
> {noformat}
> d653b71d79fc381c43f59d3095cc1c9fb0c1cf7c
> ARROW-16168: [C++][CMake] Use target to add include paths{noformat}
> I have attached CMakeOutput.log and CMakeError.log.
> Thanks!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)