[Mesa-users] Cross-Compiling Mesa for Windows
Martin von Gagern
Martin.vGagern at gmx.net
Mon Oct 25 07:25:12 PDT 2010
I'm currently trying to follow http://www.mesa3d.org/install.html#scons
in an attempt to get a Mesa OpenGL library for Windows. I'm using Gentoo
Linux on AMD64 as my build system. So far I've encountered some pitfalls:
1. I had to run "gcc-config -f" on the mingw32 compiler profile. I
assume this is an issue specific to Gentoo, but I'll mention it here
nevertheless, as it might help others. Without this I got the following
error message repeatedly:
gcc-config error: Could not run/locate "mingw32-gcc"
2. src/gallium/targets/dri-swrast/SConscript unconditionally references
ws_dri which seems to be exported by dri/SConscript only for the linux
platform. I commented out the corresponding line in order to avoid this
NameError: name 'ws_dri' is not defined:
File ".../mesa/SConstruct", line 212:
duplicate = 0 # ...
File ".../SCons/Script/SConscript.py", line 614:
return method(*args, **kw)
File ".../SCons/Script/SConscript.py", line 260:
exec _file_ in call_stack[-1].globals
File ".../mesa/src/gallium/targets/dri-swrast/SConscript", line 11:
3. I still got errors about missing files, first sys/ioccom.h then
xf86drm.h. I finally decided to add "dri=no" to the scons invocation:
scons platform=windows toolchain=crossmingw machine=x86 \
statetrackers=mesa drivers=softpipe,trace winsys=gdi dri=no
That made the build work. Now I could even undo the change mentioned
above, as the dri directories seemed to be no longer relevant.
I suggest someone change the default to dri=no if platform=windows. If
there is a reason against this, you might want to modify the
documentation to include the dri=no switch explicitly.
I also suggest you avoid the backtrace even if it doesn't occur for this
suggested command line. You can probably think of a better way to fix
this in python than I can just now.
Now I'll only have to see if the compiled opengl32.dll actually enables
a Windows on a machine without a fragment shader to emulate that shader
by doing the whole OpenGL pipeline on the CPU. Will be interesting.
Martin von Gagern
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 259 bytes
Desc: OpenPGP digital signature
More information about the mesa-users