Tue 01 Dec 2009 12:20:14 AM UTC, original submission:
I tried compiling the latest git source on NetBSD 4.0, and there was an error regarding getutent():
gcc -c -I. -I. -DETCSCREENRC='"/usr/pkg/etc/screenrc"' -DSCREENENCODINGS='"/usr/pkg/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \
-g -O2 utmp.c
utmp.c:92: error: static declaration of 'getutent' follows non-static declaration
/usr/include/utmp.h:66: error: previous declaration of 'getutent' was here
utmp.c:93: error: static declaration of 'endutent' follows non-static declaration
/usr/include/utmp.h:67: error: previous declaration of 'endutent' was here
utmp.c:95: error: static declaration of 'setutent' follows non-static declaration
/usr/include/utmp.h:65: error: previous declaration of 'setutent' was here
Apparently configure thinks that there is no getutent(), but there is, in <utmp.h> It is just the configure check which is incorrect. It fails because it has an un#defined name. From config.log:
configure:5286: checking getutent...
configure:5311: gcc -o conftest -g -O2 conftest.c -lcurses >&5
conftest.c: In function 'main':
conftest.c:53: error: 'DEAD_PROCESS' undeclared (first use in this function)
conftest.c:53: error: (Each undeclared identifier is reported only once
conftest.c:53: error: for each function it appears in.)
configure:5311: $? = 1
It seems that utmp.c actually uses DEAD_PROCESS, but I suppose that will have to be tested separately.
Pkgsrc has some patches in this area: patch-{ai,aj,al,am,an}. The other patches are probably also worth to be included.
See here for the mentioned patches: http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/misc/screen/patches/
-Olaf 'Rhialto' Seibert
rhialto at falu dot nl
|