【问题标题】:Doxygen Build failing for 1.8.20 on ubuntu with Clang使用 Clang 在 ubuntu 上 1.8.20 的 Doxygen 构建失败
【发布时间】:2020-09-24 19:49:32
【问题描述】:

这些是我安装 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".

现在呢?

【问题讨论】:

    标签: clang doxygen llvm-clang


    【解决方案1】:

    发现这是与apt-get install llvmapt-get install clang 一起安装的llvm 和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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-06-28
      • 2023-03-08
      • 2016-04-19
      • 1970-01-01
      • 1970-01-01
      • 2018-08-28
      • 2021-11-14
      • 1970-01-01
      相关资源
      最近更新 更多