You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/30 10:05:38 UTC

[GitHub] [arrow] vibhatha opened a new issue, #14779: [C++]: Compiling failed on Mac M1

vibhatha opened a new issue, #14779:
URL: https://github.com/apache/arrow/issues/14779

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   I am getting the following error while compiling Arrow C++. 
   
   ```bash
   8 warnings generated.
   [537/632] Linking CXX executable debug/arrow-utility-test
   FAILED: debug/arrow-utility-test 
   : && /Users/vibhatha/tools/arrow/lint/clang+llvm-14.0.0-x86_64-apple-darwin/bin/clang++ -fno-aligned-new  -Qunused-arguments -fcolor-diagnostics -ggdb -O0  -Wall -Wextra -Wdocumentation -Wshorten-64-to-32 -Wno-missing-braces -Wno-unused-parameter -Wno-constant-logical-operand -Wno-return-stack-address -Werror -Wno-unknown-warning-option -Wno-pass-failed -march=armv8-a  -g -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -mmacosx-version-min=12.0 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/homebrew/opt/bison/lib src/arrow/util/CMakeFiles/arrow-utility-test.dir/align_util_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/atfork_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/byte_size_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/cache_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/checked_cast_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/compression_test.cc.o src/arrow/util/C
 MakeFiles/arrow-utility-test.dir/decimal_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/formatting_util_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/key_value_metadata_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/hashing_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/int_util_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/io_util_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/iterator_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/logging_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/queue_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/range_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/reflection_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/small_vector_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/stl_util_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/string_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/t
 digest_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/test_common.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/time_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/tracing_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/trie_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/uri_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/utf8_util_test.cc.o src/arrow/util/CMakeFiles/arrow-utility-test.dir/value_parsing_test.cc.o -o debug/arrow-utility-test  -Wl,-rpath,/Users/vibhatha/github/fork/arrow/cpp/build/debug -Wl,-rpath,/opt/homebrew/lib  debug/libarrow_testing.1100.0.0.dylib  debug/libarrow.1100.0.0.dylib  /opt/homebrew/opt/openssl@1.1/lib/libcrypto.dylib  /opt/homebrew/opt/openssl@1.1/lib/libssl.dylib  /opt/homebrew/lib/libbrotlienc.dylib  /opt/homebrew/lib/libbrotlidec.dylib  /opt/homebrew/lib/libbrotlicommon.dylib  /opt/homebrew/lib/libaws-cpp-sdk-config.dylib  /opt/homebrew/lib/libaws-cpp-sdk-transfer.dylib  /opt/homebre
 w/lib/libaws-cpp-sdk-identity-management.dylib  /opt/homebrew/lib/libaws-cpp-sdk-cognito-identity.dylib  /opt/homebrew/lib/libaws-cpp-sdk-sts.dylib  /opt/homebrew/lib/libaws-cpp-sdk-s3.dylib  /opt/homebrew/lib/libaws-cpp-sdk-core.dylib  utf8proc_ep-install/lib/libutf8proc.a  /opt/homebrew/lib/libre2.9.0.0.dylib  googletest_ep-prefix/lib/libgtest_maind.dylib  googletest_ep-prefix/lib/libgtestd.dylib  googletest_ep-prefix/lib/libgmockd.dylib  /opt/homebrew/opt/openssl@1.1/lib/libcrypto.dylib  /opt/homebrew/lib/libaws-crt-cpp.dylib  /opt/homebrew/lib/libaws-c-mqtt.1.0.0.dylib  /opt/homebrew/lib/libaws-c-event-stream.1.0.0.dylib  /opt/homebrew/lib/libaws-c-s3.1.0.0.dylib  /opt/homebrew/lib/libaws-c-auth.1.0.0.dylib  /opt/homebrew/lib/libaws-c-http.1.0.0.dylib  /opt/homebrew/lib/libaws-c-io.1.0.0.dylib  /opt/homebrew/lib/libaws-c-compression.1.0.0.dylib  /opt/homebrew/lib/libaws-c-cal.1.0.0.dylib  -framework Security  /opt/homebrew/lib/libaws-c-sdkutils.1.0.0.dylib  /opt/homebrew/lib/lib
 aws-checksums.1.0.0.dylib  /opt/homebrew/lib/libaws-c-common.1.0.0.dylib  -pthread  -lpthread  -framework CoreFoundation && :
   Undefined symbols for architecture arm64:
     "__ZNSt3__18to_charsEPcS0_d", referenced from:
         __ZN5arrow8internal7ToCharsIdJEEENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_DpOT0_ in string_test.cc.o
     "__ZNSt3__18to_charsEPcS0_f", referenced from:
         __ZN5arrow8internal7ToCharsIfJEEENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEET_DpOT0_ in string_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)
   [546/632] Building CXX object src/parquet/CMakeFiles/parquet-arrow-test.dir/arrow/arrow_reader_writer_test.cc.o
   ninja: build stopped: subcommand failed.
   ```
   I encounter this issue on Mac M1 while using the clang-14. 
   
   ### Component(s)
   
   C++


