Chapel with LLVM/CLANG

I am about to try Chapel with Clang/LLVM. It appears that doing so builds both Clang and LLVM. Is this correct?

Will trying to do so on a LINUX system with CLANG and LLVM already installed, but only 3.4.2, cause any grief?

Thanks - Damian

Hi Damian -

It's easiest to work with a system install of LLVM 11 if that is available to you (mainly to avoid the long make time for LLVM). If not, you can build the bundled version yourself and that should work just fine even if you have another, older clang and LLVM installed system-wide. As always please let us know if you run into problems here.

Thanks for the advice.

Sadly, RedHat (and CentOS) are not even remotely current in terms of packaged release of LLVM and CLANG.

I will build the bundled copy. I assume that Chapel puts any executables in the same search path as the chapel compiler.

Hi Damian —

Not sure whether you'll have seen it, but in the prereqs file, for CentOS, it suggests:

sudo dnf install gcc gcc-c++ m4 perl python3 python3-devel bash make gawk\
 git cmake llvm-devel clang clang-devel 

if that's an option.

I believe that it doesn't do that, but instead leaves them in an install directory under the third-party directory, where the compiler will know where to find them whenever used with CHPL_LLVM=bundled.

As Michael indicated, build time for LLVM is pretty massive. Definitely something to fire off before bed and check on in the morning. make -j <n> can help, but can also kill certain systems if n is too high and exhausts memory. Conservatively, I fire off the bundled build when I'm not waiting for it.

-Brad

Not sure whether you'll have seen it, but in the prereqs file, for CentOS,
it suggests:

sudo dnf install gcc gcc-c++ m4 perl python3 python3-devel bash make gawk
git cmake llvm-devel clang clang-devel

Already done. But the last three are version

3.4.2

which is a long way short of the Version 11 that is needed which is what
triggered my request in the first place.

I believe that it doesn't do that, but instead leaves them in an install
directory under the third-party directory, where the compiler will know
where to find them whenever used with CHPL_LLVM=bundled.

Smart. No clashes.

As Michael indicated, build time for LLVM is pretty massive. Definitely
something to fire off before bed and check on in the morning. make -j
can help, but can also kill certain systems if n is too high and exhausts
memory. Conservatively, I fire off the bundled build when I'm not waiting
for it.

Wise man. It has 24 cores and 64GB.

Thanks for the advice - Damian

I can't say I'm a dnf user, but is there an update/upgrade style command that would refresh these packages if possible? Unless that number means something different than the 11 we're looking for, it sounds like it dates from the 2013+/-1 period (and even the most conservative system integrators don't tend to lag behind that far in my experience).

-Brad

CentOS/Redhat does with its standard packages.

They have some optional things for GCC/G++ which gives you V10 for those.
But not for LLVM/CLANG.

A Redhat commercial subscription does have LLVM-11.0.

https://access.redhat.com/documentation/es-es/red_hat_developer_tools/1/pdf/using_llvm_11.0.0_toolset/red_hat_developer_tools-1-using_llvm_11.0.0_toolset-en-us.pdf

But I am running CentOS.

Don't worry, I will build from scratch.

Thanks - Damian

See also

https://forums.centos.org/viewtopic.php?t=78039

Stay safe - Damian