daniel_zh9 wrote: > > Code: > err:wgl:opengl_error No OpenGL support compiled in. > > > I'm the maintainer of wine in MacPorts, trying to figure out how to solve this problem (http://trac.macports.org/ticket/22293). Any help would be appreciated, including a reproduction recipe or a link to a Windows program I could install to see this error. doh123 wrote: > when you did a ./configure did the result say OpenGl wouldn't be available? might have compiled it wrong. On my Snow Leopard 10.6.2 system with Xcode 3.2.1, it seems to find it; wine 1.1.33's configure says: Code: configure checking for GL/gl.h... yes configure checking for GL/glx.h... yes configure checking for GL/glu.h... yes configure checking for up-to-date OpenGL version... yes doh123 wrote: > also on some machines you need to set a variable for it to find things right for X11. > > > Code: > DYLD_FALLBACK_LIBRARY_PATH="/usr/X11/lib:/usr/lib" wine program_name.exe > > This is not necessary in MacPorts because /opt/local/bin/wine is actually a shell script with the following contents: Code: #!/bin/sh # $Id$ DYLD_FALLBACK_LIBRARY_PATH="/opt/local/lib" \ "/opt/local/libexec/wine/wine" "$@" The actual wine executable has been moved to /opt/local/libexec/wine/wine. The fallback library path used to also contain the system's X11 library directory (/usr/X11R6/lib on Tiger and older; /usr/X11/lib on Leopard and newer) but this was removed in r50572 (http://trac.macports.org/changeset/50572) because MacPorts now uses its own copy of X11, not the system's, for reasons explained in our FAQ (http://trac.macports.org/wiki/FAQ#syslibs). doh123 wrote: > > zealite wrote: > > Running the program with doh123's code failed to fix the problem. I'm still getting the same error. > > > because Macports compiled it wrong on your machine... it does that. Your better off building it yourself from source. The purpose of having a package management system like MacPorts is to encapsulate a recipe that will result in software being correctly installed on an operating system. (For MacPorts, the target OS is understandably Mac OS X.) It is more efficient for one person (the port maintainer -- me) to figure out how to configure and compile a program than for everyone to have to do it. Therefore I would prefer that we would amend the recipe until it works (please file bug reports (http://guide.macports.org/chunked/project.html#project.tickets) against ports that don't work) rather than throw it out entirely (building from source manually as you suggested). doh123 wrote: > If you want to use Macports, do the follwoing in the same session you then afterwards use macports to get wine on... > > > > export CFLAGS="-arch i386 -m32" > > export CXXFLAGS="$CFLAGS" > > export CPPFLAGS="-I/usr/X11/include" > > export LDFLAGS="-L/usr/X11/lib" > This will have no effect in MacPorts because it deliberately clears the user's environment, to ensure a consistent experience. The wine and wine-devel ports in MacPorts are hardwired to build for i386 only, even on Snow Leopard where the default is to build for x86_64. For this to work, all dependencies must either be built for i386 only as well, or built universal for i386 and x86_64. The latter is recommended, and accomplished by using the +universal variant. (universal_archs must also be set to "x86_64 i386" in /opt/local/etc/macports/macports.conf but this is the default on Snow Leopard.) If the user forgets to build dependencies universal, the wine ports detect this and suggest the user do this. If the user would rather build everything for i386 only, this can be done by setting build_arch to i386 in macports.conf. doh123 wrote: > did you remove X11 off your system? or did you (or Macports automatically) try to change out x.org files? Does your X11 still function correctly? > > open up Terminal and type in... > > > Code: > /usr/X11/bin/glxgears > > > > if X11.app fires up right, and you get a window showing colored gears spinning... then your X11 and OpenGL are working fine. MacPorts does not modify (or use) the system's X11; MacPorts shouldn't be modifying any part of Mac OS X, in fact; the whole point of MacPorts is to be self-contained. /usr/X11/bin/glxgears (which uses the system's X11 libraries) and /opt/local/bin/glxgears (which uses MacPorts') both work fine on my system.