gpt4 book ai didi

clang - 使用 Clang 在 ubuntu 上运行 1.8.20 时 Doxygen 构建失败

转载 作者:行者123 更新时间:2023-12-04 08:51:59 26 4
gpt4 key购买 nike

这些是我安装 doxygen 1.8.20 所遵循的步骤:

apt-get install graphviz
apt-get install bison
apt-get install flex
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz
tar -xvzf libiconv-1.16.tar.gz
cd libiconv-1.16
./configure --prefix=/usr/local/libiconv
make
make install
wget http://doxygen.nl/files/doxygen-1.8.20.src.tar.gz
gunzip doxygen-1.8.20.src.tar.gz
tar -xf doxygen-1.8.20.src.tar
cd doxygen-1.8.20
mkdir build
cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -Duse_libclang=ON ..
此时我得到以下输出:
CMake Error at CMakeLists.txt:51 (find_package):
Could not find a package configuration file provided by "LLVM" with any of
the following names:

LLVMConfig.cmake
llvm-config.cmake

Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set
"LLVM_DIR" to a directory containing one of the above files. If "LLVM"
provides a separate development package or SDK, be sure it has been
installed.


-- Configuring incomplete, errors occurred!
See also "/home/doxygen-1.8.20/build/CMakeFiles/CMakeOutput.log".
现在我得到了 LLVM 包:
apt-get install llvm
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -Duse_libclang=ON ..
此时我得到以下输出:
CMake Error at CMakeLists.txt:52 (find_package):
Could not find a package configuration file provided by "Clang" with any of
the following names:

ClangConfig.cmake
clang-config.cmake

Add the installation prefix of "Clang" to CMAKE_PREFIX_PATH or set
"Clang_DIR" to a directory containing one of the above files. If "Clang"
provides a separate development package or SDK, be sure it has been
installed.


-- Configuring incomplete, errors occurred!
获取 clang 包:
apt-get install clang
得到同样的错误:
CMake Error at CMakeLists.txt:52 (find_package):
Could not find a package configuration file provided by "Clang" with any of
the following names:

ClangConfig.cmake
clang-config.cmake

Add the installation prefix of "Clang" to CMAKE_PREFIX_PATH or set
"Clang_DIR" to a directory containing one of the above files. If "Clang"
provides a separate development package or SDK, be sure it has been
installed.


-- Configuring incomplete, errors occurred!
See also "/home/doxygen-1.8.20/build/CMakeFiles/CMakeOutput.log".
怎么办?

最佳答案

发现这是使用 apt-get install llvm 安装的 llvm 和 clang 的问题。和 apt-get install clang .这将安装两者的第 6 版。
代替这些命令,请执行以下操作:

apt install llvm-10 clang-10 libclang-10-dev
然后运行
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -Duse_libclang=ON ..
将产生成功的输出:
-- Found PythonInterp: /usr/bin/python (found version "2.7.17")
-- Found FLEX: /usr/bin/flex (found version "2.6.4")
-- Found BISON: /usr/bin/bison (found version "3.0.4")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Looking for iconv_open
-- Looking for iconv_open - found
-- Performing Test ICONV_COMPILES
-- Performing Test ICONV_COMPILES - Success
-- Found Iconv: In glibc
-- One (and only one) of the ICONV_ACCEPTS_... tests must pass
-- Performing Test ICONV_ACCEPTS_NONCONST_INPUT
-- Performing Test ICONV_ACCEPTS_NONCONST_INPUT - Success
-- Performing Test ICONV_ACCEPTS_CONST_INPUT
-- Performing Test ICONV_ACCEPTS_CONST_INPUT - Failed
-- The javacc executable not found, using existing files
-- Configuring done
-- Generating done
-- Build files have been written to: /home/libiconv-1.16/doxygen-1.8.20/build
然后继续 makemake install

关于clang - 使用 Clang 在 ubuntu 上运行 1.8.20 时 Doxygen 构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64053447/

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