CentOS - Compile Polly without LLVM

212 views
Skip to first unread message

Saheed Bolarinwa

unread,
Apr 12, 2021, 1:06:05 PM4/12/21
to Polly Development
Hello, please how can I build polly without building the entire LLVM because I have only 20 GB on my system.
I am on CentOS 8 with clang 10 and gcc.

cmake -DCMAKE_PREFIX_PATH=${LLVM_PREFIX}/lib/cmake/llvm ../llvm_git/polly

but for me, CMake could not find LLVM.

I also can't locate where the required llvm files are. I have installed llvm with 
yum install llvm

I am surprised that I can't just confirm if llvm is installed properly with $ llvm --version
The files are in "/usr/bin" but this path doesn't work with the above CMake command

Here is the CMake error:
CMake Error at CMakeLists.txt:7 (find_package):
  Could not find a package configuration file provided by "LLVM" with any of
  the following names:

    LLVMConfig.cmake
    llvm-config.cmake

  Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set
  "LLVM_DIR" to a directory containing one of the above files.  If "LLVM"
  provides a separate development package or SDK, be sure it has been
installed.

Thanks
Saheed

Saheed Bolarinwa

unread,
Apr 13, 2021, 2:35:57 AM4/13/21
to Polly Development
Okay, I can build Polly now. I had to install the "llvm-devel" package.
To get it to build, I also had to roll back to tag "llvmorg-11-init" since I have version 10 installed.
"make" builds but "make check-polly" fails

Anyways, I guess my problem is partially resolved

Thanks
Saheed

Michael Kruse

unread,
Apr 14, 2021, 1:25:54 AM4/14/21
to Saheed Bolarinwa, Polly Development
Hi,

the help pages unfortunately still refer to before the LLVM project
moved to the monorepository, a few things may have changed since then.
I myself haven't' tested whether the out-of-tree build still works for
a while. However, it is essential that the version of LLVM and the
version of Polly are the very same, down the very git commit. The LLVM
C++ API changes regularly and every such change causes an
incompatibility. That is, it would be best if you get the source for
Polly from Cent OS itself since their distribution might have added
patches relative to the upstream upstream repository. I would not
recommend an out-of-tree build for beginners since a lot more things
can go wrong.

Finding the installed LLVM is done by cmake. See
https://cmake.org/cmake/help/latest/command/find_package.html for the
documentation. A "-devel" package being required when compiling
software that depends on another library is nothing unusual.

Michael




Am Di., 13. Apr. 2021 um 01:35 Uhr schrieb Saheed Bolarinwa
<refacto...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups "Polly Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to polly-dev+...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/polly-dev/f47e57e3-eeb0-4339-ba49-5f6ba7ffa088n%40googlegroups.com.



--
Tardyzentrismus verboten!
Reply all
Reply to author
Forward
0 new messages