<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - libLTO fails to link: /llvm/Config/Targets.def:31: undefined reference to `LLVMInitializeVETargetInfo'"
   href="https://bugs.llvm.org/show_bug.cgi?id=47847">47847</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>libLTO fails to link: /llvm/Config/Targets.def:31: undefined reference to `LLVMInitializeVETargetInfo'
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Linker
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>slyfox@inbox.ru
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>llvm-11 and llvm trunk both fail to link libLTO:

$ cmake ../llvm -DCMAKE_INSTALL_PREFIX=/usr -DLLVM_APPEND_VC_REV=OFF
-DCMAKE_INSTALL_PREFIX=/usr/lib/llvm/11 -DLLVM_LIBDIR_SUFFIX=
-DBUILD_SHARED_LIBS=OFF -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON
-DLLVM_DISTRIBUTION_COMPONENTS='LLVM;LTO;Remarks;llvm-config;cmake-exports;llvm-headers;LLVMDemangle;LLVMSupport;LLVMTableGen'
-DLLVM_TARGETS_TO_BUILD=
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD='ARM;SystemZ;Hexagon;RISCV;AArch64;VE;X86;WebAssembly;AMDGPU;Sparc;Lanai;AVR;ARC;MSP430;XCore;PowerPC;Mips;NVPTX;BPF'
-DLLVM_BUILD_TESTS=yes -DLLVM_ENABLE_FFI=yes -DLLVM_ENABLE_LIBEDIT=no
-DLLVM_ENABLE_TERMINFO=yes -DLLVM_ENABLE_LIBXML2=no -DLLVM_ENABLE_ASSERTIONS=no
-DLLVM_ENABLE_LIBPFM=yes -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_RTTI=ON
-DLLVM_ENABLE_Z3_SOLVER=no -DFFI_INCLUDE_DIR=/usr/lib/libffi/include
-DFFI_LIBRARY_DIR= -DHAVE_LIBXAR=0 -DOCAMLFIND=NO
-DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND -DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_CXX_FLAGS_DEBUG='-g0' -DCMAKE_C_FLAGS_DEBUG='-g0'
...
$ LANG=C make VERBOSE=1
...
[ 76%] Linking CXX shared library ../../lib/libLTO.so
cd /home/slyfox/dev/git/llvm-project/build/tools/lto && /usr/bin/cmake -E
cmake_link_script CMakeFiles/LTO.dir/link.txt --verbose=1
/usr/x86_64-pc-linux-gnu/gcc-bin/11.0.0/c++ -fPIC  -fPIC
-fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra
-Wno-unused-parameter -Wwrite-strings -Wcast-qual
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough
-Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move
-Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment
-ffunction-sections -fdata-sections -O2 -g -DNDEBUG 
-Wl,-rpath-link,/home/slyfox/dev/git/llvm-project/build/./lib  -Wl,-O3
-Wl,--gc-sections 
-Wl,--version-script,"/home/slyfox/dev/git/llvm-project/build/tools/lto/LTO.exports"
 -Wl,-z,defs -Wl,-z,nodelete -shared -Wl,-soname,libLTO.so.12git -o
../../lib/libLTO.so.12git CMakeFiles/LTO.dir/LTODisassembler.cpp.o
CMakeFiles/LTO.dir/lto.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib"
../../lib/libLLVM-12git.so
/usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../x86_64-pc-linux-gnu/bin/ld:
CMakeFiles/LTO.dir/lto.cpp.o: in function `llvm::InitializeAllTargetInfos()':
/home/slyfox/dev/git/llvm-project/build/include/llvm/Config/Targets.def:31:
undefined reference to `LLVMInitializeVETargetInfo'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../x86_64-pc-linux-gnu/bin/ld:
/home/slyfox/dev/git/llvm-project/build/include/llvm/Config/Targets.def:31:
undefined reference to `LLVMInitializeVETargetInfo'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../x86_64-pc-linux-gnu/bin/ld:
CMakeFiles/LTO.dir/lto.cpp.o: in function `llvm::InitializeAllTargets()':
/home/slyfox/dev/git/llvm-project/build/include/llvm/Config/Targets.def:31:
undefined reference to `LLVMInitializeVETarget'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../x86_64-pc-linux-gnu/bin/ld:
CMakeFiles/LTO.dir/lto.cpp.o: in function `llvm::InitializeAllTargetMCs()':
/home/slyfox/dev/git/llvm-project/build/include/llvm/Config/Targets.def:31:
undefined reference to `LLVMInitializeVETargetMC'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../x86_64-pc-linux-gnu/bin/ld:
CMakeFiles/LTO.dir/lto.cpp.o: in function `llvm::InitializeAllAsmPrinters()':
/home/slyfox/dev/git/llvm-project/build/include/llvm/Config/AsmPrinters.def:32:
undefined reference to `LLVMInitializeVEAsmPrinter'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../x86_64-pc-linux-gnu/bin/ld:
CMakeFiles/LTO.dir/lto.cpp.o: in function `llvm::InitializeAllDisassemblers()':
/home/slyfox/dev/git/llvm-project/build/include/llvm/Config/Disassemblers.def:32:
undefined reference to `LLVMInitializeVEDisassembler'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../x86_64-pc-linux-gnu/bin/ld:
CMakeFiles/LTO.dir/LTODisassembler.cpp.o: in function
`llvm::InitializeAllTargetInfos()':
/home/slyfox/dev/git/llvm-project/build/include/llvm/Config/Targets.def:31:
undefined reference to `LLVMInitializeVETargetInfo'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../x86_64-pc-linux-gnu/bin/ld:
CMakeFiles/LTO.dir/LTODisassembler.cpp.o: in function
`llvm::InitializeAllTargetMCs()':
/home/slyfox/dev/git/llvm-project/build/include/llvm/Config/Targets.def:31:
undefined reference to `LLVMInitializeVETargetMC'
/usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../x86_64-pc-linux-gnu/bin/ld:
CMakeFiles/LTO.dir/LTODisassembler.cpp.o: in function
`llvm::InitializeAllDisassemblers()':
/home/slyfox/dev/git/llvm-project/build/include/llvm/Config/Disassemblers.def:32:
undefined reference to `LLVMInitializeVEDisassembler'
collect2: error: ld returned 1 exit status
make[2]: *** [tools/lto/CMakeFiles/LTO.dir/build.make:119: lib/libLTO.so.12git]
Error 1
make[2]: Leaving directory '/home/slyfox/dev/git/llvm-project/build'
make[1]: *** [CMakeFiles/Makefile2:26888: tools/lto/CMakeFiles/LTO.dir/all]
Error 2
make[1]: Leaving directory '/home/slyfox/dev/git/llvm-project/build'</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>