Closed ankane closed 2 years ago
Compilation fails with SCS 3.1.0 and USE_LAPACK=0 with error: use of undeclared identifier 'mean'. Changing line 88 to scs_float mean = 0.0; fixes it.
USE_LAPACK=0
error: use of undeclared identifier 'mean'
scs_float mean = 0.0;
make USE_LAPACK=0
cc -g -Wall -Wwrite-strings -pedantic -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -O3 -fPIC -DCTRLC=1 -DCOPYAMATRIX=1 -DGPU_TRANSPOSE_MAT=1 -DINDIRECT=1 -c src/scs.c -o src/scs_indir.o cc -g -Wall -Wwrite-strings -pedantic -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -O3 -fPIC -DCTRLC=1 -DCOPYAMATRIX=1 -DGPU_TRANSPOSE_MAT=1 -c -o src/util.o src/util.c cc -g -Wall -Wwrite-strings -pedantic -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -O3 -fPIC -DCTRLC=1 -DCOPYAMATRIX=1 -DGPU_TRANSPOSE_MAT=1 -c -o src/cones.o src/cones.c cc -g -Wall -Wwrite-strings -pedantic -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -O3 -fPIC -DCTRLC=1 -DCOPYAMATRIX=1 -DGPU_TRANSPOSE_MAT=1 -c -o src/aa.o src/aa.c cc -g -Wall -Wwrite-strings -pedantic -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -O3 -fPIC -DCTRLC=1 -DCOPYAMATRIX=1 -DGPU_TRANSPOSE_MAT=1 -c -o src/rw.o src/rw.c cc -g -Wall -Wwrite-strings -pedantic -funroll-loops -Wstrict-prototypes -I. -Iinclude -Ilinsys -O3 -fPIC -DCTRLC=1 -DCOPYAMATRIX=1 -DGPU_TRANSPOSE_MAT=1 -c -o src/linalg.o src/linalg.c src/linalg.c:88:3: error: use of undeclared identifier 'mean' mean = 0.; ^ src/linalg.c:90:5: error: use of undeclared identifier 'mean' mean += x[i]; ^ src/linalg.c:92:10: error: use of undeclared identifier 'mean' return mean / n; ^ 3 errors generated. make: *** [src/linalg.o] Error 1
Thanks, this is fixed in https://github.com/cvxgrp/scs/pull/205.
Great, thanks @bodono!
Specifications
Description
Compilation fails with SCS 3.1.0 and
USE_LAPACK=0
witherror: use of undeclared identifier 'mean'
. Changing line 88 toscs_float mean = 0.0;
fixes it.How to reproduce
Output