############################################################################## ############################################################################## ### ### Running command: ### ### /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL cn.farms ### ############################################################################## ############################################################################## * installing to library ‘/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library’ * installing *source* package ‘cn.farms’ ... ** this is package ‘cn.farms’ version ‘1.55.0’ ** using staged installation ** libs using C compiler: ‘Apple clang version 15.0.0 (clang-1500.1.0.2.5)’ using C++ compiler: ‘Apple clang version 15.0.0 (clang-1500.1.0.2.5)’ using SDK: ‘MacOSX11.3.sdk’ clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c R_init_cnfarms.c -o R_init_cnfarms.o clang++ -arch arm64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c laplace.cpp -o laplace.o laplace.cpp:275:10: warning: variable 'I1left' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] else if(argLeft >= 0.0 && argRight >= 0.0) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ laplace.cpp:364:36: note: uninitialized use occurs here double I2left=(-leftMy/leftSigma)*I1left+I0left; ^~~~~~ laplace.cpp:275:7: note: remove the 'if' if its condition is always true else if(argLeft >= 0.0 && argRight >= 0.0) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ laplace.cpp:275:10: warning: variable 'I1left' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized] else if(argLeft >= 0.0 && argRight >= 0.0) { ^~~~~~~~~~~~~~ laplace.cpp:364:36: note: uninitialized use occurs here double I2left=(-leftMy/leftSigma)*I1left+I0left; ^~~~~~ laplace.cpp:275:10: note: remove the '&&' if its condition is always true else if(argLeft >= 0.0 && argRight >= 0.0) { ^~~~~~~~~~~~~~~~~ laplace.cpp:198:15: note: initialize the variable 'I1left' to silence this warning double I1left; ^ = 0.0 laplace.cpp:275:10: warning: variable 'I1right' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] else if(argLeft >= 0.0 && argRight >= 0.0) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ laplace.cpp:365:39: note: uninitialized use occurs here double I2right=(-rightMy/rightSigma)*I1right+I0right; ^~~~~~~ laplace.cpp:275:7: note: remove the 'if' if its condition is always true else if(argLeft >= 0.0 && argRight >= 0.0) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ laplace.cpp:275:10: warning: variable 'I1right' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized] else if(argLeft >= 0.0 && argRight >= 0.0) { ^~~~~~~~~~~~~~ laplace.cpp:365:39: note: uninitialized use occurs here double I2right=(-rightMy/rightSigma)*I1right+I0right; ^~~~~~~ laplace.cpp:275:10: note: remove the '&&' if its condition is always true else if(argLeft >= 0.0 && argRight >= 0.0) { ^~~~~~~~~~~~~~~~~ laplace.cpp:199:16: note: initialize the variable 'I1right' to silence this warning double I1right; ^ = 0.0 laplace.cpp:442:6: warning: unused variable 'method' [-Wunused-variable] int method=0; ^ laplace.cpp:23:11: warning: unused variable 'steps' [-Wunused-const-variable] const int steps=30; ^ laplace.cpp:26:14: warning: unused variable 'integrationFailureFactor' [-Wunused-const-variable] const double integrationFailureFactor=5.0; ^ laplace.cpp:27:14: warning: unused variable 'sigmaFactor' [-Wunused-const-variable] const double sigmaFactor=0.1; ^ laplace.cpp:30:14: warning: unused variable 'Pi' [-Wunused-const-variable] const double Pi=M_PI; ^ laplace.cpp:31:14: warning: unused variable 'E' [-Wunused-const-variable] const double E=M_E; ^ laplace.cpp:34:14: warning: unused variable 'sqrt3' [-Wunused-const-variable] const double sqrt3=1.7320508075688772935274463415058723669428052538104; ^ laplace.cpp:35:14: warning: unused variable 'sqrt2Pi' [-Wunused-const-variable] const double sqrt2Pi=2.5066282746310005024157652848110452530069867406099; ^ 12 warnings generated. clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c sparse_farms.c -o sparse_farms.o sparse_farms.c:185:13: error: call to undeclared function 'Calloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] void** ret=Calloc(1, void*); ^ sparse_farms.c:185:23: error: expected expression void** ret=Calloc(1, void*); ^ sparse_farms.c:189:31: error: expected expression E_SX_n =(double**)Calloc(nn, double*); ^ sparse_farms.c:198:22: error: expected expression nna=(int*)Calloc(1, int); ^ sparse_farms.c:204:32: error: expected expression E_SX_n[l]=(double*)Calloc(3, double); ^ sparse_farms.c:264:13: error: call to undeclared function 'Calloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] void** ret=Calloc(4, void*); ^ sparse_farms.c:264:23: error: expected expression void** ret=Calloc(4, void*); ^ sparse_farms.c:272:22: error: expected expression nna=(int*)Calloc(1, int); ^ sparse_farms.c:277:24: error: expected expression L=(double**)Calloc(2, double*); ^ sparse_farms.c:279:29: error: expected expression lapla=(double**)Calloc(nn, double*); ^ sparse_farms.c:281:31: error: expected expression E_SX_n =(double**)Calloc(nn, double*); ^ sparse_farms.c:287:27: error: expected expression L[l]=(double*)Calloc(3, double); ^ sparse_farms.c:295:31: error: expected expression lapla[l]=(double*)Calloc(3, double); ^ sparse_farms.c:297:32: error: expected expression E_SX_n[l]=(double*)Calloc(3, double); ^ sparse_farms.c:642:3: error: call to undeclared function 'Free'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] Free(L[l]); ^ sparse_farms.c:642:3: note: did you mean 'free'? /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/malloc/_malloc.h:42:7: note: 'free' declared here void free(void *); ^ sparse_farms.c:648:3: error: call to undeclared function 'Free'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] Free(E_SX_n[l]); ^ sparse_farms.c:654:2: error: call to undeclared function 'Free'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] Free(ret[3]); ^ sparse_farms.c:683:3: error: call to undeclared function 'Free'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] Free(E_SX_n[l]); ^ sparse_farms.c:687:2: error: call to undeclared function 'Free'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] Free(ret[1]); ^ 19 errors generated. make: *** [sparse_farms.o] Error 1 ERROR: compilation failed for package ‘cn.farms’ * removing ‘/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/cn.farms’