llvm on CentOS 7

Joel Sherrill joel at rtems.org
Mon Sep 16 14:36:59 UTC 2019


Hi

Running log as I work through this.

Build failed because I didn't have cmake. Double-checked and sb-check wouldn't
have reported this. Not sure we should report it missing unless we can designate
something as "needed by some packages" or let folks know which one(s).

Loaded cmake, then got this beauty:

/usr/bin/cmake -Wno-dev -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=/home/joel/rtems-work/tools/5
'-DPACKAGE_VERSION=8.0.1 (RTEMS 5, RSB
4b7af073000d612b21b9dece538d2bcc85c0c240)'
-DLLDB_CODESIGN_IDENTITY=llvm ../llvm-8.0.1
-- Configuring incomplete, errors occurred!
CMake Error at CMakeLists.txt:3 (cmake_minimum_required):
  CMake 3.4.3 or higher is required.  You are running version 2.8.12.2

Plenty of people on the net say to download and build it but it turns
out that EPEL
has a cmake3 RPM. That's a very respectable repo (unlike Ghettoforge which also
had it).

yum erase cmake
yum install cmake3

That installed /usr/bin/cmake3 which the build doesn't know about so I
symbolically
linked /usr/bin/cmake3 to ${HOME}/bin/cmake.

This didn't work because it checks for /usr/bin/cmake so I made that
symlink to cmake3.

This resulted in a failure further along.

-- Detecting CXX compile features - done
CMake Error at cmake/modules/CheckCompilerVersion.cmake:40 (message):
  Host GCC version should be at least 5.1 because LLVM will soon use new C++
  features which your toolchain version doesn't support.  Your version is
  4.8.5.  You can temporarily opt out using
  LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN, but very soon your toolchain won't be
  supported.
Call Stack (most recent call first):
  cmake/modules/CheckCompilerVersion.cmake:45 (check_compiler_version)
  cmake/config-ix.cmake:13 (include)
  CMakeLists.txt:590 (include)


-- Configuring incomplete, errors occurred!
See also "/home/joel/rtems-work/rtems-source-builder/rtems/build/rtems-llvm-8.0.1-x86_64-linux-gnu-1/build/CMakeFiles/CMakeOutput.log".
shell cmd failed: /bin/sh -ex
/home/joel/rtems-work/rtems-source-builder/rtems/build/rtems-llvm-8.0.1-x86_64-linux-gnu-1/do-build
error: building rtems-llvm-8.0.1-x86_64-linux-gnu-1

Looks like I need to move to a machine with newer gcc. There is a
floor on the host environment without doing some work. I think the
CentOS machine I use to do test builds of our tools from
gcc/binutils/newlib master should work since it has installs of
various newer gcc.

That may take until I get home.

--joel


More information about the devel mailing list