stan-dev / stan-dev/rstan

Error in compiling with unrecognized command line option '-m'

Open
#672 1 comment 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:

Please provide a short summary (no more than a sentence or two).
unrecognized command line option '-m' appears when compile "Rstan" package in R command line

Description:

Describe the issue as clearly as possible.
when i install R package "Rstan" from install.packages("rstan"), it downloaded successfully, while comes out a problem that " g++: error: unrecognized command line option '-m' "

Reproducible Steps:

Please report steps to reproduce the issue. If it's not possible to reproduce, please include a description of how you discovered the issue.

If you have a reproducible example, please include it.

Current Output:

If applicable, any relevant output from RStan.

  • installing to library '/home/rp/R/x86_64-redhat-linux-gnu-library/3.5'
  • installing source package 'rstan' ...
    ** package 'rstan' successfully unpacked and MD5 sums checked
    ** libs
    g++ -m -std=c++1y -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"." -I"/home/rp/R/x86_64-redhat-linux-gnu-library/3.5/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/home/rp/R/x86_64-redhat-linux-gnu-library/3.5/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/home/rp/R/x86_64-redhat-linux-gnu-library/3.5/BH/include" -I"/home/rp/R/x86_64-redhat-linux-gnu-library/3.5/StanHeaders/include" -I/usr/local/include -O3 -Wno-unused-variable -Wno-unused-function -c chains.cpp -o chains.o
    g++: error: unrecognized command line option '-m'
    make: *** [chains.o] Error 1
    ERROR: compilation failed for package 'rstan'
  • removing '/home/rp/R/x86_64-redhat-linux-gnu-library/3.5/rstan'
Expected Output:

If applicable, the output you expected from RStan.
installed successfully

RStan Version:

The version of RStan you are running (e.g., from packageVersion("rstan"))
2.19.2

R Version:

The version of R you are running (e.g., from R.version.string)
3.5.1

Operating System:

Your operating system (e.g., OS X 10.11.3)
Centos7

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

Start with the reported installation output for RStan 2.19.2 on CentOS 7, especially the compiler command containing g++ -m. Trace the R package build configuration that generates this command and compare it with the expected compiler flags. Done means the package builds and installs successfully without the unrecognized option.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, r
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.