Cannot open the connection issue: modeling using ulam

Now I had this error:

  • installing source package ‘rstan’ …
    ** package ‘rstan’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs

*** arch - i386

“C:\Rtools\mingw_64\bin\g++.exe” -m32 -std=c++1y -I"C:/PROGRA~1/R/R-36~1.3/include" -DNDEBUG -I"…/inst/include" -I"." -I"C:/Users/Shambhu Paudel/Documents/R/win-library/3.6/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"C:/Users/Shambhu Paudel/Documents/R/win-library/3.6/Rcpp/include" -I"C:/Users/Shambhu Paudel/Documents/R/win-library/3.6/RcppEigen/include" -I"C:/Users/Shambhu Paudel/Documents/R/win-library/3.6/BH/include" -I"C:/Users/Shambhu Paudel/Documents/R/win-library/3.6/StanHeaders/include" -O3 -march=native -c sparse_extractors.cpp -o sparse_extractors.o
sh: $’\223C:Rtoolsmingw_64bing++.exe\224’: command not found
make: *** [C:/PROGRA~1/R/R-36~1.3/etc/i386/Makeconf:215: sparse_extractors.o] Error 127
ERROR: compilation failed for package ‘rstan’

  • removing ‘C:/Users/Shambhu Paudel/Documents/R/win-library/3.6/rstan’
  • restoring previous ‘C:/Users/Shambhu Paudel/Documents/R/win-library/3.6/rstan’

The downloaded source packages are in
‘C:\Users\Shambhu Paudel\AppData\Local\Temp\RtmpkzEBQu\downloaded_packages’
Warning message:
In install.packages(“rstan”, type = “source”) :
installation of package ‘rstan’ had non-zero exit status

Make sure that you remove RStan first (e.g. remove.packages("rstan")) before installing the new version.

If that doesn’t work, can you post the contents of your Makevars.win file?

All contents in Makevars.win are:

CXX14FLAGS=-O3 -march=native
CXX14 = “C:\Rtools\mingw_64\bin\g++.exe” -m$(WIN) -std=c++1y
CXX11FLAGS=-O3 -march=native

The problem is this line:

CXX14 = “C:\Rtools\mingw_64\bin\g++.exe” -m$(WIN) -std=c++1y

The quotation marks are causing the flag to be parsed incorrectly, and you’re forcing the use of the 64-bit compiler (mingw_64) for both 32-bit and 64-bit contexts.

Try removing that line entirely, so your Makevars.win file should just be:

CXX14FLAGS=-O3 -march=native
CXX11FLAGS=-O3 -march=native

And then re-run the installation

*** arch - i386
Error in .shlib_internal(args) :
C++14 standard requested but CXX14 is not defined

  • removing ‘C:/Users/Shambhu Paudel/Documents/R/win-library/3.6/rstan’

The downloaded source packages are in
‘C:\Users\Shambhu Paudel\AppData\Local\Temp\RtmpkzEBQu\downloaded_packages’
Warning message:
In install.packages(“rstan”, type = “source”) :
installation of package ‘rstan’ had non-zero exit status

Try adding this to your Makevars:

CXX14 = $(BINPREF)g++ -m$(WIN) -std=c++1y
1 Like

Thanks it works now.

1 Like

@sp977 glad it’s working now and @andrjohns thanks for sorting this out!

1 Like