Closed paciorek closed 6 months ago
It appears that the following will fix this.
1) move the math.h and Rmath.h to the top of the includes in predefinedNimblelist.cpp
, mimicing nimIntegrate.cpp
. This will allow nimble to build.
2) monkey with CPPincludes
so that our generated code also has math.h and Rmath.h as the first includes. This will allow run-time compilation of the eigen example in test-nimbleLists.h
.
I will follow that path on Monday or so. When I first attempted item 2 above I was unable to control the order of how the CPPincludes got put into our generated Cpp files so I need to better understand that.
A user reported this error when trying to install nimble from source (the only option apparently) under RHEL. I've recreated with a Docker container (see steps at bottom).
For reference, under Ubuntu, this is the compilation invocation:
There is some discussion of apparently the same issue here on StackOverflow. In trying some of the ideas in that post, such as moving
math.h
aboveRmath.h
and usingR_NO_REMAP_RMATH
I could sometimes (not always) get nimble to install, but then running theeigen()
related test intest-nimbleLists.R
, the same error with not findingstd::Rf_beta
would occur.Some other notes:
math.h
andRmath.h
as includes inpredefinedNimbleLists.cpp
.--std=gnu++11
allows installation to occur.To set up RHEL: