从源安装 mesa 失败 - 运行 make 命令后未定义对 llvm 的引用

从源安装 mesa 失败 - 运行 make 命令后未定义对 llvm 的引用

我正在尝试从存储库安装 mesa 包:git://anongit.freedesktop.org/mesa/mesa。我已成功从 mesa 文件夹中运行以下命令:

$ ./autogen.sh                            \
      --prefix=$NVD                       \
      --enable-texture-float              \
      --enable-gles1                      \
      --enable-gles2                      \
      --enable-glx                        \
      --enable-egl                        \
      --enable-gallium-egl                \
      --enable-gallium-llvm               \
      --enable-shared-glapi               \
      --enable-gbm                        \
      --enable-glx-tls                    \
      --enable-dri                        \
      --enable-osmesa                     \
      --with-egl-platforms=x11,drm        \
      --with-gallium-drivers=nouveau      \
      --with-dri-drivers=nouveau          \
      --enable-vdpau

$./configure

但是,当我以超级用户权限运行 make 命令时,出现以下错误:

../../../../src/gallium/auxiliary/.libs/libgallium.a(lp_bld_misc.o): In function `llvm::RTDyldMemoryManager::getSymbolAddress(std::string const&)':
/usr/lib/llvm-3.8/include/llvm/ExecutionEngine/RTDyldMemoryManager.h:77: undefined reference to `llvm::RTDyldMemoryManager::getSymbolAddressInProcess(std::string const&)'
/usr/lib/llvm-3.8/include/llvm/ExecutionEngine/RTDyldMemoryManager.h:77: undefined reference to `llvm::RTDyldMemoryManager::getSymbolAddressInProcess(std::string const&)'
collect2: error: ld returned 1 exit status
Makefile:991: recipe for target 'gallium_dri.la' failed
make[4]: *** [gallium_dri.la] Error 1
make[4]: Leaving directory '/home/nouveau/mesa/src/gallium/targets/dri'
Makefile:620: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/nouveau/mesa/src/gallium'
Makefile:869: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/nouveau/mesa/src'
Makefile:660: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/nouveau/mesa/src'
Makefile:677: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

答案1

首先,在 Ubuntu 中,无需mesa从源代码构建。它已作为 Xorg 的一部分安装。安装的三个软件包是libglu1-mesalibgl1-mesa-glxlibgl1-mesa-dri

如果你确实需要构建mesa,那么你的问题就出在新的 c++11 ABI 上。正如Red Hat 的这个错误报告显示,问题是您的 llvm 尚未使用 c++11 进行编译。您可能希望使用 更新您的llvm-3.8安装sudo apt-get install --only-upgrade llvm-3.8。否则,您可能希望安装较新版本的llvm-llvm-3.9llvm-4.0llvm-5.0推荐)。

相关内容