You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "abcbarryn (via GitHub)" <gi...@apache.org> on 2023/02/25 22:55:32 UTC

[GitHub] [arrow] abcbarryn commented on issue #34341: [C++] Arrow version 5 or later fails to compile/link with gcc version 7 (or earlier)

abcbarryn commented on issue #34341:
URL: https://github.com/apache/arrow/issues/34341#issuecomment-1445222136

   Below is the original error with the original source before I started trying to fix it. I checked with the latest version of the source and it is still occurring. in gcc c++ version 7, std::char_traits<char>::length(const char_type*) does not return a contstexpr.
   
   ```
   In file included from /usr/include/c++/7/bits/basic_string.h:48:0,
                    from /usr/include/c++/7/string:52,
                    from /usr/include/c++/7/bits/locale_classes.h:40,
                    from /usr/include/c++/7/bits/ios_base.h:41,
                    from /usr/include/c++/7/ios:42,
                    from /usr/src/arrow-apache-arrow-12.0.0/cpp/src/arrow/vendored/datetime/date.h:53,
                    from /usr/src/arrow-apache-arrow-12.0.0/cpp/src/arrow/vendored/datetime/tz.h:105,
                    from /usr/src/arrow-apache-arrow-12.0.0/cpp/src/arrow/vendored/datetime/tz_private.h:31,
                    from /usr/src/arrow-apache-arrow-12.0.0/cpp/src/arrow/vendored/datetime/tz.cpp:90:
   /usr/include/c++/7/string_view: In function ‘std::string_view arrow_vendored::date::extract_tz_name(const char*)’:
   /usr/src/arrow-apache-arrow-12.0.0/cpp/src/arrow/vendored/datetime/tz.cpp:3768:38:   in constexpr expansion of ‘std::basic_string_view<char>(((const char*)"zoneinfo"))’
   /usr/include/c++/7/string_view:100:58: error: call to non-constexpr function ‘static std::size_t std::char_traits<char>::length(const char_type*)’
          : _M_len{__str == nullptr ? 0 : traits_type::length(__str)},
                                          ~~~~~~~~~~~~~~~~~~~^~~~~~~
   make[2]: *** [src/arrow/CMakeFiles/arrow_objlib.dir/vendored/datetime/tz.cpp.o] Error 1
   make[1]: *** [src/arrow/CMakeFiles/arrow_objlib.dir/all] Error 2
   make: *** [all] Error 2
   ```


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