Skip to content

[flang][regression] Can't build flang, it fails at link time #150027

@pawosm-arm

Description

@pawosm-arm

I'm using my usual set of CMake flags. It used to work fine for some long months, and suddenly, I'm seeing this:

[100%] Linking CXX shared library ../../../../../lib/libFIRBuilder.so
ld.lld: error: undefined symbol: Fortran::common::die(char const*, ...)
>>> referenced by indirection.h:88 (llvm-project/flang/include/flang/Common/indirection.h:88)
>>>               CMakeFiles/FIRBuilder.dir/IntrinsicCall.cpp.o:(Fortran::common::Indirection<Fortran::evaluate::DataRef, true>::Indirection(Fortran::common::Indirection<Fortran::evaluate::DataRef, true>&&))
>>> referenced by indirection.h:88 (lvm-project/flang/include/flang/Common/indirection.h:88)
>>>               CMakeFiles/FIRBuilder.dir/IntrinsicCall.cpp.o:(Fortran::common::Indirection<Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 8>>, true>::Indirection(Fortran::common::Indirection<Fortran::evaluate::Expr<Fortran::evaluate::Type<(Fortran::common::TypeCategory)0, 8>>, true>&&))
>>> referenced by indirection.h:84 (llvm-project/flang/include/flang/Common/indirection.h:84)
>>>               CMakeFiles/FIRBuilder.dir/IntrinsicCall.cpp.o:(Fortran::common::Indirection<Fortran::evaluate::DataRef, true>::Indirection(Fortran::common::Indirection<Fortran::evaluate::DataRef, true> const&))
>>> referenced 92 more times

CMake invocation:

cmake $HOME/upstream/llvm-project/llvm \
-DBUILD_SHARED_LIBS=True \
-DCMAKE_BUILD_TYPE=Debug \
-DLLVM_BINUTILS_INCDIR=/usr/include \
-DLIBOMP_FORTRAN_MODULES=True \
-DLIBOMP_COPY_EXPORTS=False \
-DLIBOMP_USE_HWLOC=False \
-DLIBOMP_OMPT_SUPPORT=ON \
-DLIBOMP_OMPD_GDB_SUPPORT=OFF \
-DLLVM_ENABLE_LLD=True \
-DLLVM_ENABLE_FFI=False \
-DLLVM_TARGETS_TO_BUILD="AArch64" \
-DLLVM_TOOL_BOLT_BUILD=True \
-DLLVM_ENABLE_PROJECTS="llvm;clang;flang;bolt;lld" \
-DLLVM_ENABLE_RUNTIMES="compiler-rt;flang-rt;openmp" \
-DLLVM_ENABLE_LLD=ON \
-DFLANG_RT_ENABLE_SHARED=ON \
-DFLANG_RT_ENABLE_STATIC=ON \
-DCMAKE_INSTALL_PREFIX=$HOME/upstream/llvm-debug

Metadata

Metadata

Assignees

No one assigned

    Labels

    build-problemflangFlang issues not falling into any other category

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions