[Mesa-users] Cross-Compiling Mesa for Windows
Martin von Gagern
Martin.vGagern at gmx.net
Mon Oct 25 07:25:12 PDT 2010
Hi!
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
error message:
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:
ws_dri,
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.
Greetings,
Martin von Gagern
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-users/attachments/20101025/f363b263/attachment.pgp>
More information about the mesa-users
mailing list