So I got this working by adding the following two lines to CMakeLists.txt:

"

*diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt*

*index fd7027c30..ad9797263 100644*

*--- a/cpp/CMakeLists.txt*

*+++ b/cpp/CMakeLists.txt*

@@ -163,6 +163,8 @@ endif()



 find_package(ClangTools)

 find_package(InferTools)

+find_package(Boost)

+find_package(GTest)

 if("$ENV{CMAKE_EXPORT_COMPILE_COMMANDS}" STREQUAL "1"

    OR CLANG_TIDY_FOUND

    OR INFER_FOUND)
"

But then got this error when running ninja to build it:
"""

[179/442] Building CXX object
src/arrow/CMakeFiles/arrow_objlib.dir/compute/kernels/scalar_string_utf8.cc.o

FAILED:
src/arrow/CMakeFiles/arrow_objlib.dir/compute/kernels/scalar_string_utf8.cc.o


/usr/local/bin/ccache
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-DARROW_EXPORTING -DARROW_EXTRA_ERROR_CONTEXT -DARROW_HAVE_RUNTIME_AVX2
-DARROW_HAVE_RUNTIME_AVX512 -DARROW_HAVE_RUNTIME_BMI2
-DARROW_HAVE_RUNTIME_SSE4_2 -DARROW_HAVE_SSE4_2 -DARROW_JEMALLOC
-DARROW_JEMALLOC_INCLUDE_DIR="" -DARROW_WITH_BACKTRACE
-DARROW_WITH_TIMING_TESTS -DURI_STATIC_BUILD
-I/Users/icexelloss/workspace/arrow/cpp/build/src
-I/Users/icexelloss/workspace/arrow/cpp/src
-I/Users/icexelloss/workspace/arrow/cpp/src/generated -isystem
/Users/icexelloss/workspace/arrow/cpp/thirdparty/flatbuffers/include
-isystem /usr/local/include -isystem
/Users/icexelloss/workspace/arrow/cpp/build/jemalloc_ep-prefix/src -isystem
/usr/local/Cellar/rapidjson/1.1.0/include -isystem
/Users/icexelloss/workspace/arrow/cpp/build/xsimd_ep/src/xsimd_ep-install/include
-isystem /Users/icexelloss/workspace/arrow/cpp/thirdparty/hadoop/include
-Qunused-arguments -fcolor-diagnostics -ggdb -O0  -Wall -Wextra
-Wdocumentation -Wno-missing-braces -Wno-unused-parameter
-Wno-constant-logical-operand -Werror -Wno-unknown-warning-option
-Wno-pass-failed -stdlib=libc++ -msse4.2  -g -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk
-fPIC -std=c++11 -MD -MT
src/arrow/CMakeFiles/arrow_objlib.dir/compute/kernels/scalar_string_utf8.cc.o
-MF
src/arrow/CMakeFiles/arrow_objlib.dir/compute/kernels/scalar_string_utf8.cc.o.d
-o
src/arrow/CMakeFiles/arrow_objlib.dir/compute/kernels/scalar_string_utf8.cc.o
-c
/Users/icexelloss/workspace/arrow/cpp/src/arrow/compute/kernels/scalar_string_utf8.cc

In file included from
/Users/icexelloss/workspace/arrow/cpp/src/arrow/compute/kernels/scalar_string_utf8.cc:26:

*/Users/icexelloss/workspace/arrow/cpp/src/arrow/compute/kernels/scalar_string_internal.h:216:20:
**error: **unused function 'StringClassifyDoc' [-Werror,-Wunused-function]*

static FunctionDoc StringClassifyDoc(std::string class_summary, std::string
class_desc,

*                   ^*

1 error generated
"""

I wonder what's the best way to deal with this?

On Wed, Feb 2, 2022 at 9:44 AM Li Jin <ice.xell...@gmail.com> wrote:

