Skip to content

[Ruby] Cannot get gem installed on Ubuntu 20 with arrow 14,15 and/or 16 #41396

Closed

Description

@andresbarcenas

Describe the bug, including details regarding any error messages, version, and platform.

here is the error message on Ubuntu 20 (focal)

checking for arrow version (>= 15.0.0)... yes (16.0.0)
checking for arrow-glib version (>= 15.0.2)... yes (16.0.0)
creating Makefile

current directory: /home/deployer/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/red-arrow-15.0.2/ext/arrow
make "DESTDIR=" clean

current directory: /home/deployer/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/red-arrow-15.0.2/ext/arrow
make "DESTDIR="
compiling arrow.cpp
In file included from /usr/include/arrow/result.h:28,
                 from /usr/include/arrow/device.h:26,
                 from /usr/include/arrow/buffer.h:29,
                 from /usr/include/arrow/array/data.h:27,
                 from /usr/include/arrow/array/array_base.h:26,
                 from /usr/include/arrow/array.h:41,
                 from /usr/include/arrow/api.h:22,
                 from red-arrow.hpp:22,
                 from arrow.cpp:20:
/usr/include/arrow/util/aligned_storage.h:39:22: error: ‘constexpr const T* arrow::internal::AlignedStorage<T>::get() const’ cannot be overloaded with ‘constexpr T* arrow::internal::AlignedStorage<T>::get() const’
   39 |   constexpr const T* get() const noexcept {
      |                      ^~~
/usr/include/arrow/util/aligned_storage.h:35:16: note: previous declaration ‘constexpr T* arrow::internal::AlignedStorage<T>::get() const’
   35 |   constexpr T* get() noexcept {
      |                ^~~
In file included from /usr/include/arrow/device.h:26,
                 from /usr/include/arrow/buffer.h:29,
                 from /usr/include/arrow/array/data.h:27,
                 from /usr/include/arrow/array/array_base.h:26,

Is there any specific documentation/instructions to get this gem installed on Ubuntu 20. I was able to do it on CentOS7 with devtoolset-8

Component(s)

Ruby

Activity

  1. changed the title [-]Cannot get gem installed on Ubuntu 20 with arrow 14,15 and/or 16[/-] [+][Ruby] Cannot get gem installed on Ubuntu 20 with arrow 14,15 and/or 16[/+] on Apr 26, 2024
  2. kou commented on Apr 26, 2024

    @kou
    Member

    @raulcd msys2/MINGW-packages#20692 isn't merged yet but I'll release 16.0.0 gems. Because there is a problem with Apache Arrow C++ 16.0.0 and Red Arrow 15.0.x combination on other platforms. Releasing 16.0.0 gems break gem install red-arrow on Windows but it'll be fixed by msys2/MINGW-packages#20692 is merged.

  3. kou commented on Apr 26, 2024

    @kou
    Member

    I've released 16.0.0 gems.

    @andresbarcenas Could you try again?

  4. raulcd commented on Apr 27, 2024

    @raulcd
    Member

    Thanks @kou , sounds good to me. I'll try to fix the MINGW packages PR tomorrow but I'm slightly busy might have to do it on Monday.

  5. kou commented on Apr 27, 2024

    @kou
    Member

    Thanks! No problem!

  6. Hronom commented on Apr 29, 2024

    @Hronom

    Not works with 16.0.0, ruby 3.0.6. Docker image public.ecr.aws/docker/library/ruby:3.0.6-slim:

    current directory: /usr/local/bundle/gems/red-arrow-16.0.0/ext/arrow
    make DESTDIR\=
    compiling arrow.cpp
    In file included from /usr/include/arrow/result.h:28,
                     from /usr/include/arrow/device.h:26,
                     from /usr/include/arrow/buffer.h:29,
                     from /usr/include/arrow/array/data.h:27,
                     from /usr/include/arrow/array/array_base.h:26,
                     from /usr/include/arrow/array.h:41,
                     from /usr/include/arrow/api.h:22,
                     from red-arrow.hpp:22,
                     from arrow.cpp:20:
    /usr/include/arrow/util/aligned_storage.h:39:22: error: ‘constexpr const T* arrow::internal::AlignedStorage<T>::get() const’ cannot be overloaded with ‘constexpr T* arrow::internal::AlignedStorage<T>::get() const’
       39 |   constexpr const T* get() const noexcept {
          |                      ^~~
    /usr/include/arrow/util/aligned_storage.h:35:16: note: previous declaration ‘constexpr T* arrow::internal::AlignedStorage<T>::get() const’
       35 |   constexpr T* get() noexcept {
          |                ^~~
    In file included from /usr/include/arrow/device.h:26,
                     from /usr/include/arrow/buffer.h:29,
                     from /usr/include/arrow/array/data.h:27,
                     from /usr/include/arrow/array/array_base.h:26,
                     from /usr/include/arrow/array.h:41,
                     from /usr/include/arrow/api.h:22,
                     from red-arrow.hpp:22,
                     from arrow.cpp:20:
    /usr/include/arrow/result.h:423:16: error: ‘constexpr T& arrow::Result<T>::ValueUnsafe() const &’ cannot be overloaded with ‘constexpr const T& arrow::Result<T>::ValueUnsafe() const &’
      423 |   constexpr T& ValueUnsafe() & { return *storage_.get(); }
          |                ^~~~~~~~~~~
    /usr/include/arrow/result.h:421:22: note: previous declaration ‘constexpr const T& arrow::Result<T>::ValueUnsafe() const &’
      421 |   constexpr const T& ValueUnsafe() const& { return *storage_.get(); }
          |                      ^~~~~~~~~~~
    

    kind of blocker for usage of this lib.

  7. kou commented on Apr 29, 2024

    @kou
    Member

    Ah, re2.pc on Ubuntu 20.04 and Debian bullseye have -std=c++11. I assumed that re2.pc on all supported platforms don't have -std=c++11 in #39932.

    Could you use Ubuntu 22.04 or ruby:*-bookworm instead?
    Or could you run sudo sed -i -e 's/-std=c++11//g' /usr/lib/x86_64-linux-gnu/pkgconfig/re2.pc before gem install red-arrow as workaround?

  8. kou commented on Apr 29, 2024

    @kou
    Member

    FYI: sudo sed -i -e 's/-std=c++11//g' /usr/lib/x86_64-linux-gnu/pkgconfig/re2.pc is safe because g++ on Ubuntu 20.04 and Debian bullseye use C++14 as the default C++ standard.

  9. Hronom commented on Apr 29, 2024

    @Hronom

    @kou thank you we cannot use bookworm as it will require update of Ruby. We currently use 3.0.6-slim-bullseye.

    Strange issue, because previously it was working on the same version, but now it stopped. Is there was some update?

    Trying to do:

    sudo sed -i -e 's/-std=c++11//g' /usr/lib/x86_64-linux-gnu/pkgconfig/re2.pc

    Will see if it break something

  10. andresbarcenas commented on Apr 30, 2024

    @andresbarcenas
    Author

    I've released 16.0.0 gems.

    @andresbarcenas Could you try again?

    I was able to do a simple 'gem install red-arrow -v 16' but I had to run the sudo sed -i -e 's/-std=c++11//g' /usr/lib/x86_64-linux-gnu/pkgconfig/re2.pc command as you mentioned.

    Building native extensions. This could take a while...
    Successfully installed red-arrow-16.0.0
    Parsing documentation for red-arrow-16.0.0
    Installing ri documentation for red-arrow-16.0.0
    Done installing documentation for red-arrow after 1 seconds
    1 gem installed
    

    Thank you for such a fast update and releasing 16.0.0. gems

  11. kou commented on Apr 30, 2024

    @kou
    Member

    Yes. We need the sed on Ubuntu 20.04 too.

  12. kou commented on Apr 30, 2024

    @kou
    Member

    Is there was some update?

    #39932 as I mentioned.

    FYI: Debian GNU/Linux bullseye will reach EOL on 2024-07: https://wiki.debian.org/DebianReleases

    So you need to update your image sooner or later.

  13. datbth commented on Aug 15, 2024

    @datbth

    hi, is there any plan to make it work for Ubuntu 20 without the workaround?

  14. added a commit that references this issue on Aug 16, 2024
  15. kou commented on Aug 16, 2024

    @kou
    Member

    I didn't have a plan for it because Ubuntu 20.04 will reach EOL soon but let's do it.

  16. added a commit that references this issue on Aug 16, 2024
  17. added this to the 18.0.0 milestone on Aug 16, 2024
  18. kou commented on Aug 16, 2024

    @kou
    Member

    Issue resolved by pull request 43721
    #43721

  19. datbth commented on Aug 16, 2024

    @datbth

    That is really great. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions