Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ncursesw_bin.so: undefined symbol: set_menu_win #550

Closed
JustAPerson opened this issue Jul 28, 2019 · 6 comments
Closed

ncursesw_bin.so: undefined symbol: set_menu_win #550

JustAPerson opened this issue Jul 28, 2019 · 6 comments
Labels

Comments

@JustAPerson
Copy link

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

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
Copy link
Contributor

danc86 commented Jun 14, 2020

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)

@danc86 danc86 added the notsup label Jun 14, 2020
@IPv2
Copy link
Member

IPv2 commented Jun 14, 2020

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
Copy link
Member

IPv2 commented Jun 14, 2020

Downstream bugs:

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

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

@IPv2
Copy link
Member

IPv2 commented Jul 14, 2020

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
Copy link
Member

IPv2 commented Jul 23, 2020

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

@IPv2 IPv2 closed this as completed Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants