Subject: pkg/36850: MesaLib-dri compile problem on Linux
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <pkgsrc@blackmouse.biz>
List: pkgsrc-bugs
Date: 08/27/2007 12:40:01
>Number:         36850
>Category:       pkg
>Synopsis:       MesaLib-dri compile problem on Linux
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 27 12:40:00 +0000 2007
>Originator:     Ondrej Tuma
>Release:        current
>Organization:
Blackmouse
>Environment:
Linux ip1 2.6.20.1 #3 Thu Mar 8 18:42:01 CET 2007 i686 athlon-4 i386 GNU/Linux
>Description:
i try to compile this package on Linux.. and...

i got error on 
Mesa-7.0.1/src/mesa/main/execmem.c

error: `MAP_ANONYMOUS' undeclared (first use in this function)

problem is, that i don't know why.. but __USE_MISC is not defined, and
MAP_ANONYMOUS is depended on that.

So i add line '#define __USE_MISC' before '#include <sys/mmap.h>' and
all compile ends right.


another problem is in compile file
Mesa-7.0.1/src/mesa/drivers/dri/common/xmlconfig.c

:917: error: `program_invocation_short_name' undeclared (first use in
this function)

here i must defined __USE_GNU before line '# include <errno.h>'


next problem is with Mesa-7.0.1/src/glw/*.*
GLwDrawAP.h:49: error: syntax error before "caddr_t"
GLwDrawAP.h:49: warning: no semicolon at end of struct or union
GLwDrawAP.h:50: warning: type defaults to `int' in declaration of
`GLwDrawingAreaClassPart'
GLwDrawAP.h:50: warning: data definition has no type or storage class
GLwDrawAP.h:69: error: syntax error before "GLwDrawingAreaClassPart"
GLwDrawAP.h:69: warning: no semicolon at end of struct or union
GLwDrawAP.h:70: warning: type defaults to `int' in declaration of
`GLwDrawingAreaClassRec'
GLwDrawAP.h:70: warning: data definition has no type or storage class
GLwDrawAP.h:72: error: syntax error before "glwDrawingAreaClassRec"
GLwDrawAP.h:72: warning: type defaults to `int' in declaration of
`glwDrawingAreaClassRec'
GLwDrawAP.h:72: warning: data definition has no type or storage 
classGLwDrawAP.h
GLwDrawA.c:294: error: syntax error before "glwDrawingAreaClassRec"
GLwDrawA.c:294: warning: type defaults to `int' in declaration of
`glwDrawingAreaClassRec'
GLwDrawA.c:295: warning: braces around scalar initializer

here is problem with caddr_t ... i did't find what is not declared, so
i simple add this line to GLwDrawAP.h:

typedef char * caddr_t;


after that, build finish right.

Full log from bulk-build is here:
http://linux.blackmouse.biz/pub/blackmouse-current/i686/pkgstat/20070826.1526/wip/MesaLib-dri/.broken.html

but when i try this version from pkgsrc/graphics (i have it from
the short time from cvs) all works righ.

note:
Here is some packages... which works with this (pkgsrc/graphics)
version:
http://linux.blackmouse.biz/pub/blackmouse-current/i686/packages-modular/All/

now, i start testing this package (compiling packages and using on PC
with dri (sis and intel))
it will be on
http://linux.blackmouse.biz/pub/blackmouse-current/i686/packages/All/
>How-To-Repeat:
bmake
>Fix: