nasa / trick

Trick Simulation Environment. Trick provides a common set of simulation capabilities and utilities to build simulations automatically.
Other
32 stars 16 forks source link

LLVM 16 on RHEL8 #1617

Closed prkunz closed 9 months ago

prkunz commented 9 months ago

RHEL8 has updated to LLVM 16, and this is preventing building trick. I don't know if there's an easy way to make it work but I ended up building LLVM 15 from source.

  1. Download the llvm-project source from github.
cd /path/to/extracted/llvm-project-source
mkdir build
cmake -S llvm -B build -G "Unix Makefiles" -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/repos/github/llvm15
cmake --build build
cd build
cmake -DCMAKE_INSTALL_PREFIX=<llvm15-install-dir> -P cmake_install.cmake
cd </path/to/trick/source>
./configure --with-llvm=<llvm15-install-dir>
make
sudo make install

NOTES:

Line 3: The -G argument will change to match your build system. See the readme in llvm-project-source Line 6: make sure you set the install prefix or it will install to /usr/local merely copying contents of the build folder is insufficient because it will not get all of the needed header and such.

hchen99 commented 9 months ago

Thanks for the info. We have an issue associated with llvm 16 as #1564 that will be addressed.

Meanwhile, instead of building llvm 15 project from the source code, you tried the pre-built tarball such as clang+llvm-15.0.7-powerpc64le-linux-rhel-8.4.tar.xz and it didn't work? Just trying to verify.

prkunz commented 9 months ago

Thanks for the info. We have an issue associated with llvm 16 as #1564 that will be addressed.

Meanwhile, instead of building llvm 15 project from the source code, you tried the pre-built tarball such as clang+llvm-15.0.7-powerpc64le-linux-rhel-8.4.tar.xz and it didn't work? Just trying to verify.

I was under the impression from the name that it was for PowerPC arcitecture. I'm on x86_64, so I didn't try that one.

hchen99 commented 9 months ago

Building LLVM (for reference purpose): https://llvm.org/docs/GettingStarted.html

hchen99 commented 9 months ago

We addressed this in a recent commit, please let us know if the current master or the release 19.7.0 branch doesn't solve this problem for you.

sharmeye commented 9 months ago

This seems to have fixed the issue, please reopen if any further issues are discovered with llvm 16 in 19.7.0+