llvm on CentOS 7

Joel Sherrill joel at rtems.org
Mon Sep 16 21:52:20 UTC 2019


I need to install that! In the mean time, I used the machine I test
odd new gcc versions on and this happened:

-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done

$ type gcc
gcc is hashed (/home/joel/test-gcc/install-master/bin/gcc)
$ type c++
c++ is /home/joel/test-gcc/install-master/bin/c++


It looks like something has hard-coded c++ to use /usr/bin which is not nice.

On Mon, Sep 16, 2019 at 1:57 PM Peter Dufault <dufault at hda.com> wrote:
>
>
> > On Sep 16, 2019, at 10:36 , Joel Sherrill <joel at rtems.org> wrote:
> >
> > 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.
>
> You can also install “devtoolset-7” from the CentOS Software Collection Sig (https://wiki.centos.org/SpecialInterestGroup/SCLo).  I have that installed.
> devtoolset-7-binutils.x86_64             2.28-11.el7              @centos-sclo-rh
>
> That will give you gcc 7.3.1 and friends:
>
> [dufault at fubar ~]$ /opt/rh/devtoolset-7/root/bin/gcc --version
> gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
> Copyright (C) 2017 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> [dufault at fubar ~]$
>
> Peter
> -----------------
> Peter Dufault
> HD Associates, Inc.      Software and System Engineering
>
> This email is delivered through the public internet using protocols subject to interception and tampering.
>



More information about the devel mailing list