paul-buerkner / brms

brms R package for Bayesian generalized multivariate non-linear multilevel models using Stan
https://paul-buerkner.github.io/brms/
GNU General Public License v2.0
1.28k stars 184 forks source link

Compilation error with brms version 1.5.1 #201

Closed atrolle closed 7 years ago

atrolle commented 7 years ago

Hello,

I downloaded "brms" from CRAN with all dependencies. I tried to run the following example, using "Kidney" dataset : library("brms") data("kidney")fit1 <- brm(formula = time | cens(censored) ~ age * sex + disease

But I get the following error message : Compiling the C++ model Error in compileCode(f, code, language = language, verbose = verbose) : Compilation ERROR, function(s)/method(s) not created! file1748511132dd.cpp:8:39: fatal error: stan/model/model_header.hpp: No such file or directory

include <stan/model/model_header.hpp>

I use R 64 Bits version 3.3.2, RStudio version 1.0.136 and RTools version 3.4. RTools seems to work correctly :

system('g++ -v') Using built-in specs. COLLECT_GCC=c:\Rtools\mingw_32\bin\G__~1.EXE COLLECT_LTO_WRAPPER=c:/Rtools/mingw_32/bin/../libexec/gcc/i686-w64-mingw32/4.9.3/lto-wrapper.exe Target: i686-w64-mingw32 Configured with: ../../../src/gcc-4.9.3/configure --host=i686-w64-mingw32 --build=i686-w64-mingw32 --target=i686-w64-mingw32 --prefix=/mingw32 --with-sysroot=/home/Jeroen/mingw-gcc-4.9.3/i686-493-posix-dwarf-rt_v3-s/mingw32 --with-gxx-include-dir=/mingw32/i686-w64-mingw32/include/c++ --enable-static --disable-shared --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-sjlj-exceptions --with-dwarf2 --disable-isl-version-check --disable-cloog-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=i686 --with-tune=generic --with-libiconv --with-system-zlib --with-gmp=/home/Jeroen/mingw-gcc-4.9.3/prerequisites/i6... Thread model: posix gcc version 4.9.3 (i686-posix-dwarf, Built by MinGW-W64 project)

My system PATH is as follows :

Sys.getenv("PATH") [1] "C:\R\R-3.3.2\bin\x64;c:\Rtools\bin;c:\Rtools\mingw_32\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\"

I do no see what's going wrong. Can anyone help me ?

Best regards, Arnaud.

paul-buerkner commented 7 years ago

Hmm, not sure what's going wrong. I would try to uninstall the rstan package, restart R and install rstan again (all in a fresh R session). If that doesn't help, I suggest you ask on the stan-users mailing list (https://groups.google.com/forum/#!forum/stan-users).

atrolle commented 7 years ago

Thank you for the advice.

Best regards, Arnaud.