Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to enable shared library build while using CMake for LLVM?
    primarykey
    data
    text
    <p><strong>The problem:</strong> Ubuntu 10.10 doesn't supply LLVM CMake modules (<code>/usr/share/llvm</code>) or (<code>/usr/local/share/llvm</code>) when installing LLVM 2.8 from Ubuntu repositories.</p> <p>So I'm now compiling LLVM 2.8 using CMake by myself and then installing it like this:</p> <pre><code>cmake .. make make install </code></pre> <p>This will install CMake modules I need to link LLVM into my library. The problem is that when I compile LLVM using CMake, only static libraries are compiled. I saw in LLVM documentation, that you can compile shared libraries using this parameter into CMake:</p> <pre><code>cmake -DBUILD_SHARED_LIBS=true .. </code></pre> <p>But now, the CMake returns this error:</p> <pre><code>-- Target triple: i686-pc-linux-gnu -- Native target architecture is X86 -- Threads enabled. -- Building with -fPIC -- Targeting Alpha -- Targeting ARM -- Targeting Blackfin -- Targeting CBackend -- Targeting CellSPU -- Targeting CppBackend -- Targeting Mips -- Targeting MBlaze -- Targeting MSP430 -- Targeting PIC16 -- Targeting PowerPC -- Targeting Sparc -- Targeting SystemZ -- Targeting X86 -- Targeting XCore -- Configuring done CMake Error: The inter-target dependency graph contains the following strongly connected component (cycle): "LLVMARMCodeGen" of type SHARED_LIBRARY depends on "LLVMARMAsmPrinter" "LLVMARMAsmPrinter" of type SHARED_LIBRARY depends on "LLVMARMCodeGen" At least one of these targets is not a STATIC_LIBRARY. Cyclic dependencies are allowed only among static libraries. -- Build files have been written to: /llvm-2.8/build </code></pre> <p>And I cannot compile it as shared library, does anyone knows how to solve that problem ? I need the shared libraries because they're dependencies of many other tools.</p> <h2>Summary</h2> <p>1) LLVM 2.8 from Ubuntu repository installs LLVM shared libraries but doesn't install CMake modules I need.</p> <p>2) On the other side, if I compile LLVM by myself, it installs the CMake modules I need, but I can only do that when compiling LLVM as static library.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload