Clang 产生符号查找错误

Clang 产生符号查找错误

每当我运行 clang 时,即使使用 --version 标志,我也会收到此错误

clang: symbol lookup error: /usr/lib/libclang-cpp.so.14: undefined symbol: _ZN4llvm9MDBuilder25createRTTIPointerPrologueEPNS_8ConstantES2_, version LLVM_14

pacman-Qi llvm

Name            : llvm
Version         : 14.0.6-3
Description     : Compiler infrastructure
Architecture    : x86_64
URL             : https://llvm.org/
Licenses        : custom:Apache 2.0 with LLVM Exception
Groups          : None
Provides        : None
Depends On      : llvm-libs  perl
Optional Deps   : None
Required By     : None
Optional For    : clang
Conflicts With  : None
Replaces        : None
Installed Size  : 368.51 MiB
Packager        : Evangelos Foutras <[email protected]>
Build Date      : Thu 04 Aug 2022 02:34:13 AM WAT
Install Date    : Mon 15 Aug 2022 09:49:26 AM WAT
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

吃豆人-Qi clang

Name            : clang
Version         : 14.0.6-2
Description     : C language family frontend for LLVM
Architecture    : x86_64
URL             : https://clang.llvm.org/
Licenses        : custom:Apache 2.0 with LLVM Exception
Groups          : None
Provides        : clang-analyzer=14.0.6  clang-tools-extra=14.0.6
Depends On      : llvm-libs  gcc  compiler-rt
Optional Deps   : openmp: OpenMP support in clang with -fopenmp
                  python: for scan-view and git-clang-format [installed]
                  llvm: referenced by some clang headers [installed]
Required By     : lldb
Optional For    : qt5-tools
Conflicts With  : clang-analyzer  clang-tools-extra
Replaces        : clang-analyzer  clang-tools-extra
Installed Size  : 168.58 MiB
Packager        : Evangelos Foutras <[email protected]>
Build Date      : Thu 04 Aug 2022 02:44:58 AM WAT
Install Date    : Mon 15 Aug 2022 09:49:36 AM WAT
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

答案1

必须更新所有软件包,主要与一些动态库有关。

相关内容