使用OpenMP构建LLVM / Clang时与OpenMP和C ++相关的错误

时间:2017-05-06 22:31:25

标签: c++ openmp llvm-clang

我试图在Fedora 25上编译来自源代码的LLVM,Clang,OpenMP(来自LLVM项目)和libc ++(libcxx)。默认的GCC 6.3用于构建它们。我发出

cmake ../llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86"

在我得到

之前,一切似乎都很顺利
-- Performing Test LIBOMPTARGET_HAVE_STD_CPP11_FLAG
-- Performing Test LIBOMPTARGET_HAVE_STD_CPP11_FLAG - Success
-- Performing Test LIBOMPTARGET_HAVE_WERROR_FLAG
-- Performing Test LIBOMPTARGET_HAVE_WERROR_FLAG - Success
-- Could NOT find LIBOMPTARGET_DEP_LIBELF (missing:  LIBOMPTARGET_DEP_LIBELF_LIBRARIES LIBOMPTARGET_DEP_LIBELF_INCLUDE_DIRS) 
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Could NOT find LIBOMPTARGET_DEP_LIBFFI (missing:  LIBOMPTARGET_DEP_LIBFFI_LIBRARIES LIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIRS) 
-- LIBOMPTARGET: Building offloading runtime library libomptarget.
-- LIBOMPTARGET: Not building aarch64 offloading plugin: machine not found in the system.
-- LIBOMPTARGET: Not building CUDA offloading plugin: libelf dependency not found.
-- LIBOMPTARGET: Not building PPC64 offloading plugin: machine not found in the system.
-- LIBOMPTARGET: Not building PPC64le offloading plugin: machine not found in the system.
-- LIBOMPTARGET: Not building x86_64 offloading plugin: libelf dependency not found.
-- Found Z3: /usr/lib64/libz3.so (found suitable version "4.5.0 - 64 bit - build hashcode d57a2a6dce92", minimum required is "4.5") 
-- Looking for sys/resource.h
-- Looking for sys/resource.h - found
-- Clang version: 5.0.0
-- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG
-- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG - Failed
-- Configuring done
-- Generating done

似乎有两个错误--1个与OpenMP相关(与LIBOMPTARGET_DEP_LIBELFLIBOMPTARGET_DEP_LIBFFI相关),1个与C ++相关(CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG - Failed)。我不知道它们中的任何一个意味着什么,但我希望能够至少在多核CPU上使用OpenMP,我绝对希望能够编译C ++源文件。那么我应该如何关注这些错误呢?如果它们非常重要,那么有关该怎么做的任何提示?

更新:当我尝试构建它时,我在libcxx中获得了几个未定义的引用。

1 个答案:

答案 0 :(得分:0)

对于与OpenMP相关的错误,我认为您需要在系统上安装libelf和libffi。