> Also tried to test a basic CMake file with boost on my machine and it
> appears to find it
>
> CMakeLists.txt
> "
>
> find_package(Boost COMPONENTS program_options REQUIRED)
>
>
> add_executable(main main.cpp)
>
>
> target_link_libraries(main Boost::program_options)
>
> "
>
>
> Log:
> "
>
> -- The C compiler identification is AppleClang 12.0.0.12000032
>
> -- The CXX compiler identification is AppleClang 12.0.0.12000032
>
> -- Detecting C compiler ABI info
>
> -- Detecting C compiler ABI info - done
>
> -- Check for working C compiler:
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
> - skipped
>
> -- Detecting C compile features
>
> -- Detecting C compile features - done
>
> -- Detecting CXX compiler ABI info
>
> -- Detecting CXX compiler ABI info - done
>
> -- Check for working CXX compiler:
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
> - skipped
>
> -- Detecting CXX compile features
>
> -- Detecting CXX compile features - done
>
> -- Found Boost: /usr/local/lib/cmake/Boost-1.76.0/BoostConfig.cmake (found
> version "1.76.0") found components: program_options
>
> "
>
> On Wed, Feb 2, 2022 at 9:32 AM Li Jin <ice.xell...@gmail.com> wrote:
>
>> Yep, Here it is!
>>
>> https://gist.github.com/icexelloss/db0e5df214addd63dc4ab0570ca7ee30
>>
>> On Tue, Feb 1, 2022 at 6:28 PM Sutou Kouhei <k...@clear-code.com> wrote:
>>
>>> Hi,
>>>
>>> Could you upload the log to something such as
>>> https://gist.github.com/ and share the URL?
>>>
>>>
>>> Thanks,
>>> --
>>> kou
>>>
>>> In <CAGY9duXDJJfGgGNg5=_-w-o+th+O3o=awyainxdkxho+oqu...@mail.gmail.com>
>>>   "Re: Building Arrow Cpp: Cannot find Boost on MacOS" on Tue, 1 Feb
>>> 2022 16:47:45 -0500,
>>>   Li Jin <ice.xell...@gmail.com> wrote:
>>>
>>> > Hi!
>>> >
>>> > I ran
>>> >
>>> > "cmake .. -DARROW_BUILD_TESTS=ON -DARROW_COMPUTE=ON -DARROW_DATASET=ON
>>> > -DCMAKE_BUILD_TYPE=Debug -DCMAKE_FIND_DEBUG_MODE=ON"
>>> >
>>> > and here is the log.
>>> >
>>> > Perhaps Cmake cannot find where Brew installed this by default? (Just
>>> > guessing, new to CMake too..)
>>> >
>>> > Li
>>> >
>>> > On Tue, Feb 1, 2022 at 4:30 PM Sutou Kouhei <k...@clear-code.com>
>>> wrote:
>>> >
>>> >> Hi,
>>> >>
>>> >> Could you run cmake with -DCMAKE_FIND_DEBUG_MODE=ON and
>>> >> share log of it?
>>> >>
>>> >>
>>> >> FYI: Boost 1.76.0 is found in our CI:
>>> >>
>>> >>
>>> >>
>>> https://github.com/apache/arrow/runs/5017148285?check_suite_focus=true#step:7:183
>>> >>
>>> >>   -- Found Boost: /usr/local/lib/cmake/Boost-1.76.0/BoostConfig.cmake
>>> >> (found suitable version "1.76.0", minimum required is "1.64") found
>>> >> components: system filesystem
>>> >>   -- Boost include dir: /usr/local/include
>>> >>   -- Boost libraries: Boost::system;Boost::filesystem
>>> >>
>>> >>
>>> >> Thanks,
>>> >> --
>>> >> kou
>>> >>
>>> >> In <CAGY9duW=
>>> utrsxvd+-uawh5jehzaaejj_exgtz6fhzvdnxpp...@mail.gmail.com>
>>> >>   "Building Arrow Cpp: Cannot find Boost on MacOS" on Tue, 1 Feb 2022
>>> >> 16:18:13 -0500,
>>> >>   Li Jin <ice.xell...@gmail.com> wrote:
>>> >>
>>> >> > Hello!
>>> >> >
>>> >> > I am new to the Arrow cpp code and play with it a little.
>>> Unfortunately I
>>> >> > hit this error when trying to cmake with preset
>>> "ninja-debug-basic". I
>>> >> > wonder if anyone else has hit an similar issue?
>>> >> >
>>> >> > cmake .. --preset ninja-debug-basic
>>> >> >
>>> >> > ...
>>> >> >
>>> >> > -- ARROW_ZSTD_BUILD_VERSION: v1.5.1
>>> >> >
>>> >> > -- ARROW_ZSTD_BUILD_SHA256_CHECKSUM:
>>> >> > dc05773342b28f11658604381afd22cb0a13e8ba17ff2bd7516df377060c18dd
>>> >> >
>>> >> > CMake Error at
>>> >> >
>>> >>
>>> /usr/local/Cellar/cmake/3.22.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230
>>> >> > (message):
>>> >> >
>>> >> >   Could NOT find Boost (missing: Boost_INCLUDE_DIR system
>>> filesystem)
>>> >> >
>>> >> >   (Required is at least version "1.58")
>>> >> >
>>> >> > Call Stack (most recent call first):
>>> >> >
>>> >> >
>>> >>
>>> /usr/local/Cellar/cmake/3.22.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594
>>> >> > (_FPHSA_FAILURE_MESSAGE)
>>> >> >
>>> >> >
>>>  /usr/local/Cellar/cmake/3.22.2/share/cmake/Modules/FindBoost.cmake:2375
>>> >> > (find_package_handle_standard_args)
>>> >> >
>>> >> >   cmake_modules/FindBoostAlt.cmake:41 (find_package)
>>> >> >
>>> >> >   cmake_modules/ThirdpartyToolchain.cmake:241 (find_package)
>>> >> >
>>> >> >   cmake_modules/ThirdpartyToolchain.cmake:956 (resolve_dependency)
>>> >> >
>>> >> >   CMakeLists.txt:554 (include)
>>> >> >
>>> >> >
>>> >> > I installed boost via HomeBrew under
>>> "/usr/local/Cellar/boost/1.76.0/"
>>> >> but
>>> >> > I am not really familiar with where cmake looks for boost
>>> dependency..
>>> >> >
>>> >> >
>>> >> > Much appreciated,
>>> >> >
>>> >> > Li
>>> >>
>>>
>>

Reply via email to