Warning message In if (nchar(CXX) > 0) return(TRUE) appears for all Stan models

We are using a virtual desktop infrastructure (VDI) at company. I just installed Rstan on my VDI, and tried some tests on the installation. The version of R is 3.5.0, Rstan is 2.17.3, Rtools is 3.3. All the installations are done on the server that I don’t have privilege of administrator. It seems that the installation didn’t add path of rtools to the system path environment. system('g++ -v') returns nothing, no error or any message. I tried the 8school example, and a simple Bernoulli example as below:

  // test.stan
data {
  int<lower = 0> N;
  int<lower = 0, upper = 1> y[N];
parameters {
  real<lower = 0, upper = 1> p;

model {
  p ~ beta(1, 2);
  y ~ bernoulli(p);

Both models compiled with no error, but there is a warning message always appears:

" Warning message:
In if (nchar(CXX) > 0) return(TRUE) :
the condition has length > 1 and only the first element will be used"

rstan:::get_CXX() returns “C:/FAST/RTools/3.3/mingw_/bin/g++”.

I never went into such issue with my personal laptop.

Do you know what might be the cause for this warning message?


It looks as if you may have a multiarched system. Although, it is weird that rstan:::get_CXX() returns
C:/FAST/RTools/3.3/mingw_/bin/g++ instead of C:/FAST/RTools/3.3/mingw_64/bin/g++ or C:/FAST/RTools/3.3/mingw_32/bin/g++. But if models compile, then I wouldn’t worry about it too much.

Okay, good to know:)


That weirdness suggests to me that some shell script somewhere set up a path to be something like C:/FAST/RTools/3.3/mingw_$NUMBITS/bin/g++, only for NUMBITS to not be set. (The shell script variable could be named something other than NUMBITS.)