为 windows 7 构建 Mesa.Mesa 9.1 [英] Building Mesa for windows 7. Mesa 9.1
问题描述
我完成了 Mesa 站点上编译/安装页面上的所有步骤,并阅读了常见问题解答.您发送到 scons 进行编译的最后一条命令会在 python 脚本中引发错误.这是我的输出.我究竟做错了什么?另外,如果有人使用最新的 mesa 和 mingw 或 VS2012 为 mesa 编译了 dll,请分享!
I went through all the steps on the compiling / installing page on Mesa's site, and read the FAQ. The final command that you send to scons for compilation throws errors within python scripts. This is my output. What am I doing wrong? Also if anyone has compiled dll's for mesa using up to date mesa and mingw, or VS2012, then please share!
这是我的输出,我很长时间没有编写 python 了,但似乎地图/字典不包含键/值对.
Here is my output, I haven't programmed python in a long time but it appears a map/dictionary doesn't contain the key/value pair.
C:DownloadsMesaLib-9.1.5Mesa-9.1.5>scons platform=windows toolchain=crossming
w machine=x86_64 mesagdi libgl-gdi
scons: Reading SConscript files ...
KeyError: 'CCVERSION':
File "C:DownloadsMesaLib-9.1.5Mesa-9.1.5SConstruct", line 40:
ENV = os.environ,
File "C:Python27scons-2.3.0SConsEnvironment.py", line 1002:
apply_tools(self, tools, toolpath)
File "C:Python27scons-2.3.0SConsEnvironment.py", line 106:
env.Tool(tool)
File "C:Python27scons-2.3.0SConsEnvironment.py", line 1786:
tool(self)
File "C:Python27scons-2.3.0SConsTool\__init__.py", line 183:
self.generate(env, *args, **kw)
File "C:DownloadsMesaLib-9.1.5Mesa-9.1.5sconsgallium.py", line 313:
ccversion = env['CCVERSION']
File "C:Python27scons-2.3.0SConsEnvironment.py", line 412:
return self._dict[key]
推荐答案
Common scons
选项:
Common scons
options:
build=release
machine=x86
platform=windows
libgl-gdi
Linux (Debian Wheezy),适用 Debian Jessie 8.5 &Mesatoolchain=crossmingw
:在链接阶段失败,因为它找不到__vscprintf
等.d2f42a945ec0fbcc51b59cfd329258bd62ebf0d2
通过:
Linux (Debian Wheezy),Works as of Debian Jessie 8.5 & Mesatoolchain=crossmingw
: Fails during linking phase because it can't find__vscprintf
, among other things.d2f42a945ec0fbcc51b59cfd329258bd62ebf0d2
via:
scons
toolchain=crossmingw
build=release
machine=x86
platform=windows
libgl-gdi
DLL 安装到 build/windows-x86/gallium/targets/libgl-gdi/opengl32.dll
Windows,toolchain=mingw
:失败,显示命令行太长".尽管 LongCmdLinesOnWin32
.
Windows, toolchain=mingw
: Fails with "The command line is too long." despite multiple permutations of both snippits on LongCmdLinesOnWin32
.
Windows、VS2012 Express、MSVC_VERSION=11.0
:删除stray C99-isms 来自 src/glsl/ralloc.c::ralloc_size().
Windows, VS2012 Express, MSVC_VERSION=11.0
: Succeeds after removing stray C99-isms from src/glsl/ralloc.c::ralloc_size()
.
<小时>
编辑:更完整的程序:
为 Windows 桌面安装 Visual Studio Express 2012:
Install Visual Studio Express 2012 for Windows Desktop:
http://www.microsoft.com/visualstudio/eng/downloads#d-express-windows-desktop
安装 MinGW:
Install MinGW:
http://www.mingw.org/
http://sourceforge.net/projects/mingw/files/
http://sourceforge.net/projects/mingw/files/latest/download?source=files
mingw-get-inst-20120426.exe
Run installer:
Download latest repo catalogs
Install to C:MinGW (default)
Check:
* C compiler
* C++ compiler
* MSYS basic system
* MinGW developer toolkit (should install msys-flex and msys-bison)
安装 Python 2.7:
Install Python 2.7:
http://www.python.org/download/
http://www.python.org/ftp/python/2.7.5/python-2.7.5.msi
You have to use 32-bit Python because the Scons people only distribute 32-bit installers.
Install for all users (default)
Install to C:Python27 (default)
Use default install options/customizations
为 Python 安装 libxml2
:
http://www.lfd.uci.edu/~gohlke/pythonlibs/
libxml2-python-2.9.1.win32-py2.7.exe
Installer should find the python install automagically
安装pywin32
:
http://pywin32.sourceforge.net/
http://sourceforge.net/projects/pywin32/files/pywin32/
http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/
http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/pywin32-218.win32-py2.7.exe
Installer should find the Python install automagically
安装Scons
:
http://www.scons.org/
http://prdownloads.sourceforge.net/scons/scons-2.3.0-setup.exe
Installer should find the Python install automagically
将这些添加到您的 PATH
顶部附近:
C:Python27
C:Python27Scripts
下载 Mesa:
Download Mesa:
ftp://ftp.freedesktop.org/pub/mesa/
ftp://ftp.freedesktop.org/pub/mesa/9.1.5/MesaLib-9.1.5.zip
Extract somewhere (C:Mesa-9.1.5)
启动 MSYS shell:
Start MSYS shell:
C:mingwmsys1.0msys.bat
Change into mesa src directory:
cd /c/Mesa-9.1.5/
构建 Mesa:
Build Mesa:
scons.py
build=release
machine=x86
platform=windows
MSVC_VERSION=11.0
libgl-gdi
这应该在 buildwindows-x86gallium argetslibgl-gdi
中创建一个 opengl32.dll
.
This should create an opengl32.dll
in buildwindows-x86gallium argetslibgl-gdi
.
使用 更多的跑腿工作,可以构建 llvmpipe代码>.
With a little bit more legwork it's possible to build llvmpipe
.
这篇关于为 windows 7 构建 Mesa.Mesa 9.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!