[ https://issues.apache.org/jira/browse/ARROW-16993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17578131#comment-17578131 ]
Neal Richardson commented on ARROW-16993: ----------------------------------------- I think these lines should be conditional on {{ARROW_BOOST_REQUIRE_LIBRARY}} because we don't need boost::system and boost::filesystem if we only need the headers: https://github.com/apache/arrow/blob/master/cpp/cmake_modules/ThirdpartyToolchain.cmake#L1025-L1027 We currently set and use {{ARROW_BOOST_REQUIRE_LIBRARY}} in the build_boost macro, but it has no effect on the find_package step or anything after it, and that seems off. > [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)