Bug 20413 - Mac OS build broken
Summary: Mac OS build broken
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: 7.5
Hardware: x86 (IA32) Mac OS X (All)
: medium critical
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-01 14:04 UTC by Vinson Lee
Modified: 2009-09-08 08:20 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Define Xlib types for Mac EGL, too (460 bytes, patch)
2009-03-01 19:27 UTC, Dan Nicholson
Details | Splinter Review

Description Vinson Lee 2009-03-01 14:04:18 UTC
The git/master build of Mesa on Mac OS is currently broken.

Mesa-7.3 - ok
Mesa-7.5-devel-20090205 - ok
Mesa-7.5-devel-20090209 - ok
Mesa-7.5-devel-20090224 - bad

gcc -c -I../../../include -I../../../src/mesa/glapi -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing  -fno-common   -DUSE_XSHM -D_EGL_PLATFORM_X=1 eglapi.c -o eglapi.o
In file included from ../../../include/EGL/egl.h:13,
                 from egltypedefs.h:6,
                 from eglcontext.h:6,
                 from eglapi.c:36:
../../../include/EGL/eglplatform.h:87: error: syntax error before ‘EGLNativeDisplayType’
../../../include/EGL/eglplatform.h:87: warning: type defaults to ‘int’ in declaration of ‘EGLNativeDisplayType’
../../../include/EGL/eglplatform.h:87: warning: data definition has no type or storage class
../../../include/EGL/eglplatform.h:88: error: syntax error before ‘EGLNativePixmapType’
../../../include/EGL/eglplatform.h:88: warning: type defaults to ‘int’ in declaration of ‘EGLNativePixmapType’
../../../include/EGL/eglplatform.h:88: warning: data definition has no type or storage class
../../../include/EGL/eglplatform.h:89: error: syntax error before ‘EGLNativeWindowType’
../../../include/EGL/eglplatform.h:89: warning: type defaults to ‘int’ in declaration of ‘EGLNativeWindowType’
../../../include/EGL/eglplatform.h:89: warning: data definition has no type or storage class
In file included from egltypedefs.h:6,
                 from eglcontext.h:6,
                 from eglapi.c:36:
../../../include/EGL/egl.h:227: error: syntax error before ‘EGLint’
../../../include/EGL/egl.h:229: error: syntax error before ‘EGLDisplay’
../../../include/EGL/egl.h:229: error: syntax error before ‘display_id’
../../../include/EGL/egl.h:230: error: syntax error before ‘EGLBoolean’
../../../include/EGL/egl.h:231: error: syntax error before ‘EGLBoolean’
../../../include/EGL/egl.h:233: error: syntax error before ‘const’
../../../include/EGL/egl.h:235: error: syntax error before ‘EGLBoolean’
../../../include/EGL/egl.h:237: error: syntax error before ‘EGLBoolean’
../../../include/EGL/egl.h:240: error: syntax error before ‘EGLBoolean’
../../../include/EGL/egl.h:243: error: syntax error before ‘EGLSurface’
../../../include/EGL/egl.h:244: error: syntax error before ‘EGLNativeWindowType’
../../../include/EGL/egl.h:246: error: syntax error before ‘EGLSurface’
../../../include/EGL/egl.h:248: error: syntax error before ‘EGLSurface’
../../../include/EGL/egl.h:249: error: syntax error before ‘EGLNativePixmapType’
../../../include/EGL/egl.h:251: error: syntax error before ‘EGLBoolean’
../../../include/EGL/egl.h:252: error: syntax error before ‘EGLBoolean’
../../../include/EGL/egl.h:255: error: syntax error before ‘EGLBoolean’
../../../include/EGL/egl.h:256: error: syntax error before ‘EGLenum’
../../../include/EGL/egl.h:258: error: syntax error before ‘EGLBoolean’
../../../include/EGL/egl.h:260: error: syntax error before ‘EGLBoolean’
../../../include/EGL/egl.h:262: error: syntax error before ‘EGLSurface’
../../../include/EGL/egl.h:266: error: syntax error before ‘EGLBoolean’
../../../include/EGL/egl.h:268: error: syntax error before ‘EGLBoolean’
../../../include/EGL/egl.h:269: error: syntax error before ‘EGLBoolean’
../../../include/EGL/egl.h:272: error: syntax error before ‘EGLBoolean’
../../../include/EGL/egl.h:275: error: syntax error before ‘EGLContext’
../../../include/EGL/egl.h:278: error: syntax error before ‘EGLBoolean’
../../../include/EGL/egl.h:279: error: syntax error before ‘EGLBoolean’
../../../include/EGL/egl.h:282: error: syntax error before ‘EGLContext’
../../../include/EGL/egl.h:283: error: syntax error before ‘EGLSurface’
../../../include/EGL/egl.h:284: error: syntax error before ‘EGLDisplay’
../../../include/EGL/egl.h:285: error: syntax error before ‘EGLBoolean’
../../../include/EGL/egl.h:288: error: syntax error before ‘EGLBoolean’
../../../include/EGL/egl.h:289: error: syntax error before ‘EGLBoolean’
../../../include/EGL/egl.h:290: error: syntax error before ‘EGLBoolean’
../../../include/EGL/egl.h:291: error: syntax error before ‘EGLBoolean’
../../../include/EGL/egl.h:292: error: syntax error before ‘EGLNativePixmapType’
../../../include/EGL/egl.h:294: error: syntax error before ‘void’
In file included from egltypedefs.h:7,
                 from eglcontext.h:6,
                 from eglapi.c:36:
