-
-
Notifications
You must be signed in to change notification settings - Fork 304
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
Build: figure when ncurses needs tinfo #1118
Comments
im able to reproduce this on NeoMutt 20180323-27-d4be39 |
Thanks for the bug report, @Herny64. Sorry that NeoMutt's crashing.
Argh! It's crashing deep within the ncurses code, which is called very early in NeoMutt's startup. Please can you give this program (initscr.c) a try: #include <ncurses.h>
int main()
{
initscr();
endwin();
return 0;
} Compile with: If that crashes, then there's something wrong with your curses install, or your terminal. |
it succeeded. |
the test program links agains libncurses.so.6 while neomutt links agains libncursesw.so.6 |
Aha! I was testing you :-) You're right, change the compile to |
still succeeds |
OK, my guess is that you have multiple versions of ncurses installed. (If you're an IRC user, we're in #neomutt on irc.freenode.net) |
strace
|
So the issue is that ncursesw and tinfo were built independently, and ncursesw needs tinfo at link time. As reported by @Herny64, pkg-config knows it: $ pkg-config --cflags --libs ncursesw
-D_GNU_SOURCE -D_DEFAULT_SOURCE -I/usr/include/ncursesw -lncursesw -ltinfow I'll have a look at auto.def and see what I can do. |
i have build neomutt with this patch:
its configure output is:
the segfault is still there |
Ok so tinfo gets pulled in this way, but appears in the link line before ncursesw. It needs to be after. Last (maybe) thing I’ll ask you to check is to substitute tinfo with tinfow in the patch. If it still fails, maybe this is enough for us to start relying on pkg-config and simplify our hand-made checks, what do you think @flatcap? |
I'm also on Gentoo, and can confirm that changing tinfo to tinfow in the patch earlier from @Herny64 fixes this issue on my end. |
worked for me as well |
Thank you both for testing! |
This fixes the configure phase in NetBSD, which doesn't have a separate tinfo library in base. Issue #1118
@gahr However simple pkg-config makes auto.def, there are still going to be distros that don't have support (or possibly have partial support). Would we make auto.def more complicated, or have a separate one? |
You’re right, without a good survey of what’s there it’s difficult to tell whether we’d end up simplifying or duplicating things. |
I've done a quick survey of my machine (Fedora 27). Packages for pkg-config:
Missing from pkg-config:
|
gpgme has |
Anyway, in support of not using pkg-config, there are operating systems (like BSDs) that ship part of the dependencies in base (i.e., do not require the installation of 3rd party components). This is true for example for ncursesw. These in-base parts do not install pkg-config .pc files. |
I'm also on Gentoo. Tested with 20180223 and it segfaults. The patch provided by @Herny64 with I've just created an ebuild, published here: https://github.com/alepez/pez-gentoo-overlay/tree/master/mail-client/neomutt This is the patch:
|
#1119 was merged. |
bug reports
neomutt should not crash
it crashes with segfault
just start neomutt
neomutt -v output:
Gentoo
my terminal is st, but i can reproduce this on tty as well
The text was updated successfully, but these errors were encountered: