Bug 897

Summary: Darwin build fails in xc/programs/Xserver/GL/apple...
Product: xorg Reporter: Roland Mainz <roland.mainz>
Component: Server/DDX/XQuartzAssignee: Torrey T. Lyons <torrey>
Status: RESOLVED FIXED QA Contact:
Severity: blocker    
Priority: high CC: ago, ajax, torrey
Version: git   
Hardware: PowerPC   
OS: Mac OS X (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 351    
Attachments:
Description Flags
changes from cygwin none

Description Roland Mainz 2004-07-20 03:07:12 UTC
2004-07-20-trunk CVS, make World fails on MacOSX and Darwin like this:
-- snip --
making all in programs/Xserver/GL/apple...
rm -f aglGlx.o
/usr/bin/cc -c -Os -Wall -Wpointer-arith -no-cpp-precomp
-UNEED_SCREEN_REGIONS     -I. -I../../../../exports/include
-I../../../../exports/include/X11
-I../../../../include/extensions                 -I../../../../lib/GL/glx
-I../../../../lib/GL/include                 -I../../../../programs/Xserver/mi
-I../../../../programs/Xserver/include
-I../../../../include/fonts                
-I../../../../programs/Xserver/render
-I../../../../programs/Xserver/GL/include                
-I../../../../programs/Xserver/GL/glx
-I../../../../programs/Xserver/hw/darwin/quartz/cr                
-I../../../../programs/Xserver/hw/darwin/quartz -I../../../../lib/GL/apple
-I../../../../programs/Xserver/hw/darwin/quartz/xpr
-I../../../../programs/Xserver/hw/darwin/quartz/xpr                
-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks                
-I../../../../extras/Mesa/src  -I../../../.. -I../../../../exports/include  
-D__powerpc__ -D__DARWIN__                                 -DNO_ALLOCA
-DCSRG_BASED  -DSHAPE  -DXKB -DLBX -DXAPPGROUP         -DXCSECURITY -DTOGCUP  
-DXF86BIGFONT    -DPIXPRIV -DPANORAMIX   -DRENDER -DRANDR       -DXFIXES
-DDAMAGE -DAVOID_GLYPHBLT -DPIXPRIV -DSINGLEDEPTH                          
-DXvExtension                           -DXFree86Server                   
-DXvMCExtension                                
-DSMART_SCHEDULE                                -DBUILDDEBUG
-DXResExtension       -DX_BYTE_ORDER=X_BIG_ENDIAN                             
-DXORG_VERSION_CURRENT="(((6) * 10000000) + ((7) * 100000) + ((0) * 1000) + 0)"
-DNDEBUG      -DGLXEXT -DGLX_DIRECT_RENDERING -DGLX_USE_APPLEGL -fno-common 
-DXVENDORNAME='"The X.Org Foundation"' -DXVENDORNAMESHORT='"X.Org"'  aglGlx.c
In file included from ../../../../programs/Xserver/GL/glx/glxserver.h:67,
                 from aglGlx.c:51:
../../../../programs/Xserver/GL/glx/glxscreens.h:43:32: GL/internal/glcore.h: No
such file or directory
In file included from ../../../../programs/Xserver/GL/glx/glxserver.h:67,
                 from aglGlx.c:51:
../../../../programs/Xserver/GL/glx/glxscreens.h:62: error: parse error before
"__GLinterface"
../../../../programs/Xserver/GL/glx/glxscreens.h:62: warning: no semicolon at
end of struct or union
../../../../programs/Xserver/GL/glx/glxscreens.h:76: error: parse error before
'*' token
../../../../programs/Xserver/GL/glx/glxscreens.h:76: warning: type defaults to
`int' in declaration of `modes'
../../../../programs/Xserver/GL/glx/glxscreens.h:76: warning: data definition
has no type or storage class
../../../../programs/Xserver/GL/glx/glxscreens.h:93: error: parse error before
'}' token
../../../../programs/Xserver/GL/glx/glxscreens.h:93: warning: type defaults to
`int' in declaration of `__GLXscreenInfo'
../../../../programs/Xserver/GL/glx/glxscreens.h:93: warning: data definition
has no type or storage class
In file included from ../../../../programs/Xserver/GL/glx/glxserver.h:68,
                 from aglGlx.c:51:
../../../../programs/Xserver/GL/glx/glxdrawable.h:43: error: parse error before
"__GLcontextModes"
../../../../programs/Xserver/GL/glx/glxdrawable.h:43: warning: no semicolon at
end of struct or union
../../../../programs/Xserver/GL/glx/glxdrawable.h:44: warning: type defaults to
`int' in declaration of `pGlxScreen'
../../../../programs/Xserver/GL/glx/glxdrawable.h:44: warning: data definition
has no type or storage class
../../../../programs/Xserver/GL/glx/glxdrawable.h:49: error: parse error before
'}' token
../../../../programs/Xserver/GL/glx/glxdrawable.h:49: warning: type defaults to
`int' in declaration of `__GLXpixmap'
../../../../programs/Xserver/GL/glx/glxdrawable.h:49: warning: data definition
has no type or storage class
../../../../programs/Xserver/GL/glx/glxdrawable.h:60: error: parse error before
"__GLXpixmap"
../../../../programs/Xserver/GL/glx/glxdrawable.h:60: warning: no semicolon at
end of struct or union
../../../../programs/Xserver/GL/glx/glxdrawable.h:72: error: parse error before
'*' token
../../../../programs/Xserver/GL/glx/glxdrawable.h:72: warning: type defaults to
`int' in declaration of `modes'
../../../../programs/Xserver/GL/glx/glxdrawable.h:72: warning: data definition
has no type or storage class
../../../../programs/Xserver/GL/glx/glxdrawable.h:100: error: parse error before
"glPriv"
../../../../programs/Xserver/GL/glx/glxdrawable.h:100: warning: type defaults to
`int' in declaration of `glPriv'
../../../../programs/Xserver/GL/glx/glxdrawable.h:100: warning: data definition
has no type or storage class
../../../../programs/Xserver/GL/glx/glxdrawable.h:106: error: parse error before
'}' token
In file included from ../../../../programs/Xserver/GL/glx/glxserver.h:69,
                 from aglGlx.c:51:
../../../../programs/Xserver/GL/glx/glxcontext.h:45:32: GL/internal/glcore.h: No
such file or directory
In file included from ../../../../programs/Xserver/GL/glx/glxserver.h:69,
                 from aglGlx.c:51:
../../../../programs/Xserver/GL/glx/glxcontext.h:65: error: parse error before
"__GLinterface"
../../../../programs/Xserver/GL/glx/glxcontext.h:65: warning: no semicolon at
end of struct or union
../../../../programs/Xserver/GL/glx/glxcontext.h:70: warning: type defaults to
`int' in declaration of `modes'
../../../../programs/Xserver/GL/glx/glxcontext.h:70: warning: data definition
has no type or storage class
../../../../programs/Xserver/GL/glx/glxcontext.h:77: error: parse error before
'*' token
../../../../programs/Xserver/GL/glx/glxcontext.h:77: warning: type defaults to
`int' in declaration of `pGlxScreen'
../../../../programs/Xserver/GL/glx/glxcontext.h:77: warning: data definition
has no type or storage class
../../../../programs/Xserver/GL/glx/glxcontext.h:107: error: conflicting types
for `idExists'
../../../../programs/Xserver/GL/glx/glxdrawable.h:46: error: previous
declaration of `idExists'
../../../../programs/Xserver/GL/glx/glxcontext.h:145: error: parse error before
'*' token
../../../../programs/Xserver/GL/glx/glxcontext.h:145: warning: type defaults to
`int' in declaration of `drawPixmap'
../../../../programs/Xserver/GL/glx/glxcontext.h:145: warning: data definition
has no type or storage class
../../../../programs/Xserver/GL/glx/glxcontext.h:146: error: parse error before
'*' token
../../../../programs/Xserver/GL/glx/glxcontext.h:146: warning: type defaults to
`int' in declaration of `readPixmap'
../../../../programs/Xserver/GL/glx/glxcontext.h:146: warning: data definition
has no type or storage class
../../../../programs/Xserver/GL/glx/glxcontext.h:153: error: parse error before
'}' token
In file included from aglGlx.c:51:
../../../../programs/Xserver/GL/glx/glxserver.h:93: error: parse error before
'*' token
../../../../programs/Xserver/GL/glx/glxserver.h:93: warning: type defaults to
`int' in declaration of `__glXActiveScreens'
../../../../programs/Xserver/GL/glx/glxserver.h:93: warning: data definition has
no type or storage class
In file included from aglGlx.c:55:
../../../../programs/Xserver/GL/glx/glxext.h:68: error: parse error before '*'
token
In file included from aglGlx.c:56:
../../../../programs/Xserver/GL/glx/glxutil.h:53: error: parse error before '*'
token
../../../../programs/Xserver/GL/glx/glxutil.h:56: error: parse error before '*'
token
../../../../programs/Xserver/GL/glx/glxutil.h:64: error: parse error before
"__GLcontextModes"
../../../../programs/Xserver/GL/glx/glxutil.h:69: error: parse error before
"__GLcontextModes"
aglGlx.c:58:32: GL/internal/glcore.h: No such file or directory
aglGlx.c:92: error: parse error before '*' token
aglGlx.c:92: error: parse error before '*' token
aglGlx.c:94: warning: type defaults to `int' in declaration of
`glAquaCreateContext'
aglGlx.c:94: warning: data definition has no type or storage class
aglGlx.c:108: error: parse error before "__glDDXScreenInfo"
aglGlx.c:108: warning: type defaults to `int' in declaration of
`__glDDXScreenInfo'
aglGlx.c:109: warning: initialization makes integer from pointer without a cast
aglGlx.c:110: warning: excess elements in scalar initializer
aglGlx.c:110: warning: (near initialization for `__glDDXScreenInfo')
aglGlx.c:111: warning: excess elements in scalar initializer
aglGlx.c:111: warning: (near initialization for `__glDDXScreenInfo')
aglGlx.c:112: warning: excess elements in scalar initializer
aglGlx.c:112: warning: (near initialization for `__glDDXScreenInfo')
aglGlx.c:113: warning: excess elements in scalar initializer
aglGlx.c:113: warning: (near initialization for `__glDDXScreenInfo')
aglGlx.c:114: warning: excess elements in scalar initializer
aglGlx.c:114: warning: (near initialization for `__glDDXScreenInfo')
aglGlx.c:115: warning: excess elements in scalar initializer
aglGlx.c:115: warning: (near initialization for `__glDDXScreenInfo')
aglGlx.c:116: warning: excess elements in scalar initializer
aglGlx.c:116: warning: (near initialization for `__glDDXScreenInfo')
aglGlx.c:117: warning: excess elements in scalar initializer
aglGlx.c:117: warning: (near initialization for `__glDDXScreenInfo')
aglGlx.c:118: warning: excess elements in scalar initializer
aglGlx.c:118: warning: (near initialization for `__glDDXScreenInfo')
aglGlx.c:120: warning: excess elements in scalar initializer
aglGlx.c:120: warning: (near initialization for `__glDDXScreenInfo')
aglGlx.c:120: warning: data definition has no type or storage class
aglGlx.c:123: error: `GL_CORE_APPLE' undeclared here (not in a function)
aglGlx.c:123: error: initializer element is not constant
aglGlx.c:123: error: (near initialization for `__glDDXExtensionInfo.type')
aglGlx.c:132: error: parse error before '*' token
aglGlx.c:133: error: parse error before '*' token
aglGlx.c:134: error: parse error before '*' token
aglGlx.c:135: error: parse error before '*' token
aglGlx.c:136: error: parse error before '*' token
aglGlx.c:138: error: parse error before '*' token
aglGlx.c:141: error: parse error before '*' token
aglGlx.c:142: error: parse error before '*' token
aglGlx.c:143: error: parse error before '*' token
aglGlx.c:146: error: parse error before '*' token
aglGlx.c:147: error: parse error before '*' token
aglGlx.c:148: error: parse error before '*' token
aglGlx.c:151: error: parse error before "glAquaExports"
aglGlx.c:151: warning: type defaults to `int' in declaration of `glAquaExports'
aglGlx.c:152: warning: initialization makes integer from pointer without a cast
aglGlx.c:153: warning: excess elements in scalar initializer
aglGlx.c:153: warning: (near initialization for `glAquaExports')
aglGlx.c:154: warning: excess elements in scalar initializer
aglGlx.c:154: warning: (near initialization for `glAquaExports')
aglGlx.c:155: warning: excess elements in scalar initializer
aglGlx.c:155: warning: (near initialization for `glAquaExports')
aglGlx.c:156: warning: excess elements in scalar initializer
aglGlx.c:156: warning: (near initialization for `glAquaExports')
aglGlx.c:157: warning: excess elements in scalar initializer
aglGlx.c:157: warning: (near initialization for `glAquaExports')
aglGlx.c:159: warning: excess elements in scalar initializer
aglGlx.c:159: warning: (near initialization for `glAquaExports')
aglGlx.c:160: warning: excess elements in scalar initializer
aglGlx.c:160: warning: (near initialization for `glAquaExports')
aglGlx.c:161: warning: excess elements in scalar initializer
aglGlx.c:161: warning: (near initialization for `glAquaExports')
aglGlx.c:163: warning: excess elements in scalar initializer
aglGlx.c:163: warning: (near initialization for `glAquaExports')
aglGlx.c:164: warning: excess elements in scalar initializer
aglGlx.c:164: warning: (near initialization for `glAquaExports')
aglGlx.c:166: warning: excess elements in scalar initializer
aglGlx.c:166: warning: (near initialization for `glAquaExports')
aglGlx.c:166: warning: data definition has no type or storage class
aglGlx.c:184: error: parse error before '*' token
aglGlx.c:191: error: field `interface' has incomplete type
aglGlx.c:200: error: parse error before '*' token
aglGlx.c: In function `glAquaDestroyContext':
aglGlx.c:204: error: `gc' undeclared (first use in this function)
aglGlx.c:204: error: (Each undeclared identifier is reported only once
aglGlx.c:204: error: for each function it appears in.)
aglGlx.c: At top level:
aglGlx.c:213: error: parse error before '*' token
aglGlx.c:223: error: parse error before '*' token
aglGlx.c: In function `attach':
aglGlx.c:231: error: `gc' undeclared (first use in this function)
aglGlx.c:239: error: invalid type argument of `->'
aglGlx.c:241: error: dereferencing pointer to incomplete type
aglGlx.c:242: error: dereferencing pointer to incomplete type
aglGlx.c:259: error: `x' undeclared (first use in this function)
aglGlx.c:259: error: `y' undeclared (first use in this function)
aglGlx.c:259: error: `w' undeclared (first use in this function)
aglGlx.c:259: error: `h' undeclared (first use in this function)
aglGlx.c: At top level:
aglGlx.c:295: error: parse error before '*' token
aglGlx.c: In function `glAquaMakeCurrent':
aglGlx.c:305: error: `gc' undeclared (first use in this function)
aglGlx.c: At top level:
aglGlx.c:308: error: parse error before '*' token
aglGlx.c:316: error: parse error before '*' token
aglGlx.c: In function `glAquaCopyContext':
aglGlx.c:320: error: `src' undeclared (first use in this function)
aglGlx.c:320: error: `dst' undeclared (first use in this function)
aglGlx.c:320: error: `mask' undeclared (first use in this function)
aglGlx.c: At top level:
aglGlx.c:324: error: parse error before '*' token
aglGlx.c: In function `glAquaForceCurrent':
aglGlx.c:327: error: `gc' undeclared (first use in this function)
aglGlx.c: At top level:
aglGlx.c:332: error: parse error before '*' token
aglGlx.c:338: error: parse error before '*' token
aglGlx.c:343: error: parse error before '*' token
aglGlx.c:349: error: parse error before '*' token
aglGlx.c:355: error: parse error before '*' token
aglGlx.c:360: error: parse error before '*' token
aglGlx.c:366: error: parse error before '*' token
aglGlx.c: In function `makeFormat':
aglGlx.c:379: error: `mode' undeclared (first use in this function)
aglGlx.c: At top level:
aglGlx.c:438: error: parse error before '*' token
aglGlx.c:438: error: parse error before '*' token
aglGlx.c:441: warning: return type defaults to `int'
aglGlx.c: In function `glAquaCreateContext':
aglGlx.c:442: error: `__GLcontext' undeclared (first use in this function)
aglGlx.c:442: error: `result' undeclared (first use in this function)
aglGlx.c:443: error: `sharectx' undeclared (first use in this function)
aglGlx.c:443: error: parse error before ')' token
aglGlx.c:448: error: parse error before ')' token
aglGlx.c:451: error: `imports' undeclared (first use in this function)
aglGlx.c:454: error: `mode' undeclared (first use in this function)
aglGlx.c:476: error: `__GLinterface' undeclared (first use in this function)
aglGlx.c:476: error: parse error before ')' token
aglGlx.c: In function `glAquaRealizeWindow':
aglGlx.c:503: error: `__GLcontext' undeclared (first use in this function)
aglGlx.c:503: error: `gc' undeclared (first use in this function)
aglGlx.c:504: error: `__GLdrawablePrivate' undeclared (first use in this
function)
aglGlx.c:504: error: dereferencing pointer to incomplete type
aglGlx.c:508: error: dereferencing pointer to incomplete type
aglGlx.c:508: error: dereferencing pointer to incomplete type
aglGlx.c:509: error: parse error before ')' token
aglGlx.c:510: error: dereferencing pointer to incomplete type
aglGlx.c:510: error: dereferencing pointer to incomplete type
aglGlx.c:511: error: dereferencing pointer to incomplete type
aglGlx.c:511: error: dereferencing pointer to incomplete type
aglGlx.c:515: error: dereferencing pointer to incomplete type
aglGlx.c:515: error: dereferencing pointer to incomplete type
aglGlx.c:516: error: parse error before ')' token
aglGlx.c:517: error: dereferencing pointer to incomplete type
aglGlx.c:517: error: dereferencing pointer to incomplete type
aglGlx.c:518: error: dereferencing pointer to incomplete type
aglGlx.c:518: error: dereferencing pointer to incomplete type
aglGlx.c: In function `glAquaUnrealizeWindow':
aglGlx.c:543: error: `__GLcontext' undeclared (first use in this function)
aglGlx.c:543: error: `gc' undeclared (first use in this function)
aglGlx.c:547: error: dereferencing pointer to incomplete type
aglGlx.c:547: error: dereferencing pointer to incomplete type
aglGlx.c:548: error: parse error before ')' token
aglGlx.c:553: error: dereferencing pointer to incomplete type
aglGlx.c:553: error: dereferencing pointer to incomplete type
aglGlx.c:554: error: parse error before ')' token
aglGlx.c: In function `glAquaScreenProbe':
aglGlx.c:1002: error: request for member `pGlxVisual' in something not a
structure or union
aglGlx.c:1003: error: request for member `pVisualPriv' in something not a
structure or union
aglGlx.c:1004: error: request for member `numVisuals' in something not a
structure or union
aglGlx.c:1005: error: request for member `numUsableVisuals' in something not a
structure or union
aglGlx.c:1011: error: request for member `createContext' in something not a
structure or union
aglGlx.c: At top level:
aglGlx.c:1037: error: parse error before '*' token
aglGlx.c: In function `glAquaResizeBuffers':
aglGlx.c:1043: error: invalid type argument of `->'
aglGlx.c:1045: error: `__GLcontext' undeclared (first use in this function)
aglGlx.c:1045: error: `gc' undeclared (first use in this function)
aglGlx.c:1046: error: invalid type argument of `->'
aglGlx.c:1051: error: dereferencing pointer to incomplete type
aglGlx.c:1051: error: dereferencing pointer to incomplete type
aglGlx.c:1052: error: parse error before ')' token
aglGlx.c:1053: error: `x' undeclared (first use in this function)
aglGlx.c:1053: error: `y' undeclared (first use in this function)
aglGlx.c:1057: error: dereferencing pointer to incomplete type
aglGlx.c:1057: error: dereferencing pointer to incomplete type
aglGlx.c:1058: error: parse error before ')' token
aglGlx.c:1062: error: `buffer' undeclared (first use in this function)
aglGlx.c:1062: error: `bufferMask' undeclared (first use in this function)
aglGlx.c: In function `glAquaSwapBuffers':
aglGlx.c:1072: error: `__GLcontext' undeclared (first use in this function)
aglGlx.c:1072: error: `gc' undeclared (first use in this function)
aglGlx.c:1072: error: parse error before ')' token
aglGlx.c: At top level:
aglGlx.c:1078: error: parse error before '*' token
aglGlx.c: In function `glAquaDestroyDrawablePrivate':
aglGlx.c:1082: error: invalid type argument of `->'
aglGlx.c:1083: error: invalid type argument of `->'
aglGlx.c: In function `glAquaCreateBuffer':
aglGlx.c:1089: error: `__GLdrawablePrivate' undeclared (first use in this
function)
aglGlx.c:1089: error: dereferencing pointer to incomplete type
aglGlx.c:1094: error: dereferencing pointer to incomplete type
aglGlx.c:1097: error: invalid type argument of `->'
aglGlx.c:1098: error: invalid type argument of `->'
aglGlx.c:1101: error: invalid type argument of `->'
aglGlx.c:1102: error: invalid type argument of `->'
make[2]: *** [aglGlx.o] Error 1
make[1]: *** [apple] Error 2
make: *** [GL] Error 2
-- snip --
Comment 1 Torrey T. Lyons 2004-07-21 15:43:30 UTC
Yes, the latest DRI merge caused serious problems for AppleDRI. You'll also see lots of breakage in xc/
lib/GL on Mac OS X 10.3 and newer, which is the underlying problem. I'm working on bringing AppleDRI 
up to date.
Comment 2 Torrey T. Lyons 2004-07-21 15:45:13 UTC
Assigning to me.
Comment 3 Alexander Gottwald 2004-07-27 13:21:16 UTC
Created attachment 531 [details] [review]
changes from cygwin 

maybe the changes from cygwin are helpful. the diff contains only changes which
were added to import the old 4.4.0 GL backend to head.

GL/include/glcore.h should be pulled in with -I$(MESASRCDIR)/include. This is
missing in apple/Imakefile
Comment 4 Torrey T. Lyons 2004-07-27 13:36:39 UTC
I've fixed this issue and the libGL build problems on Mac OS X 10.3.4. libGL still needs work on earlier 
versions. I'll close when that is done.

Thanks for the patch Alexander. Unfortunately I noticed it after I had fixed the build, but the 
fixes are pretty much identical to your patch.
Comment 5 Torrey T. Lyons 2004-07-29 18:52:17 UTC
The GL library with AppleDRI support now builds correctly on Mac OS X for all the versions I have 
tested. In particular some problems building with Mac OS X 10.2.3-10.2.8 and Mac OS X 10.3.0-10.3.3 
have  been fixed. Unfortunately these two cases produce different libGL binaries than Mac OS X 10.3.4 
as libGL needs to track changes in Apple's underlying OpenGL framework.

Closing.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.