sup-heliotrope / sup

A curses threads-with-tags style email client (mailing list: supmua@googlegroups.com)
http://sup-heliotrope.github.io
GNU General Public License v2.0
900 stars 97 forks source link

ncursesw_bin.so: undefined symbol: set_menu_win #550

Closed JustAPerson closed 4 years ago

JustAPerson commented 5 years ago

Hi,

I just installed on Ubuntu 18.04

$ sudo apt install sup-mail
$ sup-mail
Traceback (most recent call last):
    5: from /usr/bin/sup-mail:6:in `<main>'
    4: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
    3: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
    2: from /usr/lib/ruby/vendor_ruby/ncursesw.rb:23:in `<top (required)>'
    1: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.5.0/ncursesw_bin.so: undefined symbol: set_menu_win - /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.5.0/ncursesw_bin.so (LoadError)

I tried also installing the build dependencies (apt-get install build-essential libncursesw5-dev uuid-dev zlib1g-dev) but that didn't help either.

hughshuwang commented 4 years ago

Has this been solved yet? I'm having the same issue now. I tried installing using both apt and gem, and they both threw such error.

danc86 commented 4 years ago

Whatever gem or package you got this file from: /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.5.0/ncursesw_bin.so is the real problem. It appears not to be correctly built against the version of libncurses or libncursesw you have on your system.

In case it helps, on Fedora 32 with ncurses 6.1 that symbol is defined in libmenu.so and my copy of ncursesw_bin.so is linked against it:

$ objdump -T /lib64/libmenu.so.6.1  | grep set_menu_win
0000000000006230 g    DF .text  000000000000007d  Base        set_menu_win
$ ldd /usr/lib64/gems/ruby/ncursesw-1.4.9/ncursesw_bin.so
        linux-vdso.so.1 (0x00007ffce0bb5000)
        libruby.so.2.7 => /lib64/libruby.so.2.7 (0x00007ff27e27d000)
        libmenu.so.6 => /lib64/libmenu.so.6 (0x00007ff27e272000)
        libformw.so.6 => /lib64/libformw.so.6 (0x00007ff27e25d000)
        libpanelw.so.6 => /lib64/libpanelw.so.6 (0x00007ff27e257000)
        libncursesw.so.6 => /lib64/libncursesw.so.6 (0x00007ff27e217000)
        libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007ff27e1e8000)
        libc.so.6 => /lib64/libc.so.6 (0x00007ff27e01c000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff27dffa000)
        librt.so.1 => /lib64/librt.so.1 (0x00007ff27dfef000)
        libgmp.so.10 => /lib64/libgmp.so.10 (0x00007ff27df58000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007ff27df51000)
        libcrypt.so.2 => /lib64/libcrypt.so.2 (0x00007ff27df16000)
        libm.so.6 => /lib64/libm.so.6 (0x00007ff27ddce000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ff27e624000)
        libncurses.so.6 => /lib64/libncurses.so.6 (0x00007ff27dda1000)
IPv2 commented 4 years ago

Although the issue is with the downstream packaging, here is the workaround that I use in order to run sup-mail on Ubuntu 18.04 LTS (bionic).

I install the ncursesw gem myself, and then sup-mail runs fine after that.

# Install build prerequisites for gem ncursesw
sudo apt install \
    build-essential \
    patch \
    ruby-dev \
    zlib1g-dev \
    liblzma-dev \
    libncurses5-dev \
    lib32ncurses5-dev \
    libncursesw5-dev

# Install gem ncursesw
sudo gem install ncursesw

# Install and run sup-mail
# If sup-mail is already installed, then reinstallation is not required
sudo apt install sup-mail
sup-mail

/cc @JustAPerson @hughshuwang @abulte @sneakyx @bobismijnnaam

IPv2 commented 4 years ago

Downstream bugs:

Bug in Ubuntu package ruby-ncurses, which sup-mail depends upon.

Workaround available: manually install ncursesw gem (see previous comment above).

IPv2 commented 4 years ago

Fix committed for Ubuntu 18.04 LTS (bionic) (via SRU - "Stable Release Update").

Proposed fix is available for testing, in Ubuntu's bionic-proposed repository (ruby-ncurses version 1.4.9-1build3ubuntu0.18.04.1).

For details on how to test, see: https://bugs.launchpad.net/ubuntu/+source/ruby-ncurses/+bug/1775673/comments/15

References:

IPv2 commented 4 years ago

Fixed downstream in Ubuntu.

To obtain fix, bionic-updates, update ruby-ncurses (fixed version: 1.4.9-1build3ubuntu0.18.04.1).

https://packages.ubuntu.com/bionic-updates/ruby-ncurses