<div dir="ltr">I am [also] having problems when trying to build an out-of-source loadable module on Fedora 21:<div><br></div><div>-- LLVMHoistGlobals ignored -- Loadable modules not supported on this platform.<br></div><div><br></div><div>Thinking it was a packaging issue, I tried downloading/building/installing both 3.5.0 and 3.5.1 from source, but to no avail. (Using 3.5.0 from the package archives on an Ubuntu 11.10 VM also had problems.)</div><div><br></div><div>The 3.4 packages in Fedora 20 work great. What changed between 3.4 and 3.5 that would have caused loadable modules to fail?</div><div><br></div><div>There is a similar problem posted on stackoverflow:</div><div><a href="http://stackoverflow.com/questions/27863706/llvm-out-of-source-pass-build-loadable-modules-not-supported-on-linux">http://stackoverflow.com/questions/27863706/llvm-out-of-source-pass-build-loadable-modules-not-supported-on-linux</a><br></div><div><br></div><div>-Rob</div><div><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Message: 5<br>
Date: Tue, 13 Jan 2015 08:03:25 +0100<br>
From: Alexander Poddey <<a href="mailto:alexander.poddey@gmx.net">alexander.poddey@gmx.net</a>><br>
To: <a href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a><br>
Subject: [LLVMdev] LLVM out of source pass build: Loadable modules not<br>
        supported (on Linux)<br>
Message-ID: <m92fiv$6ad$<a href="mailto:1@ger.gmane.org">1@ger.gmane.org</a>><br>
Content-Type: text/plain; charset="ISO-8859-1"<br>
<br>
Hi all,<br>
<br>
I compiled and installed LLVM from trunk on debian wheezy some weeks ago<br>
(configure & make) and now tried to out of source compile an opt pass<br>
following the cmake out of source pass build instructions from the docu.<br>
<br>
When trying to build (cMakeLists appended below)<br>
<br>
mkdir build<br>
cd build<br>
cmake -DCMAKE_MODULE_PATH=/usr/local/share/llvm/cmake ../<br>
<br>
I get:<br>
<br>
-- MyOutOfSourcePass ignored -- Loadable modules not supported on this<br>
platform.<br>
<br>
hmm? opt and the loadable passes (at<br>
llvm_trunk/build/Debug+Asserts/lib/xxx.so) are present and work (have been<br>
compiled using configure & make, not cmake).<br>
<br>
<br>
Any idea? Thx Alex<br>
<br>
<br>
P.S.:<br>
My questions are user questions and it seems to me the dev list is not<br>
appropriate. Please point me to the correct place if you feel the same and<br>
know where to discuss llvm user questions! Thx!<br>
<br>
<br>
<br>
<br>
====================================<br>
APPENDIX<br>
====================================<br>
<br>
<br>
Dir structure:<br>
project<br>
   | MypassDir<br>
<br>
<br>
project-dir's CMakeLists.txt:<br>
====================================<br>
<br>
# following <a href="http://llvm.org/docs/CMake.html" target="_blank">http://llvm.org/docs/CMake.html</a> and llvm-mutate's cmake files<br>
cmake_minimum_required(VERSION 2.8)<br>
<br>
set(CMAKE_C_FLAGS "-fPIC") #position independent code genration<br>
set(CMAKE_CXX_FLAGS "-fPIC -Wno-c++11-extensions")<br>
<br>
find_package(LLVM REQUIRED CONFIG)<br>
<br>
# to be able to merge into LLVM source tree later on<br>
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")<br>
include(AddLLVM)<br>
<br>
<br>
add_definitions(${LLVM_DEFINITIONS})<br>
include_directories(${LLVM_INCLUDE_DIRS})<br>
link_directories(${LLVM_LIBRARY_DIRS}) #not present in llvm example<br>
<br>
add_subdirectory(MypassDir)<br>
<br>
<br>
<br>
<br>
Mypass dir's CMakeLists.txt:<br>
====================================<br>
add_llvm_loadable_module(MyPass<br>
  MyPass.cpp<br>
  )<br>
<br>
<br><br>
</blockquote></div><br></div></div></div>