On NetBSD 10.x linking libdbase.a fails because of an unresolved external in unix/utmp.c - see below:
gcc -o mblogin getdef.o env.o chowntty.o shell.o basename.o pwdcheck.o pwauth.o encrypt.o loginprompt.o utmp.o limits.o setupenv.o sub.o xmalloc.o log.o setugid.o mblogin.o -L/usr/local/lib -lcompat -lcrypt -lutil -lz -lbz2 ../lib/libdbase.a
ld: utmp.o: in function `checkutmp':
utmp.c:(.text+0x1fc): undefined reference to `utxent'
ld: utmp.c:(.text+0x204): undefined reference to `utxent'
gmake[1]: *** [Makefile:43: mblogin] Error 1
gmake[1]: Leaving directory '/usr/local/opt/mbse/mbsebbs-code/unix'
gmake: *** [Makefile:32: all] Error 2
-bash-5.2$
System info:
Raspberry Pi 1 Model B+
NetBSD 10.x (evbarm)
gcc 10.5.0
MBSE BBS current master branch (via git)
Update:
I've been able to fix this issue by commenting out lines 43-45 in unix/mblogin.c
Since I am not familiar with the long, distant history of NetBSD I suppose that this piece of code originates from at least 2018. Since compiling the code now works without this directive, chances are that something changed "under the hood" of NetBSD or the directive got there by accident.
Last edit: lodger 2025-05-19