Rstan does not compile on Ubuntu 16.04; truncated g++ command
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 1.1k
- Forks
- 266
- Avg merge
- 2h 56m
- Merged PRs (30d)
- 1
Description
Summary:
install.packages("rstan") does not compile.
Description:
Call to g++ appears to be truncated during compilation, resulting in a "-o ....{targets}..." call without the necessary "g++ ..." prefix.
Reproducible Steps:
I am running R 3.6.1 on a Ubuntu 16.04 system. My ~/.R/Makevars looks like this:
CXX14FLAGS=-O3 -march=native -mtune=native
CXX14 = g++ -std=c++1y -Wno-unused-variable -Wno-unused-function -fPIC
I start R and execute "install.packages('rstan')" . I don't have steps to reproduce the entire state of my system.
Current Output:
template class auto_ptr;
^
-o rstan.so chains.o pointer-tools.o init.o stanc.o misc.o sparse_extractors.o stan/lang/ast_def.o stan/lang/grammars/program_grammar_inst.o stan/lang/grammars/expression_grammar_inst.o stan/lang/grammars/statement_grammar_inst.o stan/lang/grammars/expression07_grammar_inst.o stan/lang/grammars/statement_2_grammar_inst.o stan/lang/grammars/block_var_decls_grammar_inst.o stan/lang/grammars/term_grammar_inst.o stan/lang/grammars/indexes_grammar_inst.o stan/lang/grammars/semantic_actions_def.o stan/lang/grammars/whitespace_grammar_inst.o stan/lang/grammars/bare_type_grammar_inst.o stan/lang/grammars/local_var_decls_grammar_inst.o stan/lang/grammars/functions_grammar_inst.o -L/usr/lib/R/lib -lR
/bin/bash: line 2: -o: command not found
/usr/share/R/share/make/shlib.mk:6: recipe for target 'rstan.so' failed
Previous steps in the compilation process look fine and work, e.g.:
g++ -std=c++1y -Wno-unused-variable -Wno-unused-function -fPIC -std=c++1y -I/usr/share/R/include -DNDEBUG -I"../inst/include" [truncated]
Expected Output:
I'd expect the call to begin with "g++" along with the supplied arguments.
RStan Version:
Attempting to install 2.19.2.
R Version:
3.6.1
Operating System:
Ubuntu 16.04
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported ~/.R/Makevars settings and the R package installation entry point, install.packages("rstan"). Compare the truncated command with the make rule in /usr/share/R/share/make/shlib.mk:6 and determine why the compiler prefix is missing. Done means the Ubuntu 16.04 installation invokes g++ with the supplied arguments instead of treating -o as a command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, r, ubuntu
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100