[flang-commits] [PATCH] D124759: [flang] Install Fortran_main library

Dan Palermo via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue May 10 14:08:26 PDT 2022


dpalermo requested changes to this revision.
dpalermo added a comment.
This revision now requires changes to proceed.

I just tried this patch but it seems to fail when it tries to build a shared libFortran_main.so:

  [31/34] Linking C shared library lib/libFortran_main.so.15git
  FAILED: lib/libFortran_main.so.15git
  : && /usr/bin/cc -fPIC -fPIC -fno-semantic-interposition -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-comment -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/dpalermo/git/trunk/llvm-project/build/./lib  -Wl,--gc-sections -shared -Wl,-soname,libFortran_main.so.15git -o lib/libFortran_main.so.15git tools/flang/runtime/FortranMain/CMakeFiles/obj.Fortran_main.dir/Fortran_main.c.o  -Wl,-rpath,"\$ORIGIN/../lib" && :
  /usr/bin/ld: tools/flang/runtime/FortranMain/CMakeFiles/obj.Fortran_main.dir/Fortran_main.c.o: in function `main':
  Fortran_main.c:(.text.startup.main+0x9): undefined reference to `_FortranAProgramStart'
  /usr/bin/ld: Fortran_main.c:(.text.startup.main+0x10): undefined reference to `_QQmain'
  /usr/bin/ld: Fortran_main.c:(.text.startup.main+0x15): undefined reference to `_FortranAProgramEndStatement'
  collect2: error: ld returned 1 exit status

This is the cmake I am using:

  cmake ../llvm -G 'Ninja' \
        -DCMAKE_INSTALL_PREFIX=$TOP/install/ \
        -DCMAKE_BUILD_TYPE=Release \
        -DLLVM_ENABLE_ASSERTIONS=ON \
        -DLLVM_ENABLE_PROJECTS="clang;mlir;openmp;flang" \
        -DLLVM_TARGETS_TO_BUILD="X86;AMDGPU" \
        -DBUILD_SHARED_LIBS=ON \
        -DLLVM_INSTALL_UTILS=On \
        -DCMAKE_CXX_STANDARD=17


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124759/new/

https://reviews.llvm.org/D124759



More information about the flang-commits mailing list