Bug 28228

Summary: Cannot make Mesa 3.4.2 port with XFree86 4.1.0_4
Product: Ports & Packages Reporter: Stephen Montgomery-Smith <stephen>
Component: Individual Port(s)Assignee: Maxim Sobolev <sobomax>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Stephen Montgomery-Smith 2001-06-17 15:50:01 UTC
I know that Mesa comes built into XFree86-4.1.0, but that does not
include glut, and I need glut because of some programs that I am
writing.

When I try to make the Mesa-3.4.2 port I get:

===>  Building for Mesa-3.4.2_1
cd . && /usr/cvs/ports/graphics/Mesa3/work/Mesa-3.4.2/missing autoheader
WARNING: `autoheader' is missing on your system.  You should only need it if
         you modified `acconfig.h' or `configure.in'.  You might want
         to install the `Autoconf' and `GNU m4' packages.  Grab them
         from any GNU archive site.
gmake  all-recursive
gmake[1]: Entering directory `/usr/cvs/ports/graphics/Mesa3/work/Mesa-3.4.2'
Making all in src-glu
gmake[2]: Entering directory `/usr/cvs/ports/graphics/Mesa3/work/Mesa-3.4.2/src-glu'
/bin/sh ../libtool --mode=compile cc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/include -I/usr/cvs/ports/graphics/Mesa3/work/Mesa-3.4.2/include -DGLCALLBACKPCAST=\*    -O -pipe -march=pentiumpro -DCOMPAT_LINUX_THREADS -DVM_STACK  -c glu.c
cc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/include -I/usr/cvs/ports/graphics/Mesa3/work/Mesa-3.4.2/include "-DGLCALLBACKPCAST=*" -O -pipe -march=pentiumpro -DCOMPAT_LINUX_THREADS -DVM_STACK -c glu.c  -fPIC -DPIC -o glu.lo
glu.c:159: conflicting types for `gluPickMatrix'
/usr/X11R6/include/GL/glu.h:300: previous declaration of `gluPickMatrix'
glu.c: In function `gluErrorString':
glu.c:281: `GLU_INCOMPATIBLE_GL_VERSION' undeclared (first use in this function)
glu.c:281: (Each undeclared identifier is reported only once
glu.c:281: for each function it appears in.)
glu.c: At top level:
glu.c:370: conflicting types for `gluCheckExtension'
/usr/X11R6/include/GL/glu.h:271: previous declaration of `gluCheckExtension'
gmake[2]: *** [glu.lo] Error 1
gmake[2]: Leaving directory `/usr/cvs/ports/graphics/Mesa3/work/Mesa-3.4.2/src-glu'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/cvs/ports/graphics/Mesa3/work/Mesa-3.4.2'
gmake: *** [all-recursive-am] Error 2
*** Error code 2
....

Fix: 

OK, this is weird, but this is a work-around.

cd /usr/ports/graphics/Mesa3
make
cd work/Mesa-3.4.2/src-glu
make
cd ../../..
make

What is different is that the lines that don't work above are now as below.
The difference seems to be that a -I/usr/X11R6/include becomes -I../include
I am guessing that there is an incompatibility between the GL/glu.h that
comes with XFree86-4.1.0 and Mesa-3.4.2.

/bin/sh ../libtool --mode=compile cc -DHAVE_CONFIG_H -I. -I. -I.. -I../include    -O -pipe -march=pentiumpro -DCOMPAT_LINUX_THREADS -DVM_STACK  -Wall -fomit-frame-pointer -ffast-math -fexpensive-optimizations -fstrict-aliasing -malign-loops=2 -malign-jumps=2 -malign-functions=2 -D_REENTRANT -DPTHREADS -c glu.c
cc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -O -pipe -march=pentiumpro -DCOMPAT_LINUX_THREADS -DVM_STACK -Wall -fomit-frame-pointer -ffast-math -fexpensive-optimizations -fstrict-aliasing -malign-loops=2 -malign-jumps=2 -malign-functions=2 -D_REENTRANT -DPTHREADS -c glu.c  -fPIC -DPIC -o glu.lo
How-To-Repeat: 
First deinstall XFree86 and Mesa.  Make sure you have 
XFREE86_VERSION=4
in /etc/make.conf
cd /usr/ports/x11/XFree86-4
make install
cd /usr/ports/graphics/Mesa3
make
Comment 1 Ying-Chieh Liao freebsd_committer freebsd_triage 2001-06-17 18:05:17 UTC
Responsible Changed
From-To: freebsd-ports->sobomax

over to maintainer
Comment 2 dwcjr 2001-08-30 22:18:18 UTC
Do you have XFREE86_VERSION=4 in your make.conf  Mesa-3.4.2_1 compiles 
with my XFree86-4.1.0_6 now, so try again.
Comment 3 Stephen Montgomery-Smith 2001-09-02 01:42:23 UTC
Hi.  Yes I did have that line in make.conf (I actually said so in the
PR).

Just to be sure - to get this error one had to start with a totally new
install of XFree86 version 4.  A reinstall of Mesa will not create this
error.  Is this what you did?

(It is a big effort for me to check that it is fixed, because I need to
deinstall everything first.)

"David W. Chapman Jr." wrote:
> 
> Do you have XFREE86_VERSION=4 in your make.conf  Mesa-3.4.2_1 compiles
> with my XFree86-4.1.0_6 now, so try again.

-- 
Stephen Montgomery-Smith
stephen@math.missouri.edu
http://www.math.missouri.edu/~stephen
Comment 4 Stephen Montgomery-Smith 2001-09-02 15:30:07 UTC
OK, I tried to produce the make error again, and now it seems to be
fixed.  So...

This PR can be closed.

-- 
Stephen Montgomery-Smith
stephen@math.missouri.edu
http://www.math.missouri.edu/~stephen
Comment 5 dwcjr freebsd_committer freebsd_triage 2001-09-02 17:16:06 UTC
State Changed
From-To: open->closed

Problem has been fixed.