stan-dev / stan-dev/rstan

Compilation Error and #637 is not helpful

Open
#669 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
1.1k
Forks
266
Avg merge
2h 56m
Merged PRs (30d)
1

Description

Summary:

After following #637, still received errors when attempting to run 8schools.stan.

Description:

Windows 7, R 3.5.3 rstan 2.18.2. Followed guidance and #637, but still got error for the simplest 8schools example.

Reproducible Steps:

sessionInfo()
R version 3.5.3 (2019-03-11)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base

loaded via a namespace (and not attached):
[1] compiler_3.5.3 tools_3.5.3 yaml_2.2.0

My Makevars.win looks as follows:
CXX14=$(BINPREF)g++ -O2 -march=native -mtune=native
CXX14FLAGS=-O3 -march=native -mtune=native
CXX11FLAGS=-O3 -march=native -mtune=native

Sys.which("g++")
"C:\Rtools\mingw_32\bin\G__~1.EXE"

Current Output:

fit <- stan(file = 'schools.stan', data = schools_dat)
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! file1c8060ad4ca8.cpp:8:39: fatal error: stan/model/model_header.hpp: No such file or directory
#include <stan/model/model_header.hpp>
^
compilation terminated.
make: *** [C:/PROGRA1/R/R-351.3/etc/x64/Makeconf:215: file1c8060ad4ca8.o] Error 1
In addition: Warning message:
In system(cmd, intern = !verbose) :
running command 'C:/PROGRA1/R/R-351.3/bin/x64/R CMD SHLIB file1c8060ad4ca8.cpp 2> file1c8060ad4ca8.cpp.err.txt' had status 1
Error in sink(type = "output") : invalid connection

Expected Output:

Run 8schools example.

RStan Version:

2.18.2

R Version:

3.5.3

Operating System:

Windows 7 x64

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the 8schools example using schools.stan and the reported fit <- stan(...) entry point, then inspect Makevars.win and the compiler output for why stan/model/model_header.hpp is not found. Done means the 8schools example compiles and runs on the reported Windows and RStan versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.