gpt4 book ai didi

python - 为 Windows 7 构建 Mesa。Mesa 9.1

转载 作者:太空狗 更新时间:2023-10-30 00:24:21 24 4
gpt4 key购买 nike

我完成了 Mesa 网站上编译/安装页面上的所有步骤,并阅读了常见问题解答。您发送给 scons 进行编译的最终命令会在 python 脚本中抛出错误。这是我的输出。我究竟做错了什么?此外,如果有人使用最新的 mesa 和 mingw 或 VS2012 为 mesa 编译了 dll,请分享!

这是我的输出,我已经很长时间没有编写 python 程序了,但 map /字典似乎不包含键/值对。

C:\Downloads\MesaLib-9.1.5\Mesa-9.1.5>scons platform=windows toolchain=crossming
w machine=x86_64 mesagdi libgl-gdi

scons: Reading SConscript files ...
KeyError: 'CCVERSION':
File "C:\Downloads\MesaLib-9.1.5\Mesa-9.1.5\SConstruct", line 40:
ENV = os.environ,
File "C:\Python27\scons-2.3.0\SCons\Environment.py", line 1002:
apply_tools(self, tools, toolpath)
File "C:\Python27\scons-2.3.0\SCons\Environment.py", line 106:
env.Tool(tool)
File "C:\Python27\scons-2.3.0\SCons\Environment.py", line 1786:
tool(self)
File "C:\Python27\scons-2.3.0\SCons\Tool\__init__.py", line 183:
self.generate(env, *args, **kw)
File "C:\Downloads\MesaLib-9.1.5\Mesa-9.1.5\scons\gallium.py", line 313:
ccversion = env['CCVERSION']
File "C:\Python27\scons-2.3.0\SCons\Environment.py", line 412:
return self._dict[key]

最佳答案

常用scons选项:

build=release
machine=x86
platform=windows
libgl-gdi
  1. Linux (Debian Wheezy),toolchain=crossmingw:链接阶段失败,因为找不到__vscprintf,除其他事项外。 工作自 Debian Jessie 8.5 和 Mesa d2f42a945ec0fbcc51b59cfd329258bd62ebf0d2 通过:

    scons \
    toolchain=crossmingw \
    build=release \
    machine=x86 \
    platform=windows \
    libgl-gdi

    DLL 安装到 build/windows-x86/gallium/targets/libgl-gdi/opengl32.dll

  2. Windows,toolchain=mingw:失败“命令行太长”。尽管在 LongCmdLinesOnWin32 上对两个片段进行了多次排列.

  3. Windows、VS2012 Express、MSVC_VERSION=11.0:删除 stray C99-isms成功来自 src/glsl/ralloc.c::ralloc_size()


编辑:更完整的程序:

  1. 为 Windows 桌面安装 Visual Studio Express 2012:

    http://www.microsoft.com/visualstudio/eng/downloads#d-express-windows-desktop
  2. 安装 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)
  3. 安装 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
  4. 为 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
  5. 安装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
  6. 安装Scons:

    http://www.scons.org/
    http://prdownloads.sourceforge.net/scons/scons-2.3.0-setup.exe

    Installer should find the Python install automagically
  7. 将这些添加到 PATH 的顶部附近:

    C:\Python27\
    C:\Python27\Scripts
  8. 下载台面:

    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)
  9. 启动 MSYS 外壳:

    C:\mingw\msys\1.0\msys.bat

    Change into mesa src directory:
    cd /c/Mesa-9.1.5/
  10. 构建台面:

    scons.py \
    build=release \
    machine=x86 \
    platform=windows \
    MSVC_VERSION=11.0 \
    libgl-gdi \

这应该在 build\windows-x86\gallium\targets\libgl-gdi 中创建一个 opengl32.dll

little bit more legwork可以构建 llvmpipe

关于python - 为 Windows 7 构建 Mesa。Mesa 9.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17871781/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com