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

Hi,
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?

Thanks!

This should be
C:/FAST/RTools/3.3/mingw_64/bin/g++
(or perhaps 32 instead of 64 if it is a 32 bit environment). It seems as if the WIN environmental variable is not being set somehow.