* Greg Freemyer
On Wed, Nov 23, 2011 at 10:06 AM, Guido Berhoerster
wrote: * Stephan Kulow
[2011-11-22 10:09]: Werner split libltinfo from libncurses and so we see a lot of build failures due to programs linking -lncurses and expecting functions there that are now in -lltinfo and as library dependencies are not longer taken into account, there is a huge fallout.
The right fix is to use ncurses-config --libs - note that Fedora and debian have the same split, so packages failing have a high chance of having a patch floating around in the internet :)
This breaks almost every single application using curses. It is also not what Fedora and Debian have done and thus there are mostly no such patches. While they provide separate libtinfo packages they also have linker scripts which ensure that applications linking against ncurses/ncursesw always link against -ltinfo too. Can we please do that as well to restore sanity?
Also note that using ncurses-config is not acceptable for many upstreams who do not want to depend on a certain curses implementation.
Guido,
This is fyi only, not arguing one way or the other.
If autoconf is in use, this was the entire patch that fixed it for a package I maintain:
======== diff -Naur afflib-3.6.12/configure.ac afflib-3.6.12.patched/configure.ac --- afflib-3.6.12/configure.ac 2011-05-23 17:59:38.000000000 -0400 +++ afflib-3.6.12.patched/configure.ac 2011-11-22 10:49:53.000000000 -0500 @@ -118,6 +118,7 @@ AC_CHECK_LIB([ncurses],[initscr],, AC_MSG_RESULT([ncurses not installed])) AC_CHECK_LIB([z],[uncompress],, AC_MSG_ERROR([zlib not installed; cannot continue. Try adding zlib-dev or zlib1g-dev.])) AC_CHECK_LIB([rt],[aio_error64]) +AC_SEARCH_LIBS(tgetent, termlib termcap tinfo curses ncurses) AC_CHECK_FUNCS(putp tputs tgoto tgetstr tgetnum gotorc beep endwin setupterm printw) ===
Assuming similar fixes will work for other packages, I don't see why upstream would not take a patch like that.
The fix depends on the build system, point is that every single of these packages need to be touched. Splitting libtinfo out of libncurses makes sense in that it allows to avoid dependecies on libncurses when it is not needed (especially to avoid libncurses vs libncursesw issues low in the library stack). However not the other way around, when linking to lib(n)curses you also always want libtinfo and adding it to every single package and propagating these patches upstream because noone packages ncurses like us seems like a great waste of resources for no added benefit. ncurses-config does not solve it because its rarely used which is why both Fedora and Debian use linker scripts. -- Guido Berhoerster -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org