I am trying to compile Wine under Snow Leopard and I finally managed to fix the issue where it could find the OpenGL development headers, but... having done that, it finds the wrong OpenGL libraries by default, in other words, running ./configure with: ./configure CPPFLAGS='-I/usr/X11/include' Results in: checking for GL/gl.h... yes checking for GL/glx.h... yes checking for GL/glu.h... yes checking for up-to-date OpenGL version... yes checking for -lGL... libGL.1.dylib checking for -lGLU... libGLU.1.dylib But at runtime it can't find the .1 versions of the libraries - I'm guessing because those aren't in the OpenGL framework folder. So, to make this work I'm assuming it needs to use libGL.dylib file instead. So, in a desperate attempt to fix this issue, I tried: ./configure CPPFLAGS='-I/usr/X11/include' LDFLAGS='-L/System/Library/Frameworks/OpenGL.framework/Libraries' And this results in: checking for GL/gl.h... yes checking for GL/glx.h... yes checking for GL/glu.h... yes checking for up-to-date OpenGL version... yes checking for -lGL... not found checking for -lGL... not found checking for -lGLU... libGLU.dylib So now it finds the correct libGLU.dylib, but doesn't find libGL.dylib, which exists in the same directory. I think these problems are probably due to changes in Snow Leopard, in theory, all I should need to do is ./configure and it should all just work, but the OpenGL stuff is broken quite well.
On Sep 4, 2009, at 6:35 AM, raziel2001au wrote:> I am trying to compile Wine under Snow Leopard and I finally managed > to fix the issue where it could find the OpenGL development headers, > but... having done that, it finds the wrong OpenGL libraries by > default, in other words, running ./configure with: > ... > But at runtime it can't find the .1 versions of the libraries - I'm > guessing because those aren't in the OpenGL framework folder. So, to > make this work I'm assuming it needs to use libGL.dylib file > instead. So, in a desperate attempt to fix this issue, I tried: > .... > So now it finds the correct libGLU.dylib, but doesn't find > libGL.dylib, which exists in the same directory. I think these > problems are probably due to changes in Snow Leopard, in theory, all > I should need to do is ./configure and it should all just work, but > the OpenGL stuff is broken quite well.OpenGL stuff is not broken, just... changed. You need to specify the path to X11, since Wine uses X and not system/Cocoa frameworks. Quick and dirty: export CC="gcc -arch i386 -m32" export CXX="g++ -arch i386 -m32" export CPPFLAGS="-I/usr/X11/include " LDFLAGS="-L/usr/X11/lib " LDFLAGS+="-framework CoreServices -lz -L/usr/X11/lib -lGL -lGLU " export LDFLAGS ./configure Once Wine is built and installed, you will also need to specify where to look for libs at runtime as well: DYLD_FALLBACK_LIBRARY_PATH="/usr/X11/lib:/usr/lib" wine progname.exe So OpenGL is not broken; Mac OS X is picky, or broken to an extent, and library search paths have to be set as such. I have had zero time to touch Wine+Mac OS X recently. OpenGL apps work - at least simple tests like wglgears - but I've run into some issues with the Direct3D bits that I have, again, had zero time to investigate. I do have a working Wine 1.1.29 built on Snow Leopard running a few OpenGL apps, Firefox, etc., so a build is definitely doable. ryan woodsmall rwoodsmall at mac.com
raziel2001au
2009-Sep-05 08:53 UTC
[Wine] Re: Making wine use the correct OpenGL libraries
Sorry, but I can't agree with you there... firstly, I haven't run into the 64-bit compilation issue you've mentioned at all - it seems to automatically set -m32 for me. With regards to OpenGL, I would say it is very much broken because it refuses to use the OpenGL library file it should be using. If you do a ./configure (without parameters), it should automatically pick up the correct library/headers, but on Snow Leopard it doesn't. The header issue can be fixed with a -I/usr/X11/include. At this point it picks up GL libraries automatically, but it picks up libGL.1.dylib, which is NOT the correct library, it should be using the one in the frameworks folder (libGL.dylib), otherwise you'll run into the situation where you have to specify library fallback paths for it to work. On top of this, it is not guaranteed to work on other systems, if another user only has libGL.dylib, it won't work. You can force it to look in /System/Library/Frameworks/OpenGL.framework/Libraries, but it refuses to see libGL.dylib, which is the library it should be using. It really just skips over it for some reason. If I'm not mistaken I think the full path to that file is even hardcoded in the configure script - but it gets skipped and picks libGL.1.dylib instead. The reason you have to enter a fallback library path is because your compiles are not using the correct GL library, as in, the one in the OpenGL.framework folder. If you compile under Leopard and transfer the binaries over to Snow Leopard, you do not need to specify fallback library paths or anything ridiculous like that - it just works and the result is transferrable to other Mac systems.
raziel2001au
2009-Sep-06 14:29 UTC
[Wine] Re: Making wine use the correct OpenGL libraries
ryan woodsmall wrote:> > Well, all I can say is you're wrong. > > Wine is an X11 program, no matter what *nix platform (Linux, BSD, OS > X) you're running on. It *has* to use the libGL provided by X11. You > don't have an understanding of how GL/GLX work under X11 on OS X - the GL libs under /usr/X11/lib are essentially wrappers around the the > OpenGL framework. However, you cannot simply link Wine directly > against the system framework since the X11 interface that Wine uses is > not provided by the system frameworks. This is fact.Okay, I get what you're saying - I really wish they'd document the proper compilation command on the Mac wiki page along with instructions on running it because it would have saved me days of trouble...
dimensio:> >raziel2001au wrote: >> >> Okay, I get what you're saying - I really wish they'd document the proper compilation command on the Mac wiki page along with instructions on running it because it would have saved me days of trouble... > > >The wiki can be edited by anyone. Feel free to update it. >And it is very out of date according to Austin. I would help, but I'm trying to solve a long standing missing component from Richedit that several programs I use needs. James McKenzie
raziel2001au
2009-Sep-07 14:02 UTC
[Wine] Re: Making wine use the correct OpenGL libraries
Hmm, I probably should - I just have to pull the courage together and go for it... There is still a lot of stuff I don't know about compiling Wine though, but I can update the wiki so at least a basic compile works with 3D acceleration.
raziel2001au
2009-Sep-12 02:34 UTC
[Wine] Re: Making wine use the correct OpenGL libraries
ryan woodsmall wrote:> I have a prereq and wine compile/install script almost complete; > Austin English had worked on one previously, but I've lost the mail/ > thread, apparently. Will hopefully have something preliminary (i.e., > maybe working but buggy) to send tomorrow.I haven't actually run into the 64-bit issue on 1.1.29 though - it adds -m32 and such automagically for me - and it just works, Direct3D included. I don't know if that's what you meant.