bitwise
bitwise copied to clipboard
Failure to compile without -ltinfo
Describe the bug bitwise fails to compile.
Expected behavior successful compilation
Screenshots
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/cmd.o: undefined reference to symbol 'nodelay'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /lib64/libtinfo.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [Makefile:638: bitwise] Error 1
Version:
- master
Desktop (please complete the following information):
- 5.15.16-gentoo-x86_64
Additional context
This problem is fixed by adding -ltinfo to LIBS on line 437.
this can also be fixed by using pkgconfig to look for ncurses so that the build works with and without separate tinfo
I think the proper fix would be to change the configure.ac for autotools like this (instead of editing the generated Makefile)
https://github.com/particleflux/overlay/blob/master/app-misc/bitwise/files/bitwise-0.43-tinfo.patch
diff --git a/configure.ac b/configure.ac
index 3e4ebde..75a41ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,7 @@ fi
# Checks for libraries.
AC_CHECK_LIB([form], [form_driver])
AC_CHECK_LIB([ncurses], [newwin])
+AC_CHECK_LIB([tinfo], [keypad])
AC_SEARCH_LIBS([sqrt], [m])
# Checks for header files.