../../../include/EGL/eglext.h:71: error: syntax error before ‘EGLBoolean’
../../../include/EGL/eglext.h:72: error: syntax error before ‘EGLBoolean’
../../../include/EGL/eglext.h:84: error: syntax error before ‘EGLImageKHR’
../../../include/EGL/eglext.h:85: error: syntax error before ‘EGLBoolean’
../../../include/EGL/eglext.h:143: error: syntax error before ‘EGLBoolean’
../../../include/EGL/eglext.h:144: error: syntax error before ‘EGLBoolean’
../../../include/EGL/eglext.h:145: error: syntax error before ‘EGLBoolean’
../../../include/EGL/eglext.h:146: error: syntax error before ‘EGLBoolean’
../../../include/EGL/eglext.h:147: error: syntax error before ‘EGLSurface’
../../../include/EGL/eglext.h:148: error: syntax error before ‘EGLBoolean’
../../../include/EGL/eglext.h:149: error: syntax error before ‘EGLBoolean’
../../../include/EGL/eglext.h:150: error: syntax error before ‘EGLBoolean’
../../../include/EGL/eglext.h:151: error: syntax error before ‘EGLBoolean’
../../../include/EGL/eglext.h:152: error: syntax error before ‘EGLBoolean’
../../../include/EGL/eglext.h:153: error: syntax error before ‘const’
../../../include/EGL/eglext.h:175: error: syntax error before ‘EGLBoolean’
In file included from eglapi.c:37:
egldisplay.h:13: error: syntax error before ‘EGLNativeDisplayType’
egldisplay.h:13: warning: no semicolon at end of struct or union
egldisplay.h:29: error: syntax error before ‘}’ token
egldisplay.h:33: error: syntax error before ‘displayName’
In file included from egldriver.h:6,
                 from eglapi.c:40:
