为什么 Carla/终端找不到我的 Clang8 安装?

问题描述

我正在尝试遵循本教程:https://carla.readthedocs.io/en/latest/build_linux/ 和此 GitHub 文件https://github.com/carla-simulator/carla/pull/2433/files/a112caacfd96619af9ba4439497cff0b208378cf

我正在执行“make launch”/“make PythonAPI”步骤并不断收到此错误

(CARLA) Daniels-iMac:carla danieljones$ make launch
clang 8 is required,but it's not installed.
make: *** [setup] Error 1
(CARLA) Daniels-iMac:carla danieljones$

carla repo 被克隆到:/Users/danieljones/carla 我通过终端安装了 llvm@8,它似乎已保存到:/usr/local/Cellar/llvm@8/8.0.1_3。终端给了我做一个“导出”命令和我做的“回声”的建议。我对终端缺乏了解,但我明白这些应该通知系统保存包的位置?

当我在终端中尝试 clang --version 时,我确实得到:

clang version 8.0.1 (tags/RELEASE_801/final)
Target: x86_64-apple-darwin20.3.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm@8/bin

这让我觉得终端能够找到 clang8 但 carla 中的某些东西正在挣扎。

我发现以前的堆栈建议更改 Setup.pySetup.shBuildPythonAPI.sh 以将它正在寻找的 clang 值更改为 Apple 安装的值,但没有解决我的问题。

更新: 我设法将 clang8 安装到我的 CARLA 环境中,make launch 现在正在取得进展,但给了我错误

-- The C compiler identification is Clang 8.0.1
-- The CXX compiler identification is Clang 8.0.1
-- The ASM compiler identification is Clang
-- Found assembler: /usr/local/opt/llvm@8/bin/clang-8
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - Failed
-- Check for working C compiler: /usr/local/opt/llvm@8/bin/clang-8
-- Check for working C compiler: /usr/local/opt/llvm@8/bin/clang-8 - broken
CMake Error at /usr/local/Cellar/cmake/3.19.4/share/cmake/Modules/CMakeTestCCompiler.cmake:66 (message):
  The C compiler

    "/usr/local/opt/llvm@8/bin/clang-8"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /Users/danieljones/carla/Build/llvm-8.0-build/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/usr/local/bin/ninja cmTC_81dd4 && [1/2] Building C object CMakeFiles/cmTC_81dd4.dir/testCCompiler.c.o
    [2/2] Linking C executable cmTC_81dd4
    Failed: cmTC_81dd4 
    : && /usr/local/opt/llvm@8/bin/clang-8 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names  CMakeFiles/cmTC_81dd4.dir/testCCompiler.c.o -o cmTC_81dd4   && :
    ld: library not found for -lSystem
    clang-8: error: linker command Failed with exit code 1 (use -v to see invocation)
    ninja: build stopped: subcommand Failed.
    
  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:39 (project)

-- Configuring incomplete,errors occurred!
See also "/Users/danieljones/carla/Build/llvm-8.0-build/CMakeFiles/CMakeOutput.log".
See also "/Users/danieljones/carla/Build/llvm-8.0-build/CMakeFiles/CMakeError.log".
make: *** [setup] Error 1

更新 2: 将 setup.sh 文件中的 clang-8 路径更改为 anaconda3 venv 中的目录后,我设法 make launch 但现在出现此错误

Setup.sh: Extracting boost for Python 3.
Building Boost.Build engine with toolset clang... 
Failed to build Boost.Build build engine
Consult 'bootstrap.log' for more details
make: *** [setup] Error 1

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)