povRAM error - can't install OpenMx on GNU/Linux Distribution (R 4.0.0)

Posted on
No user picture. iembry Joined: 05/31/2020
Hi, I recently attempted to update to the newest OpenMx release on R 4.0.0 on a GNU/Linux Distribution (Ubuntu-based) and the installation was unsuccessful.

I am only including the part of the installation process with the error message below:


g++ -std=c++14 -I"/usr/share/R/include" -DNDEBUG -I'/R/x86_64-pc-linux-gnu-library/Rcpp/include' -I'/R/x86_64-pc-linux-gnu-library/RcppEigen/include' -I'/R/x86_64-pc-linux-gnu-library/StanHeaders/include' -I'/R/x86_64-pc-linux-gnu-library/BH/include' -I'/R/x86_64-pc-linux-gnu-library/rpf/include' -fopenmp -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c povRAM.cpp -o povRAM.o
povRAM.cpp: In member function ‘void PathCalc::determineShallowDepth(FitContext*)’:
povRAM.cpp:150:21: error: ‘typeof’ was not declared in this scope
typeof(aio->sparse) curProd = aio->sparse;
^
povRAM.cpp:153:4: error: ‘curProd’ was not declared in this scope
curProd = (curProd * aio->sparse.transpose()).pruned().eval();
^
/usr/lib/R/etc/Makeconf:176: recipe for target 'povRAM.o' failed
make: *** [povRAM.o] Error 1
ERROR: compilation failed for package ‘OpenMx’
* removing ‘/R/x86_64-pc-linux-gnu-library/OpenMx’

I have not previously had that error on previous installations of OpenMx.

Thank you.

Irucka

Replied on Fri, 06/05/2020 - 10:06
Picture of user. jpritikin Joined: 05/23/2012

You need to use -std=gnu++14 instead of -std=c++14

See https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Customizing-package-compilation

Replied on Mon, 06/15/2020 - 12:39
No user picture. iembry Joined: 05/31/2020

Hi jpritikin, thank you for your suggestion.

I made the requested change and OpenMx was successfully installed.