EnterpriseDB / system_stats

A Postgres extension for exposing system metrics such as CPU, memory and disk information
Other
122 stars 25 forks source link

Could not find clang #1

Closed doronyaary closed 4 years ago

doronyaary commented 4 years ago

Hello,

First of all - I would like to say that this is a long awaited extensions for PostgreSQL that really gives important system views for easier monitoring - so thank you for this.

I have tried to install according to instructions but I got an error - I am sure I have done something wrong in the process I just dont know what. These are the steps I have taken (CentOS 7 PG 12) - all with user "root":

yum install clang -y
git clone https://github.com/EnterpriseDB/system_stats.git
export PATH=/usr/pgsql-12/bin:$PATH
make install USE_PGXS=1

These is the error I got:

/opt/rh/llvm-toolset-7/root/usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -O2  -I. -I./ -I/usr/pgsql-12/include/server -I/usr/pgsql-12/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include -flto=thin -emit-llvm -c -o system_stats.bc system_stats.c
make: /opt/rh/llvm-toolset-7/root/usr/bin/clang: Command not found
make: *** [system_stats.bc] Error 127

What have I missed?

Thanks!

neel5481 commented 4 years ago

Hi,

Here YUM rpm package of postgres which is compiled with LLVM to support JIT with Bitcode so you have to install the llvm toolset packages from scl yum repo because it is not available with core CentOS.

doronyaary commented 4 years ago

Hi Neel,

You were 100% accurate! Installing the llvm-toolset-7 did the trick. If anyone is having this issue - this is what solved it for me:

yum install llvm-toolset-7

Neel - Cheers!