Compile error in ZVT (WTMPX_FILE?)




With GNOME_STABLE of gnome-libs from CVS this morning (and yesterday
morning at that), gnome-libs fails to compile in the zvt directory
with the following error: 

gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I./.. -DNEED_GNOMESUPPORT_H   \
 -I../support -I../support -I../intl -I../intl -I/opt/gnome/include  \
 -I/usr/X11R6/include -I/opt/gnome/lib/glib/include                  \
 -I/opt/gnome/include -I/usr/X11R6/include                           \
 -I/opt/gnome/lib/glib/include -I/opt/gnome/include                  \
 -I/opt/gnome/include -I/usr/X11R6/include                           \
 -DGNOMESBINDIR=\""/opt/gnome/sbin"\" -I/usr/X11R6/include           \
 -I/opt/gnome/lib/glib/include -I/opt/gnome/include -O6 -mpentium -g \
 -Wall -Wno-unused -Wmissing-prototypes -Wmissing-declarations       \
 -Wpointer-arith -c gnome-utmp.c
gnome-utmp.c: In function `update_dbs':
gnome-utmp.c:136: warning: implicit declaration of function `getutmp'
gnome-utmp.c:165: warning: passing arg 1 of `pututline' from incompatible pointer type
gnome-utmp.c:166: warning: implicit declaration of function `updwtmpx'
gnome-utmp.c:166: `WTMPX_FILE' undeclared (first use in this function)
gnome-utmp.c:166: (Each undeclared identifier is reported only once
gnome-utmp.c:166: for each function it appears in.)
gnome-utmp.c: In function `write_logout_record':
gnome-utmp.c:182: warning: passing arg 1 of `getutid' from incompatible pointer type
gnome-utmp.c:188: warning: passing arg 1 of `pututline' from incompatible pointer type
gnome-utmp.c:189: warning: implicit declaration of function `getutmpx'
gnome-utmp.c:190: `WTMPX_FILE' undeclared (first use in this function)
make[1]: *** [gnome-utmp.o] Error 1
make[1]: Leaving directory `/net/src/gnome/gnome-libs/zvt'
make: *** [install-recursive] Error 1

Putting a "#define _GNU_SOURCE" at the top of gnome-utmp.c gets rid of
the error, but not the warnings.  I don't think this is really the
right answer, since even with this fix, it fails further on with:

gcc -O6 -mpentium -g -Wall -Wno-unused -Wmissing-prototypes          \
 -Wmissing-declarations -Wpointer-arith -o test-utmp gnome-utmp.o    \
 test-utmp.o -lutil -lm 
gnome-utmp.o: In function `update_dbs':
/net/src/gnome/gnome-libs/zvt/gnome-utmp.c:138: undefined reference to `getutmp'
gnome-utmp.o: In function `write_logout_record':
/net/src/gnome/gnome-libs/zvt/gnome-utmp.c:191: undefined reference to `getutmpx'
collect2: ld returned 1 exit status
make: *** [test-utmp] Error 1

My utmp.h and utmpx.h files are from the glibc-devel-2.0.106-0.981209
package from RedHat's rawhide directory.  If I back down to 2.0.7-29
(I love RPM) I lose utmpx.h entirely, and utmp.h still has no getutmp
function.  The closest match seems to be getutent, but it is called
completely differently.  For what its worth, the Unix spec only
defines getutxent, getutxid and getutxline (LSB hasn't gotten to
utmp.h or utmpx.h yet).   

If the problem is likely something in my setup, please let me know, but it
looks to me like a configure issue.

Thanks!
-Gleef



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]