OpenBSD needs -lcurses
sjmulder opened this issue · 2 comments
sjmulder commented
On OpenBSD 6.4-STABLE, compilation of master
fails:
$ gmake
cc -O3 -Wall -Wextra -Wno-unused-parameter -Werror -Iinc -o bcal src/bcal.c -lreadline
/usr/bin/../lib/libreadline.so.4.0: undefined reference to `tgetnum'
/usr/bin/../lib/libreadline.so.4.0: undefined reference to `tgoto'
/usr/bin/../lib/libreadline.so.4.0: undefined reference to `tgetflag'
/usr/bin/../lib/libreadline.so.4.0: undefined reference to `tputs'
/usr/bin/../lib/libreadline.so.4.0: undefined reference to `tgetent'
/usr/bin/../lib/libreadline.so.4.0: undefined reference to `tgetstr'
Adding -lcurses
fixes the issue:
$ gmake LDLIBS="-lreadline -lcurses"
cc -O3 -Wall -Wextra -Wno-unused-parameter -Werror -Iinc -o bcal src/bcal.c -lreadline -lcurses
$
Not sure if it's safe to add -lcurses
by default.
jarun commented
Now that you have made LDLIBS flexible, I think you can take care of this downstream. bcal
doesn't use ncurses
.
sjmulder commented
It's readline that uses the functions. Odd because readline is used on every platform and OpenBSD uses GNU readline like everyone else.
In any case if you don't feel good about including it here I'll do it downstream.