[llvm-bugs] [Bug 39011] New: llvm 7.0.0 fails to build on fedora linux due to cuda incompatabilities, install also fails if building lldb

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Sep 19 23:02:28 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=39011

            Bug ID: 39011
           Summary: llvm 7.0.0 fails to build on fedora linux due to cuda
                    incompatabilities, install also fails if building lldb
           Product: new-bugs
           Version: 7.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: andrewm.roberts at sky.com
                CC: llvm-bugs at lists.llvm.org

Building LLVM 7.0.0 on Fedora 28 x64 fails when building OpenMP due to
incompatabilities with Cuda include files:

[ 52%] Built target omp
[ 52%] Built target omptarget
[ 52%] Built target omptarget.rtl.cuda
[ 52%] Building NVCC (Device) object
projects/openmp/libomptarget/deviceRTLs/nvptx/CMakeFiles/omptarget-nvptx.dir/src/omptarget-nvptx_generated_omp_data.cu.o
In file included from /usr/include/cuda/host_config.h:50,
                 from /usr/include/cuda/cuda_runtime.h:78,
                 from <command-line>:
/usr/include/cuda/crt/host_config.h:119:2: error: #error -- unsupported GNU
version! gcc versions later than 7 are not supported!
 #error -- unsupported GNU version! gcc versions later than 7 are not
supported!
  ^~~~~
CMake Error at omptarget-nvptx_generated_omp_data.cu.o.Release.cmake:215
(message):
  Error generating
 
/home/aroberts/llvm/build/projects/openmp/libomptarget/deviceRTLs/nvptx/CMakeFiles/omptarget-nvptx.dir/src/./omptarget-nvptx_generated_omp_data.cu.o


make[2]: ***
[projects/openmp/libomptarget/deviceRTLs/nvptx/CMakeFiles/omptarget-nvptx.dir/build.make:135:
projects/openmp/libomptarget/deviceRTLs/nvptx/CMakeFiles/omptarget-nvptx.dir/src/omptarget-nvptx_generated_omp_data.cu.o]
Error 1
make[1]: *** [CMakeFiles/Makefile2:37459:
projects/openmp/libomptarget/deviceRTLs/nvptx/CMakeFiles/omptarget-nvptx.dir/all]
Error 2
make: *** [Makefile:152: all] Error 2

uname -a
Linux ryzen 4.18.7-200.fc28.x86_64 #1 SMP Mon Sep 10 15:44:45 UTC 2018 x86_64
x86_64 x86_64 GNU/Linux

# CUDA libs via fedora-multimedia repo
rpm -qa | grep -i cuda
cuda-cusolver-devel-9.2.148.1-2.fc28.x86_64
cuda-nvrtc-9.2.148.1-2.fc28.x86_64
cuda-cupti-devel-9.2.148.1-2.fc28.x86_64
cuda-cupti-9.2.148.1-2.fc28.x86_64
cuda-cufft-devel-9.2.148.1-2.fc28.x86_64
cuda-libs-9.2.148.1-2.fc28.x86_64
cuda-npp-9.2.148.1-2.fc28.x86_64
cuda-nvgraph-9.2.148.1-2.fc28.x86_64
cuda-curand-9.2.148.1-2.fc28.x86_64
cuda-cudart-devel-9.2.148.1-2.fc28.x86_64
cuda-cusolver-9.2.148.1-2.fc28.x86_64
nvidia-driver-cuda-libs-396.54-2.fc28.x86_64
cuda-curand-devel-9.2.148.1-2.fc28.x86_64
cuda-cublas-devel-9.2.148.1-2.fc28.x86_64
cuda-9.2.148.1-2.fc28.x86_64
cuda-cublas-9.2.148.1-2.fc28.x86_64
cuda-cusparse-9.2.148.1-2.fc28.x86_64
cuda-cusparse-devel-9.2.148.1-2.fc28.x86_64
cuda-nvgraph-devel-9.2.148.1-2.fc28.x86_64
cuda-nvtx-9.2.148.1-2.fc28.x86_64
cuda-npp-devel-9.2.148.1-2.fc28.x86_64
cuda-cufft-9.2.148.1-2.fc28.x86_64
cuda-nvrtc-devel-9.2.148.1-2.fc28.x86_64
cuda-nvml-devel-9.2.148.1-2.fc28.x86_64
cuda-cudart-9.2.148.1-2.fc28.x86_64
cuda-nvtx-devel-9.2.148.1-2.fc28.x86_64
cuda-devel-9.2.148.1-2.fc28.x86_64

/usr/bin/nvidia-installer -v
nvidia-installer:  version 396.54  (buildmeister at swio-display-x64-rhel04-14)

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap
--enable-languages=c,c++,fortran,objc,obj-c++,ada,go,lto --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared
--enable-threads=posix --enable-checking=release --enable-multilib
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --enable-linker-build-id
--with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin
--enable-initfini-array --with-isl --enable-libmpx
--enable-offload-targets=nvptx-none --without-cuda-driver
--enable-gnu-indirect-function --enable-cet --with-tune=generic
--with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 8.1.1 20180712 (Red Hat 8.1.1-5) (GCC) 

Building using gcc 7.3.0 rather than the default gcc 8.1.1 allows the build to
succeed, but the install then fails:
make install
...-- Up-to-date: /usr/local/llvm-7.0.0/include/lldb
-- Up-to-date: /usr/local/llvm-7.0.0/include/lldb/Host
-- Installing: /usr/local/llvm-7.0.0/include/lldb/Host/Config.h
CMake Error at tools/lldb/scripts/cmake_install.cmake:41 (file):
  file INSTALL cannot find "/home/aroberts/llvm/build/lib/python2.7".
Call Stack (most recent call first):
  tools/lldb/cmake_install.cmake:51 (include)
  tools/cmake_install.cmake:51 (include)
  cmake_install.cmake:68 (include)


make: *** [Makefile:140: install] Error 1

python -v
Python 2.7.15 (default, May 16 2018, 17:50:09)
rpm -qa | grep python2-devel
python2-devel-2.7.15-2.fc28.x86_64

all builds carried out using:
# When building with gcc-7.3.0 only
CC=/usr/local/gcc/bin/gcc  ; export CC
CXX=/usr/local/gcc/bin/g++ ; export CXX
# common to all builds
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr/local/llvm-7.0.0 -D
CMAKE_BUILD_TYPE=Release ../llvm
cd build
make -j16
make install

So again lots of things not working by default on one of the main linux
distros.

In previous releases I had to build without lldb, so I removed that and tried
again with gcc-7.3.0. This then worked so lldb is once again unable to build on
linux... 

/usr/local/llvm-7.0.0/bin/clang -v
clang version 7.0.0 (tags/RELEASE_700/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/llvm-7.0.0/bin
Found candidate GCC installation: /usr/lib/gcc/i686-redhat-linux/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/8
Selected GCC installation: /usr/lib/gcc/x86_64-redhat-linux/8
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64

Interestingly the "Found candidate GCC installation" is the system gcc 8
release, not the 7.3.0 release it was built with... Not sure if this will cause
issues long term.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180920/f33c0c50/attachment-0001.html>


More information about the llvm-bugs mailing list