Skip to content

Problem installing flang #7885

@aprokop

Description

@aprokop

@junghans

Expected Result

$ spack install flang completes

Actual Result

What happened instead

<snip>
==> Successfully installed llvm
  Fetch: 24.09s.  Build: 15m 56.54s.  Total: 16m 20.63s.
[+] /scratch/spack/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/llvm-5.0.0-i66qkkvc7d6pnsdx5vjamnxuicye44b6
==> Installing flang
==> Trying to clone git repository: https://github.com/flang-compiler/flang on branch master
==> No checksum needed when fetching with git
==> Already staged flang-develop-i6oboxtz3nbcsdlzxy4jfdo5nchv5o3o in /scratch/spack/var/spack/stage/flang-develop-i6oboxtz3nbcsdlzxy4jfdo5nchv5o3o
==> No patches needed for flang
==> Building flang [CMakePackage]
==> Executing phase: 'cmake'
==> Error: ProcessError: Command exited with status 1:
    'cmake' '/scratch/spack/var/spack/stage/flang-develop-i6oboxtz3nbcsdlzxy4jfdo5nchv5o3o/flang' '-G' 'Unix Makefiles' '-DCMAKE_INSTALL_PREFIX:PATH=/scratch/spack/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/flang-develop-i6oboxtz3nbcsdlzxy4jfdo5nchv5o3o' '-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo' '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON' '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=FALSE' '-DCMAKE_INSTALL_RPATH:STRING=/scratch/spack/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/flang-develop-i6oboxtz3nbcsdlzxy4jfdo5nchv5o3o/lib:/scratch/spack/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/flang-develop-i6oboxtz3nbcsdlzxy4jfdo5nchv5o3o/lib64:/scratch/spack/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/llvm-5.0.0-i66qkkvc7d6pnsdx5vjamnxuicye44b6/lib:/usr/lib' '-DCMAKE_PREFIX_PATH:STRING=/scratch/spack/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/llvm-5.0.0-i66qkkvc7d6pnsdx5vjamnxuicye44b6' '-DWITH_WERROR=OFF' '-DCMAKE_C_COMPILER=/scratch/spack/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/llvm-5.0.0-i66qkkvc7d6pnsdx5vjamnxuicye44b6/bin/clang' '-DCMAKE_CXX_COMPILER=/scratch/spack/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/llvm-5.0.0-i66qkkvc7d6pnsdx5vjamnxuicye44b6/bin/clang++' '-DCMAKE_Fortran_COMPILER=/scratch/spack/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/llvm-5.0.0-i66qkkvc7d6pnsdx5vjamnxuicye44b6/bin/flang' '-DFLANG_LIBOMP=/scratch/spack/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/llvm-5.0.0-i66qkkvc7d6pnsdx5vjamnxuicye44b6/lib/libomp.so'

1 error found in build log:
     [ ... ]
     47    -- Found assembler: /scratch/spack/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/llvm-5.0.0-i66qkkvc7d6pnsdx5vjamnxuicye44b6/bin/clang
     48    -- The Fortran compiler identification is unknown
     49    -- Detecting Fortran compiler ABI info
     50    -- Detecting Fortran compiler ABI info - failed
     51    -- Checking whether /scratch/spack/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/llvm-5.0.0-i66qkkvc7d6pnsdx5vjamnxuicye44b6/bin/flang supports Fortran 90
     52    -- Checking whether /scratch/spack/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/llvm-5.0.0-i66qkkvc7d6pnsdx5vjamnxuicye44b6/bin/flang supports Fortran 90 -- no
  >> 53    CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
     54    Please set them or make sure they are set and tested correctly in the CMake files:
     55    LIBPGMATH
     56        linked by target "flangrti_shared" in directory /scratch/spack/var/spack/stage/flang-develop-i6oboxtz3nbcsdlzxy4jfdo5nchv5o3o/flang/runtime/flangrti
     57    
     58    -- Configuring incomplete, errors occurred!
     59    See also "/tmp/root/spack-stage/spack-stage-Bny4m0/flang/spack-build/CMakeFiles/CMakeOutput.log".

See build log for details:
  /scratch/spack/var/spack/stage/flang-develop-i6oboxtz3nbcsdlzxy4jfdo5nchv5o3o/flang/spack-build.out

Steps to reproduce the issue

Can just run docker build with the following Dockerfile:

FROM ubuntu:16.04

ARG NPROC=14

RUN apt-get update && apt-get install -y 
        build-essential \
        gfortran \
        libopenmpi-dev \
        curl \
        cmake \
        git \
        wget \
        vim \
        autoconf \
        lcov \
        valgrind \
        libssl-dev \
        libpng-dev \
        libfreetype6-dev \
        libxft-dev \
        libsqlite3-dev \
        libbz2-dev \
        libatlas-base-dev \
        zlib1g-dev \
        python2.7-dev \
        tmux \
        unzip \
        environment-modules \
        && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* && \
    ln -s /usr/bin/python2.7 /usr/bin/python

ENV PREFIX=/scratch
RUN mkdir -p ${PREFIX} && \
    cd ${PREFIX} && \
    mkdir archive && \
    mkdir source && \
    mkdir build && \
    mkdir install

ENV HOME=/root

ENV SPACK_ROOT=${PREFIX}/spack

# Install Spack (specific hash)
RUN export SPACK_HASH=041aa143db6964575625f1849de639541efb83a5 && \
    export SPACK_URL="https://github.com/spack/spack/archive/${SPACK_HASH}.tar.gz" && \
    export SPACK_INSTALL_DIR="${SPACK_ROOT}" && \
    export SPACK_ARCHIVE="${PREFIX}/archive/spack-${SPACK_HASH}.tar.gz" && \
    wget --quiet ${SPACK_URL} --output-document=${SPACK_ARCHIVE} && \
    mkdir -p ${SPACK_INSTALL_DIR} && \
    tar -xf ${SPACK_ARCHIVE} -C ${SPACK_INSTALL_DIR} --strip-components=1 && \
    rm -rf ${SPACK_ARCHIVE} && \
    mkdir -p ${HOME}/.spack

# Load Spack
ENV PATH="${SPACK_ROOT}/bin:${PATH}"
RUN echo "source $SPACK_ROOT/share/spack/setup-env.sh" >> ${HOME}/.bashrc
RUN echo "source /usr/share/modules/init/bash"         >> ${HOME}/.bashrc

# Install flang
RUN spack spec -I flang && spack install flang && spack clean -a

Information on your system

Ubuntu 16.04 in Docker

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions