Subject: Re: Problems with X4.1
To: None <current-users@netbsd.org>
From: Paul Dokas <dokas@cs.umn.edu>
List: current-users
Date: 01/14/2002 12:07:33
On Sat, Jan 12, 2002 at 10:07:25AM +0100, Julio Merino wrote:
> 
> I'm trying to compile XFree86 4.1 from sources on NetBSD-current i386.
> I've the sources in /usr/local/src/xc and I've configured the site.def
> file by hand, as explained in the install instructions.

  <snip, snip>

> ----------
> installing in programs/xdm...
> gcc -O2 -fno-strength-reduce -pipe -march=pentiumpro -ansi -Dasm=__asm -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs     -I../.. -I../../exports/include  -DCSRG_BASED  -DFUNCPROTO=15 -DNARROWPROTO   -DBINDIR=\"/usr/X11R6/bin\" -DXDMDIR=\"/usr/X11R6/lib/X11/xdm\"                               -DHASXDMAUTH              -DTCPCONN -DUNIXCONN -DHAS_STICKY_DIR_BIT -DHAS_FCHOWN                -DGREET_USER_STATIC   -DFRAGILE_DEV_MEM                 -DOSMAJORVERSION=1              -DOSMINORVERSION=5                              -DXPM    -c session.c
> session.c:138: `setgrent' undeclared here (not in a function)
> session.c:138: initializer element is not constant
> session.c:138: (near initialization for `dlfuncs._setgrent')
> session.c:139: `getgrent' undeclared here (not in a function)
> session.c:139: initializer element is not constant
> session.c:139: (near initialization for `dlfuncs._getgrent')
> session.c:140: `endgrent' undeclared here (not in a function)
> session.c:140: initializer element is not constant
> session.c:140: (near initialization for `dlfuncs._endgrent')
> session.c: In function `AbortClient':
> session.c:214: warning: implicit declaration of function `killpg'
> *** Error code 1
> 
> Stop.
> make: stopped in /usr/local/src/xc/programs/xdm
> *** Error code 1
> ----------

Don't compile it from XFree86 source, use the source that you'll find
in /usr/xsrc/xfree/xc (after pulling down that source tree of course).
It builds cleanly.

The problem appears to be that the XFree86 source uses _POSIX_C_SOURCE
#defines poorly.  This is fixed in the NetBSD version of XF4.1

BTW, has anyone contributed these changes back to XFree86?


Paul
-- 
Paul Dokas                                            dokas@cs.umn.edu
======================================================================
Don Juan Matus:  "an enigma wrapped in mystery wrapped in a tortilla."