eglapi.h:30: error: syntax error before ‘NativeWindowType’
eglapi.h:31: error: syntax error before ‘NativePixmapType’
eglapi.h:40: error: syntax error before ‘NativePixmapType’
In file included from eglapi.c:41:
eglsurface.h:72: error: syntax error before ‘NativePixmapType’
eglsurface.h:80: error: syntax error before ‘NativeWindowType’
eglsurface.h:84: error: syntax error before ‘NativePixmapType’
eglapi.c:50: error: syntax error before ‘nativeDisplay’
eglapi.c:51: warning: no previous prototype for ‘eglGetDisplay’
eglapi.c: In function ‘eglGetDisplay’:
eglapi.c:54: error: ‘nativeDisplay’ undeclared (first use in this function)
eglapi.c:54: error: (Each undeclared identifier is reported only once
eglapi.c:54: error: for each function it appears in.)
eglapi.c: In function ‘eglInitialize’:
eglapi.c:74: error: dereferencing pointer to incomplete type
eglapi.c:75: error: dereferencing pointer to incomplete type
eglapi.c:76: error: dereferencing pointer to incomplete type
eglapi.c:77: error: dereferencing pointer to incomplete type
eglapi.c:81: error: dereferencing pointer to incomplete type
eglapi.c:81: error: dereferencing pointer to incomplete type
eglapi.c:84: error: dereferencing pointer to incomplete type
eglapi.c:85: error: dereferencing pointer to incomplete type
eglapi.c:86: error: dereferencing pointer to incomplete type
eglapi.c:86: error: dereferencing pointer to incomplete type
eglapi.c:87: error: dereferencing pointer to incomplete type
eglapi.c: At top level:
eglapi.c:182: error: syntax error before ‘NativeWindowType’
eglapi.c:183: warning: no previous prototype for ‘eglCreateWindowSurface’
eglapi.c: In function ‘eglCreateWindowSurface’:
eglapi.c:184: error: ‘dpy’ undeclared (first use in this function)
eglapi.c:185: error: ‘config’ undeclared (first use in this function)
eglapi.c:185: error: ‘window’ undeclared (first use in this function)
eglapi.c:185: error: ‘attrib_list’ undeclared (first use in this function)
eglapi.c: At top level:
eglapi.c:190: error: syntax error before ‘NativePixmapType’
eglapi.c:191: warning: no previous prototype for ‘eglCreatePixmapSurface’
eglapi.c: In function ‘eglCreatePixmapSurface’:
eglapi.c:192: error: ‘dpy’ undeclared (first use in this function)
eglapi.c:193: error: ‘config’ undeclared (first use in this function)
eglapi.c:193: error: ‘pixmap’ undeclared (first use in this function)
eglapi.c:193: error: ‘attrib_list’ undeclared (first use in this function)
eglapi.c: At top level:
eglapi.c:262: error: syntax error before ‘NativePixmapType’
eglapi.c:263: warning: no previous prototype for ‘eglCopyBuffers’
eglapi.c: In function ‘eglCopyBuffers’:
eglapi.c:264: error: ‘dpy’ undeclared (first use in this function)
eglapi.c:265: error: ‘surface’ undeclared (first use in this function)
eglapi.c:265: error: ‘target’ undeclared (first use in this function)
Comment 1 Dan Nicholson 2009-03-01 19:27:10 UTC
Created attachment 23428 [details] [review]
Define Xlib types for Mac EGL, too

I think that this is because EGL has only recently been enabled. We can either disable the EGL build on Mac or fix up eglplatform.h to work on Mac. I've never built mesa on mac, but I'm guessing that EGL will just use Xlib like Linux. Can you try this patch?

Probably this needs some attention from the Mac X people.
Comment 2 Vinson Lee 2009-03-01 19:40:51 UTC
% make
Making sources for autoconf
(cd drivers && make)
make[4]: Nothing to be done for `default'.
make[5]: Nothing to be done for `osmesa8'.
/bin/sh ../../../bin/mklib -o EGL -linker 'gcc' -ldflags '' \
		-major 1 -minor 0 \
		-install ../../../lib \
		 -L/usr/X11/lib -lX11 -lXau -lXdmcp     eglapi.o eglconfig.o eglconfigutil.o eglcontext.o egldisplay.o egldriver.o eglglobals.o egllog.o eglhash.o eglmisc.o eglmode.o eglscreen.o eglstring.o eglsurface.o eglx.o
