0

I'm trying to compile LLVM, Clang, OpenMP (from the LLVM project) and libc++ (libcxx) from source on Fedora 25. The default GCC 6.3 is being to used to build them. I issue

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

Everything seems to go well until I get

-- 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

There seem to be two errors - 1 related to OpenMP (related to LIBOMPTARGET_DEP_LIBELF and LIBOMPTARGET_DEP_LIBFFI) and 1 related to C++ (CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG - Failed). I don't really know what either of them means, but I want to be able to use OpenMP at least on multicore CPU and I definitely want to be able to compile C++ source files. So how concerned should I be about these errors? If they're important, any hints about what to do here?

Update: When I try to build it anway, I get several undefined references in libcxx.

Aditya Kashi
  • 266
  • 2
  • 13

1 Answers1

0

For the OpenMP related errors, I think you need libelf and libffi installed on your system.