vpenso/prometheus-slurm-exporter

Errors when attempting make on RHEL 7.9

Closed this issue · 4 comments

Hello, I attempted building the exporter as per DEVELOPMENT.md, which threw a bunch of errors. Please see attached file of the console errors. Any suggestions as to what has gone wrong, how to resolve?
slurm_exporter_errors.txt

RHEL 7.9
go version go1.15.14 linux/amd64

mtds commented

Considering that after launching go test -v you have got the following error message:

go test -v
# net
cgo: mpicc did not produce error at completed:1

I believe you have stumbled on the following Golang issue: golang/go#41261

The problem seem to be either a quite old version of GCC or a wrong configured compiler. Can you post the output of gcc -v ?

Also, why mpicc? This is the wrapper over GCC used in conjunction with MPI (e.g. OpenMPI). It is strange
that is called during the make phase unless it is defined (perhaps via environment variable) as the default C compiler.

Thanks for the reply, Matteo. gcc -v:

Reading specs from /storage/pace-apps/spack/packages/0.12/linux-rhel7-x86_64/gcc-4.8.5/gcc-8.3.0-opnwtdjumg2hxo4ljvnx77ugb6afmvj3/bin/../lib/gcc/x86_64-pc-linux-gnu/8.3.0/specs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/storage/pace-apps/spack/packages/0.12/linux-rhel7-x86_64/gcc-4.8.5/gcc-8.3.0-opnwtdjumg2hxo4ljvnx77ugb6afmvj3/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.3.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /usr/local/pace-apps/spack/root/0.12/4b400d5/var/spack/stage/gcc-8.3.0-opnwtdjumg2hxo4ljvnx77ugb6afmvj3/spack-src/configure --prefix=/usr/local/pace-apps/spack/packages/0.12/linux-rhel7-x86_64/gcc-4.8.5/gcc-8.3.0-opnwtdjumg2hxo4ljvnx77ugb6afmvj3 --disable-multilib --enable-languages=c,c++,fortran --with-mpfr=/usr/local/pace-apps/spack/packages/0.12/linux-rhel7-x86_64/gcc-4.8.5/mpfr-3.1.6-vwx7snyrzymeg5n6f7dg5tbpgk35do3k --with-gmp=/usr/local/pace-apps/spack/packages/0.12/linux-rhel7-x86_64/gcc-4.8.5/gmp-6.1.2-5odxtlxihbfjtj4dxo52oz5f7r6ir6jk --enable-lto --with-quad --with-system-zlib --with-mpc=/usr/local/pace-apps/spack/packages/0.12/linux-rhel7-x86_64/gcc-4.8.5/mpc-1.1.0-pogagquauxex67doa7v2mkas2gcs5xut --with-isl=/usr/local/pace-apps/spack/packages/0.12/linux-rhel7-x86_64/gcc-4.8.5/isl-0.18-3wslknueis6r2nx3tasaizgda2ianxfa
Thread model: posix
gcc version 8.3.0 (GCC)

Regarding your mpicc question, I ran export, grepping for mpicc found: declare -x CC="mpicc

I also attached a file showing results of go env:
go_env.txt
"

mtds commented

GCC version seem recent enough (8.3.0), so I would assume it is not a problem.

Setup of CC/CXX points to MPI wrappers over the default C compiler. I assume your login environment automatically launch a spack command which preload some development tools, libraries, etc.

I would try to set up these two environment variables: (assuming you are using a Bash shell)

export CC=gcc
export CXX=g++

and then try to launch again make.

Matteo, my problems was that mpicc module was loaded. I unloaded mpicc (module purge mpicc), making gcc the default compiler again. Then, make ran perfectly. Thank you for your assistance.