-- 
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.apache.org

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


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

Posted by GitBox <gi...@apache.org>.
pitrou commented on issue #14779:
URL: https://github.com/apache/arrow/issues/14779#issuecomment-1331965711

   Given that few standard libraries seem to support `std::to_chars` for floating-point types, we should probably revert its usage from the Arrow codebase.
   @bkietz Thoughts?


-- 
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


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

Posted by "AlenkaF (via GitHub)" <gi...@apache.org>.
AlenkaF commented on issue #14779:
URL: https://github.com/apache/arrow/issues/14779#issuecomment-1487994971

   Duplicate of https://github.com/apache/arrow/issues/14917


-- 
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


[GitHub] [arrow] AlenkaF closed issue #14779: [C++] Compiling failed on Mac M1

Posted by "AlenkaF (via GitHub)" <gi...@apache.org>.
AlenkaF closed issue #14779: [C++] Compiling failed on Mac M1
URL: https://github.com/apache/arrow/issues/14779


-- 
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: issues-unsubscribe@arrow.apache.org

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


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

Posted by "j-bennet (via GitHub)" <gi...@apache.org>.
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


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

Posted by "j-bennet (via GitHub)" <gi...@apache.org>.
j-bennet commented on issue #14779:
URL: https://github.com/apache/arrow/issues/14779#issuecomment-1459398177

   Nevermind; problem solved by using the `-DGTest_SOURCE="BUNDLED"` flag, suggested here:
   
   https://github.com/apache/arrow/issues/14917


-- 
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


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

Posted by GitBox <gi...@apache.org>.
bkietz commented on issue #14779:
URL: https://github.com/apache/arrow/issues/14779#issuecomment-1335887535

   I've crawled through the history of libc++' charconv header and I can't find an explanation for this. I do think that floating point `to_chars` might need to wait a while, but perhaps we could let this issue accumulate a few more reports before reverting


-- 
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


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

Posted by GitBox <gi...@apache.org>.
vibhatha commented on issue #14779:
URL: https://github.com/apache/arrow/issues/14779#issuecomment-1335019633

   Also please note that, the issue occurs when using the following clang version.
   
   ```bash
   clang version 14.0.0 (https://github.com/tru/llvm-release-build fc075d7c96fe7c992dde351695a5d25fe084794a)
   ```
   
   But when using clang `Apple clang version 13.1.6 (clang-1316.0.21.2.5)` the issue didn't occur. Previously in my path, `CLANG_TOOLS` has been included and its `clang` and `clang++` was used in compiling. That could have been the reason why I got the issue.
   
   But, please note that I have been using this setting for a while and didn't encountered the reported issue until now.


-- 
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


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

Posted by GitBox <gi...@apache.org>.
pitrou commented on issue #14779:
URL: https://github.com/apache/arrow/issues/14779#issuecomment-1336955063

   > But when using clang Apple clang version 13.1.6 (clang-1316.0.21.2.5) the issue didn't occur. 
   
   That's an interesting data point, thank you. If you want to use a third-party clang, perhaps you also need to use a matching libc++ instead of the Apple-provided one?


-- 
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


[GitHub] [arrow] kou closed issue #14779: [C++] Compiling failed on Mac M1

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou closed issue #14779: [C++] Compiling failed on Mac M1
URL: https://github.com/apache/arrow/issues/14779


-- 
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: issues-unsubscribe@arrow.apache.org

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