You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "j-bennet (via GitHub)" <gi...@apache.org> on 2023/03/08 04:04:41 UTC

[GitHub] [arrow] j-bennet commented on issue #14779: [C++] Compiling failed on Mac M1

j-bennet commented on issue #14779:
URL: https://github.com/apache/arrow/issues/14779#issuecomment-1459388250

   I have a similar error (not quite the same) on a Mac M2. I'm new to `pyarrow`, and especially to C++ builds. I was trying to build using `ninja-debug-python` preset:
   
   ```
   > cmake --build .
   [304/631] Linking CXX shared library debug/libarrow.1200.0.0.dylib
   ld: warning: -pie being ignored. It is only used when linking a main executable
   [307/631] Linking CXX shared library debug/libarrow_testing.1200.0.0.dylib
   ld: warning: -pie being ignored. It is only used when linking a main executable
   [353/631] Linking CXX executable debug/arrow-array-test
   FAILED: debug/arrow-array-test
   : && /Users/jbennet/mambaforge/envs/pyarrow-dev/bin/arm64-apple-darwin20.0.0-clang++ -fno-aligned-new -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem /Users/jbennet/mambaforge/envs/pyarrow-dev/include -Qunused-arguments -fcolor-diagnostics  -Wall -Wextra -Wdocumentation -Wshorten-64-to-32 -Wno-missing-braces -Wno-unused-parameter -Wno-constant-logical-operand -Wno-return-stack-address -Wno-unknown-warning-option -Wno-pass-failed -march=armv8-a  -g -Werror -O0 -ggdb -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/jbennet/mambaforge/envs/pyarrow-dev/lib -L/Users/jbennet/mambaforge/envs/pyarrow-dev/lib src/arrow/CMakeFiles/arrow-array-test.dir/array/array_test.cc.o src/arrow/CMakeFiles/arrow-array-test.dir/array/array_binary_test.cc.o 
 src/arrow/CMakeFiles/arrow-array-test.dir/array/array_dict_test.cc.o src/arrow/CMakeFiles/arrow-array-test.dir/array/array_list_test.cc.o src/arrow/CMakeFiles/arrow-array-test.dir/array/array_run_end_test.cc.o src/arrow/CMakeFiles/arrow-array-test.dir/array/array_struct_test.cc.o src/arrow/CMakeFiles/arrow-array-test.dir/array/array_union_test.cc.o src/arrow/CMakeFiles/arrow-array-test.dir/array/array_view_test.cc.o -o debug/arrow-array-test  -Wl,-rpath,/Users/jbennet/src/arrow/cpp/build/debug/ -Wl,-rpath,/Users/jbennet/mambaforge/envs/pyarrow-dev/lib  debug/libarrow_testing.1200.0.0.dylib  debug/libarrow.1200.0.0.dylib  /Users/jbennet/mambaforge/envs/pyarrow-dev/lib/libbrotlienc.dylib  /Users/jbennet/mambaforge/envs/pyarrow-dev/lib/libbrotlidec.dylib  /Users/jbennet/mambaforge/envs/pyarrow-dev/lib/libbrotlicommon.dylib  /Users/jbennet/mambaforge/envs/pyarrow-dev/lib/liborc.dylib  /Users/jbennet/mambaforge/envs/pyarrow-dev/lib/libprotobuf.dylib  /Users/jbennet/mambaforge/envs/pyarro
 w-dev/lib/libutf8proc.dylib  /Users/jbennet/mambaforge/envs/pyarrow-dev/lib/libre2.10.0.0.dylib  /Users/jbennet/mambaforge/envs/pyarrow-dev/lib/libgtest_main.1.12.1.dylib  /Users/jbennet/mambaforge/envs/pyarrow-dev/lib/libgmock.1.12.1.dylib  jemalloc_ep-prefix/src/jemalloc_ep/dist//lib/libjemalloc_pic.a  mimalloc_ep/src/mimalloc_ep/lib/mimalloc-2.0/libmimalloc-debug.a  /Users/jbennet/mambaforge/envs/pyarrow-dev/lib/libgtest.1.12.1.dylib && :
   Undefined symbols for architecture arm64:
     "testing::Matcher<std::__1::basic_string_view<char, std::__1::char_traits<char> > const&>::Matcher(char const*)", referenced from:
         testing::Matcher<std::__1::basic_string_view<char, std::__1::char_traits<char> > const&> testing::internal::MatcherCastImpl<std::__1::basic_string_view<char, std::__1::char_traits<char> > const&, char const*>::CastImpl<true>(char const* const&, std::__1::integral_constant<bool, true>, std::__1::integral_constant<bool, true>) in array_test.cc.o
         testing::Matcher<std::__1::basic_string_view<char, std::__1::char_traits<char> > const&> testing::internal::MatcherCastImpl<std::__1::basic_string_view<char, std::__1::char_traits<char> > const&, char const*>::CastImpl<true>(char const* const&, std::__1::integral_constant<bool, true>, std::__1::integral_constant<bool, true>) in array_binary_test.cc.o
   ld: symbol(s) not found for architecture arm64
   clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
   [366/631] Building CXX object src/arrow/compute/kernels/CMakeFiles/arrow-compute-scalar-math-test.dir/scalar_arithmetic_test.cc.o
   ninja: build stopped: subcommand failed.
   ```
   
   How do I fix this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org