mklib: Making Darwin shared library:  libEGL.1.0.dylib
mklib: Installing libEGL.1.0.dylib libEGL.1.dylib libEGL.dylib in ../../../lib
/bin/sh ../../../../bin/mklib -o demodriver.so -noprefix -linker 'gcc' \
		-ldflags '' -install ../../../../lib \
		demo.o
mklib: Making Darwin shared library:  libdemodriver.so.1.0.dylib
Undefined symbols:
  "__eglAddScreen", referenced from:
      _demoInitialize in demo.o
  "__eglRemoveContext", referenced from:
      _demoDestroyContext in demo.o
  "__eglLookupDisplay", referenced from:
      _demoInitialize in demo.o
  "__eglInitConfig", referenced from:
      _demoInitialize in demo.o
  "__eglError", referenced from:
      _demoCreateContext in demo.o
      _demoCreateContext in demo.o
      _demoCreateWindowSurface in demo.o
      _demoCreatePixmapSurface in demo.o
      _demoCreatePixmapSurface in demo.o
      _demoCreatePixmapSurface in demo.o
  "__eglRemoveSurface", referenced from:
      _demoDestroySurface in demo.o
  "__eglGetContextHandle", referenced from:
      _demoCreateContext in demo.o
      _demoCreateContext in demo.o
  "__eglAddConfig", referenced from:
      _demoInitialize in demo.o
  "__eglLookupContext", referenced from:
      _LookupDemoContext in demo.o
  "__eglSaveContext", referenced from:
      _demoCreateContext in demo.o
  "__eglInitContext", referenced from:
      _demoCreateContext in demo.o
  "__eglLookupConfig", referenced from:
      _demoCreateContext in demo.o
      _demoCreatePixmapSurface in demo.o
  "__eglLookupSurface", referenced from:
      _LookupDemoSurface in demo.o
  "__eglInitDriverFallbacks", referenced from:
      __eglMain in demo.o
  "__eglSetConfigAttrib", referenced from:
      _demoInitialize in demo.o
      _demoInitialize in demo.o
      _demoInitialize in demo.o
      _demoInitialize in demo.o
      _demoInitialize in demo.o
      _demoInitialize in demo.o
      _demoInitialize in demo.o
      _demoInitialize in demo.o
  "__eglAddNewMode", referenced from:
      _demoInitialize in demo.o
      _demoInitialize in demo.o
      _demoInitialize in demo.o
      _demoInitialize in demo.o
  "__eglInitSurface", referenced from:
      _demoCreatePbufferSurface in demo.o
  "__eglMakeCurrent", referenced from:
      _demoMakeCurrent in demo.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
mklib: Installing libdemodriver.so.1.0.dylib libdemodriver.so.1.dylib libdemodriver.so.dylib in ../../../../lib
mv: rename libdemodriver.so.1.0.dylib to ../../../../lib/libdemodriver.so.1.0.dylib: No such file or directory
make[4]: *** [../../../../lib/demodriver.so] Error 1
make[3]: *** [subdirs] Error 1
make[2]: *** [subdirs] Error 1
make[1]: *** [subdirs] Error 1
make: *** [default] Error 1
Comment 3 Marian Such 2009-09-07 14:01:51 UTC
half a year and still not fixed?
is it really so hard to fix this one? (seems like blocker to me)

marian
Comment 4 Brian Paul 2009-09-08 08:20:29 UTC
(In reply to comment #3)
> half a year and still not fixed?
> is it really so hard to fix this one? (seems like blocker to me)

I don't think anyone's developing/using Mesa's EGL on MacOS yet so this area hasn't received much attention.

The proposed patch looks like a bandage to me.  Ideally, there should be a distinction between building EGL on Mac OS targetting X vs. targetting the native window system (Quartz).

That said, I guess we can apply the patch for now since it doesn't seem to harm anything.


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.