libbsd-dev does not pull in libbsd
mg fails to build with:
gcc autoexec.o basic.o bell.o buffer.o cinfo.o dir.o display.o echo.o extend.o file.o fileio.o funmap.o interpreter.o help.o kbd.o keymap.o line.o macro.o main.o match.o modes.o paragraph.o re_search.o region.o search.o spawn.o tty.o ttyio.o ttykbd.o undo.o util.o version.o window.o word.o yank.o cmode.o cscope.o dired.o grep.o tags.o -o mg -lncursesw -lbsd
/usr/lib/gcc/x86_64-alpine-linux-musl/11.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lbsd: No such file or directory
It depends on libbsd-dev, but that does not pull in libbsd, so the actual libraries are missing. Usually libbsd.so
is a symlink to libbsd.so.*, which results in abuild automatically moving it to the -dev subpackage and pulling it in, but that is not the case.
See:
Edited by Kevin Daudt