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
Which version of gcc are you using?
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
Hi AdminRobK, I have GCC version 5.4.0 20160609. Thank you.
Hi jpritikin, thank you for your suggestion.
I made the requested change and OpenMx was successfully installed.