IndrajeetPatil / ggstatsplot

Enhancing {ggplot2} plots with statistical analysis 📊📣
https://indrajeetpatil.github.io/ggstatsplot/
GNU General Public License v3.0
2.03k stars 186 forks source link

ERROR: compilation failed for package 'metaBMA' #264

Closed weinformatics closed 5 years ago

weinformatics commented 5 years ago

/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/fun/simplex_constrain.hpp:67:62: warning: 'multiply_adjoint_jacobian' function uses 'auto' type specifier without trailing return type [enabled by default] const Eigen::VectorXd& adj) const { ^ make: *** [stan_files/random_ordered.o] Error 1 rm stan_files/random_ordered.cc ERROR: compilation failed for package 'metaBMA'

IndrajeetPatil commented 5 years ago

@danheck Do you know what might be the source of this compilation error and how to get rid of it?

danheck commented 5 years ago

No, I have not seen this type of error before. To solve this, it seems necessary to check whether rstan can be installed and used properly. Instructions for Windows, Mac, and Linux can be found here: https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started

weinformatics commented 5 years ago

No, I have not seen this type of error before. To solve this, it seems necessary to check whether rstan can be installed and used properly. Instructions for Windows, Mac, and Linux can be found here: https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started

@danheck Thanks for your reply. Indeed I meet an issue in rstan installation, and it was resolved by https://github.com/stan-dev/rstan/issues/589#issuecomment-478204412. I don't know whether it will cause the fails of 'metaBMA' installation.

weinformatics commented 5 years ago

No, I have not seen this type of error before. To solve this, it seems necessary to check whether rstan can be installed and used properly. Instructions for Windows, Mac, and Linux can be found here: https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started

@IndrajeetPatil @danheck I retry again.

[root@e4a9c7b97661 ~]# cat .R/Makevars 
CXX14FLAGS=-O3 -march=native -mtune=native -fPIC -std=c++11
CXX14=g++
[root@e4a9c7b97661 ~]# 

It seem to me the rstan was okay. But metaBMA still failed. I am on Centos:7

> install.packages("rstan", repos = "https://cloud.r-project.org/", dependencies = TRUE)
Installing package into '/usr/lib64/R/library'
(as 'lib' is unspecified)
also installing the dependency 'shinystan'

trying URL 'https://cloud.r-project.org/src/contrib/shinystan_2.5.0.tar.gz'
Content type 'application/x-gzip' length 2400413 bytes (2.3 MB)
==================================================
downloaded 2.3 MB

trying URL 'https://cloud.r-project.org/src/contrib/rstan_2.19.2.tar.gz'
Content type 'application/x-gzip' length 909934 bytes (888 KB)
==================================================
downloaded 888 KB

* installing *source* package 'rstan' ...
** package 'rstan' successfully unpacked and MD5 sums checked
** using staged installation
** libs

g++  -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"." -I"/usr/lib64/R/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include    -O3 -march=native -mtune=native -fPIC -std=c++11 -c chains.cpp -o chains.o
In file included from /usr/lib64/R/library/BH/include/boost/random/detail/integer_log2.hpp:19:0,
                 from /usr/lib64/R/library/BH/include/boost/random/detail/large_arithmetic.hpp:19,
                 from /usr/lib64/R/library/BH/include/boost/random/detail/const_mod.hpp:23,
                 from /usr/lib64/R/library/BH/include/boost/random/linear_congruential.hpp:30,
                 from /usr/lib64/R/library/BH/include/boost/random/additive_combine.hpp:27,
                 from chains.cpp:29:
/usr/lib64/R/library/BH/include/boost/pending/integer_log2.hpp:7:89: note: #pragma message: This header is deprecated. Use <boost/integer/integer_log2.hpp> instead.
 BOOST_HEADER_DEPRECATED("<boost/integer/integer_log2.hpp>");
                                                                                         ^

g++  -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"." -I"/usr/lib64/R/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include    -O3 -march=native -mtune=native -fPIC -std=c++11 -c pointer-tools.cpp -o pointer-tools.o
In file included from /usr/lib64/R/library/BH/include/boost/random/detail/integer_log2.hpp:19:0,
                 from /usr/lib64/R/library/BH/include/boost/random/detail/large_arithmetic.hpp:19,
                 from /usr/lib64/R/library/BH/include/boost/random/detail/const_mod.hpp:23,
                 from /usr/lib64/R/library/BH/include/boost/random/linear_congruential.hpp:30,
                 from /usr/lib64/R/library/BH/include/boost/random/additive_combine.hpp:27,
                 from pointer-tools.cpp:2:
/usr/lib64/R/library/BH/include/boost/pending/integer_log2.hpp:7:89: note: #pragma message: This header is deprecated. Use <boost/integer/integer_log2.hpp> instead.
 BOOST_HEADER_DEPRECATED("<boost/integer/integer_log2.hpp>");
                                                                                         ^

g++  -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"." -I"/usr/lib64/R/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include    -O3 -march=native -mtune=native -fPIC -std=c++11 -c init.cpp -o init.o

g++  -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"." -I"/usr/lib64/R/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include    -O3 -march=native -mtune=native -fPIC -std=c++11 -c stanc.cpp -o stanc.o

g++  -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"." -I"/usr/lib64/R/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include    -O3 -march=native -mtune=native -fPIC -std=c++11 -c misc.cpp -o misc.o

g++  -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"." -I"/usr/lib64/R/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include    -O3 -march=native -mtune=native -fPIC -std=c++11 -c sparse_extractors.cpp -o sparse_extractors.o

g++  -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"." -I"/usr/lib64/R/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include    -O3 -march=native -mtune=native -fPIC -std=c++11 -c stan/lang/ast_def.cpp -o stan/lang/ast_def.o

g++  -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"." -I"/usr/lib64/R/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include    -O3 -march=native -mtune=native -fPIC -std=c++11 -c stan/lang/grammars/program_grammar_inst.cpp -o stan/lang/grammars/program_grammar_inst.o

g++  -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"." -I"/usr/lib64/R/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include    -O3 -march=native -mtune=native -fPIC -std=c++11 -c stan/lang/grammars/expression_grammar_inst.cpp -o stan/lang/grammars/expression_grammar_inst.o

g++  -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"." -I"/usr/lib64/R/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include    -O3 -march=native -mtune=native -fPIC -std=c++11 -c stan/lang/grammars/statement_grammar_inst.cpp -o stan/lang/grammars/statement_grammar_inst.o

g++  -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"." -I"/usr/lib64/R/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include    -O3 -march=native -mtune=native -fPIC -std=c++11 -c stan/lang/grammars/expression07_grammar_inst.cpp -o stan/lang/grammars/expression07_grammar_inst.o

g++  -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"." -I"/usr/lib64/R/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include    -O3 -march=native -mtune=native -fPIC -std=c++11 -c stan/lang/grammars/statement_2_grammar_inst.cpp -o stan/lang/grammars/statement_2_grammar_inst.o

g++  -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"." -I"/usr/lib64/R/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include    -O3 -march=native -mtune=native -fPIC -std=c++11 -c stan/lang/grammars/block_var_decls_grammar_inst.cpp -o stan/lang/grammars/block_var_decls_grammar_inst.o

g++  -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"." -I"/usr/lib64/R/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include    -O3 -march=native -mtune=native -fPIC -std=c++11 -c stan/lang/grammars/term_grammar_inst.cpp -o stan/lang/grammars/term_grammar_inst.o

g++  -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"." -I"/usr/lib64/R/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include    -O3 -march=native -mtune=native -fPIC -std=c++11 -c stan/lang/grammars/indexes_grammar_inst.cpp -o stan/lang/grammars/indexes_grammar_inst.o

g++  -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"." -I"/usr/lib64/R/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include    -O3 -march=native -mtune=native -fPIC -std=c++11 -c stan/lang/grammars/semantic_actions_def.cpp -o stan/lang/grammars/semantic_actions_def.o

g++  -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"." -I"/usr/lib64/R/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include    -O3 -march=native -mtune=native -fPIC -std=c++11 -c stan/lang/grammars/whitespace_grammar_inst.cpp -o stan/lang/grammars/whitespace_grammar_inst.o

g++  -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"." -I"/usr/lib64/R/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include    -O3 -march=native -mtune=native -fPIC -std=c++11 -c stan/lang/grammars/bare_type_grammar_inst.cpp -o stan/lang/grammars/bare_type_grammar_inst.o

g++  -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"." -I"/usr/lib64/R/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include    -O3 -march=native -mtune=native -fPIC -std=c++11 -c stan/lang/grammars/local_var_decls_grammar_inst.cpp -o stan/lang/grammars/local_var_decls_grammar_inst.o

g++  -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"." -I"/usr/lib64/R/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include    -O3 -march=native -mtune=native -fPIC -std=c++11 -c stan/lang/grammars/functions_grammar_inst.cpp -o stan/lang/grammars/functions_grammar_inst.o
g++ -shared -L/usr/lib64/R/lib -Wl,-z,relro -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/lib64/R/lib -lR
installing to /usr/lib64/R/library/00LOCK-rstan/00new/rstan/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
Warning in file.copy(file.path(R.home("doc"), "html", "R.css"), outman) :
  problem copying /usr/share/doc/R-3.6.0/html/R.css to /usr/lib64/R/library/00LOCK-rstan/00new/rstan/html/R.css: No such file or directory
  converting help for package 'rstan'
    finding HTML links ... done
    As.mcmc.list                            html  
    Rhat                                    html  
    check_hmc_diagnostics                   html  
    expose_stan_functions                   html  
    extract_sparse_parts                    html  
    lookup                                  html  
    makeconf_path                           html  
    monitor                                 html  
    plotting-functions                      html  
Rd warning: /tmp/RtmpcE4XI3/R.INSTALL2c527ddf331f/rstan/man/plotting-functions.Rd:19: file link 'stan_ac' in package 'rstan' does not exist and so has been treated as a topic
    print.stanfit                           html  
    read_rdump                              html  
    rstan-internal                          html  
    rstan                                   html  
    rstan.package.skeleton                  html  
    rstan_options                           html  
    sbc                                     html  
    set_cppo                                html  
    sflist2stanfit                          html  
    stan                                    html  
    stan_csv                                html  
    stan_demo                               html  
    stan_model                              html  
    stan_plot                               html  
    stan_plot_diagnostics                   html  
Rd warning: /tmp/RtmpcE4XI3/R.INSTALL2c527ddf331f/rstan/man/stan_plot_diagnostics.Rd:36: file link 'stat_bin' in package 'ggplot2' does not exist and so has been treated as a topic
    stan_plot_options                       html  
    stan_rdump                              html  
    stan_version                            html  
    stanc                                   html  
    stanfit-class                           html  
    stanfit-method-extract                  html  
    stanfit-method-logprob                  html  
    stanfit-method-loo                      html  
Rd warning: /tmp/RtmpcE4XI3/R.INSTALL2c527ddf331f/rstan/man/stanfit-method-loo.Rd:11: file link 'loo.array' in package 'loo' does not exist and so has been treated as a topic
Rd warning: /tmp/RtmpcE4XI3/R.INSTALL2c527ddf331f/rstan/man/stanfit-method-loo.Rd:60: file link 'loo.array' in package 'loo' does not exist and so has been treated as a topic
    stanfit-method-pairs                    html  
    stanfit-method-plot                     html  
    stanfit-method-summary                  html  
    stanfit-method-traceplot                html  
    stanfit2array-method                    html  
    stanmodel-class                         html  
    stanmodel-method-gqs                    html  
    stanmodel-method-optimizing             html  
    stanmodel-method-sampling               html  
    stanmodel-method-vb                     html  
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (rstan)
Warning in file.create(f.tg) :
  cannot create file '/usr/share/doc/R-3.6.0/html/packages.html', reason 'No such file or directory'
Warning in utils::make.packages.html(.Library, docdir = R.home("doc")) :
  cannot update HTML package index
* installing *source* package 'shinystan' ...
** package 'shinystan' successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
Warning in file.copy(file.path(R.home("doc"), "html", "R.css"), outman) :
  problem copying /usr/share/doc/R-3.6.0/html/R.css to /usr/lib64/R/library/00LOCK-shinystan/00new/shinystan/html/R.css: No such file or directory
  converting help for package 'shinystan'
    finding HTML links ... done
    as.shinystan                            html  
Rd warning: /tmp/RtmplqwmsG/R.INSTALL2f0c68cab8e6/shinystan/man/as.shinystan.Rd:57: file link 'model_code' in package 'shinystan' does not exist and so has been treated as a topic
Rd warning: /tmp/RtmplqwmsG/R.INSTALL2f0c68cab8e6/shinystan/man/as.shinystan.Rd:58: file link 'model_code' in package 'shinystan' does not exist and so has been treated as a topic
Rd warning: /tmp/RtmplqwmsG/R.INSTALL2f0c68cab8e6/shinystan/man/as.shinystan.Rd:74: file link 'get_sampler_params' in package 'rstan' does not exist and so has been treated as a topic
    deploy_shinystan                        html  
Rd warning: /tmp/RtmplqwmsG/R.INSTALL2f0c68cab8e6/shinystan/man/deploy_shinystan.Rd:67: file link 'rsconnect' in package 'rsconnect' does not exist and so has been treated as a topic
    drop_parameters                         html  
    generate_quantity                       html  
    launch_shinystan                        html  
    launch_shinystan_demo                   html  
    rename_model                            html  
    retrieve                                html  
    shinystan-class                         html  
    shinystan-metadata                      html  
    shinystan-package                       html  
    update_sso                              html  
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (shinystan)
Warning in file.create(f.tg) :
  cannot create file '/usr/share/doc/R-3.6.0/html/packages.html', reason 'No such file or directory'
Warning in utils::make.packages.html(.Library, docdir = R.home("doc")) :
  cannot update HTML package index

The downloaded source packages are in
    '/tmp/RtmpOPOkzz/downloaded_packages'
Updating HTML index of packages in '.Library'
Warning messages:
1: In file.create(f.tg) :
  cannot create file '/usr/share/doc/R-3.6.0/html/packages.html', reason 'No such file or directory'
2: In make.packages.html(.Library) : cannot update HTML package index
> devtools::install_github("danheck/metaBMA", ref = "dev")
Downloading GitHub repo danheck/metaBMA@dev
v  checking for file '/tmp/RtmpOPOkzz/remotes2c466491e93d/danheck-metaBMA-f5295bb/DESCRIPTION' ...
-  preparing 'metaBMA':
v  checking DESCRIPTION meta-information ...
-  cleaning src
-  checking for LF line-endings in source and make files and shell scripts
-  checking for empty or unneeded directories
-  looking to see if a 'data/datalist' file should be added
-  building 'metaBMA_0.6.0.tar.gz'

Installing package into '/usr/lib64/R/library'
(as 'lib' is unspecified)
* installing *source* package 'metaBMA' ...
** using staged installation
** libs
"/usr/lib64/R/bin/Rscript" -e "source(file.path('..', 'tools', 'make_cc.R')); make_cc(commandArgs(TRUE))" stan_files/random_ordered.stan
Wrote C++ file "stan_files/random_ordered.cc"

g++  -I"/usr/include/R" -DNDEBUG -I"../inst/include" -I"/usr/lib64/R/library/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -DBOOST_MATH_OVERFLOW_ERROR_POLICY=errno_on_error -I"/usr/lib64/R/library/BH/include" -I"/usr/lib64/R/library/Rcpp/include" -I"/usr/lib64/R/library/RcppEigen/include" -I"/usr/lib64/R/library/rstan/include" -I"/usr/lib64/R/library/StanHeaders/include" -I/usr/local/include    -O3 -march=native -mtune=native -fPIC -std=c++11 -c stan_files/random_ordered.cc -o stan_files/random_ordered.o
In file included from /usr/lib64/R/library/BH/include/boost/random/detail/integer_log2.hpp:19:0,
                 from /usr/lib64/R/library/BH/include/boost/random/detail/large_arithmetic.hpp:19,
                 from /usr/lib64/R/library/BH/include/boost/random/detail/const_mod.hpp:23,
                 from /usr/lib64/R/library/BH/include/boost/random/linear_congruential.hpp:30,
                 from /usr/lib64/R/library/BH/include/boost/random/additive_combine.hpp:27,
                 from /usr/lib64/R/library/rstan/include/rstan/stan_fit.hpp:15,
                 from /usr/lib64/R/library/rstan/include/rstan/rstaninc.hpp:3,
                 from stan_files/random_ordered.hpp:18,
                 from stan_files/random_ordered.cc:3:
/usr/lib64/R/library/BH/include/boost/pending/integer_log2.hpp:7:89: note: #pragma message: This header is deprecated. Use <boost/integer/integer_log2.hpp> instead.
 BOOST_HEADER_DEPRECATED("<boost/integer/integer_log2.hpp>");
                                                                                         ^
In file included from /usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/fun/ordered_constrain.hpp:6:0,
                 from /usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat.hpp:41,
                 from /usr/lib64/R/library/StanHeaders/include/src/stan/model/log_prob_grad.hpp:4,
                 from /usr/lib64/R/library/StanHeaders/include/src/stan/model/test_gradients.hpp:7,
                 from /usr/lib64/R/library/StanHeaders/include/src/stan/services/diagnose/diagnose.hpp:10,
                 from /usr/lib64/R/library/rstan/include/rstan/stan_fit.hpp:35,
                 from /usr/lib64/R/library/rstan/include/rstan/rstaninc.hpp:3,
                 from stan_files/random_ordered.hpp:18,
                 from stan_files/random_ordered.cc:3:
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:31:32: error: 'std::index_sequence' has not been declared
                           std::index_sequence<I...> i) {
                                ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:31:46: error: expected ',' or '...' before '<' token
                           std::index_sequence<I...> i) {
                                              ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:31:54: warning: 'apply_impl' function uses 'auto' type specifier without trailing return type [enabled by default]
                           std::index_sequence<I...> i) {
                                                      ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:48:48: warning: 'apply' function uses 'auto' type specifier without trailing return type [enabled by default]
 constexpr auto apply(const F& f, const Tuple& t) {
                                                ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp: In function 'constexpr auto stan::math::internal::apply(const F&, const Tuple&)':
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:49:27: error: 'make_index_sequence' is not a member of 'std'
   return apply_impl(f, t, std::make_index_sequence<std::tuple_size<Tuple>{}>{});
                           ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:49:27: note: suggested alternative:
In file included from /usr/lib64/R/library/BH/include/boost/fusion/container/vector/vector.hpp:28:0,
                 from /usr/lib64/R/library/BH/include/boost/fusion/container/vector/vector10.hpp:25,
                 from /usr/lib64/R/library/BH/include/boost/fusion/view/transform_view/transform_view.hpp:22,
                 from /usr/lib64/R/library/BH/include/boost/fusion/algorithm/transformation/transform.hpp:11,
                 from /usr/lib64/R/library/BH/include/boost/fusion/view/zip_view/detail/begin_impl.hpp:14,
                 from /usr/lib64/R/library/BH/include/boost/fusion/view/zip_view/zip_view.hpp:16,
                 from /usr/lib64/R/library/BH/include/boost/fusion/view/zip_view.hpp:12,
                 from /usr/lib64/R/library/BH/include/boost/fusion/include/zip_view.hpp:11,
                 from /usr/lib64/R/library/BH/include/boost/numeric/odeint/util/resize.hpp:26,
                 from /usr/lib64/R/library/BH/include/boost/numeric/odeint/util/state_wrapper.hpp:26,
                 from /usr/lib64/R/library/BH/include/boost/numeric/odeint/util/ublas_wrapper.hpp:33,
                 from /usr/lib64/R/library/BH/include/boost/numeric/odeint.hpp:25,
                 from /usr/lib64/R/library/StanHeaders/include/stan/math/prim/arr/functor/integrate_ode_rk45.hpp:17,
                 from /usr/lib64/R/library/StanHeaders/include/stan/math/prim/arr.hpp:46,
                 from /usr/lib64/R/library/StanHeaders/include/stan/math/prim/mat.hpp:344,
                 from /usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat.hpp:12,
                 from /usr/lib64/R/library/StanHeaders/include/src/stan/model/log_prob_grad.hpp:4,
                 from /usr/lib64/R/library/StanHeaders/include/src/stan/model/test_gradients.hpp:7,
                 from /usr/lib64/R/library/StanHeaders/include/src/stan/services/diagnose/diagnose.hpp:10,
                 from /usr/lib64/R/library/rstan/include/rstan/stan_fit.hpp:35,
                 from /usr/lib64/R/library/rstan/include/rstan/rstaninc.hpp:3,
                 from stan_files/random_ordered.hpp:18,
                 from stan_files/random_ordered.cc:3:
/usr/lib64/R/library/BH/include/boost/fusion/support/detail/index_sequence.hpp:59:12: note:   'boost::fusion::detail::make_index_sequence'
     struct make_index_sequence
            ^
In file included from /usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/fun/ordered_constrain.hpp:6:0,
                 from /usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat.hpp:41,
                 from /usr/lib64/R/library/StanHeaders/include/src/stan/model/log_prob_grad.hpp:4,
                 from /usr/lib64/R/library/StanHeaders/include/src/stan/model/test_gradients.hpp:7,
                 from /usr/lib64/R/library/StanHeaders/include/src/stan/services/diagnose/diagnose.hpp:10,
                 from /usr/lib64/R/library/rstan/include/rstan/stan_fit.hpp:35,
                 from /usr/lib64/R/library/rstan/include/rstan/rstaninc.hpp:3,
                 from stan_files/random_ordered.hpp:18,
                 from stan_files/random_ordered.cc:3:
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:49:77: error: expected primary-expression before '{' token
   return apply_impl(f, t, std::make_index_sequence<std::tuple_size<Tuple>{}>{});
                                                                             ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:49:77: error: expected ')' before '{' token
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp: At global scope:
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:151:9: error: expected type-specifier
       = std::result_of_t<F(decltype(is_var_), decltype(value_of(Targs()))...)>;
         ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:156:42: error: 'FReturnType' was not declared in this scope
   std::array<int, internal::compute_dims<FReturnType>::value> M_;
                                          ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:156:53: error: template argument 1 is invalid
   std::array<int, internal::compute_dims<FReturnType>::value> M_;
                                                     ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:156:61: error: template argument 2 is invalid
   std::array<int, internal::compute_dims<FReturnType>::value> M_;
                                                             ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:408:39: warning: 'operator()' function uses 'auto' type specifier without trailing return type [enabled by default]
   auto operator()(const Targs&... args) {
                                       ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp: In member function 'std::vector<stan::math::var> stan::math::adj_jac_vari<F, Targs>::build_return_varis_and_vars(const std::vector<double>&)':
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:349:9: error: invalid types 'int[int]' for array subscript
     M_[0] = val_y.size();
         ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:350:32: error: invalid types 'int[int]' for array subscript
     std::vector<var> var_y(M_[0]);
                                ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp: In member function 'Eigen::Matrix<stan::math::var, R, C> stan::math::adj_jac_vari<F, Targs>::build_return_varis_and_vars(const Eigen::Matrix<double, R, C>&)':
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:375:9: error: invalid types 'int[int]' for array subscript
     M_[0] = val_y.rows();
         ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:376:9: error: invalid types 'int[int]' for array subscript
     M_[1] = val_y.cols();
         ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:377:40: error: invalid types 'int[int]' for array subscript
     Eigen::Matrix<var, R, C> var_y(M_[0], M_[1]);
                                        ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:377:47: error: invalid types 'int[int]' for array subscript
     Eigen::Matrix<var, R, C> var_y(M_[0], M_[1]);
                                               ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp: In member function 'void stan::math::adj_jac_vari<F, Targs>::chain()':
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:530:5: error: 'FReturnType' was not declared in this scope
     FReturnType y_adj;
     ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:530:17: error: expected ';' before 'y_adj'
     FReturnType y_adj;
                 ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:532:38: error: 'y_adj' was not declared in this scope
     internal::build_y_adj(y_vi_, M_, y_adj);
                                      ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:536:26: error: expansion pattern 'auto&&' contains no argument packs
         [this](auto&&... args) { this->accumulate_adjoints(args...); },
                          ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp: In lambda function:
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:536:60: error: 'args' was not declared in this scope
         [this](auto&&... args) { this->accumulate_adjoints(args...); },
                                                            ^
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp: At global scope:
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:616:40: warning: 'adj_jac_apply' function uses 'auto' type specifier without trailing return type [enabled by default]
 auto adj_jac_apply(const Targs&... args) {
                                        ^
In file included from /usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat.hpp:41:0,
                 from /usr/lib64/R/library/StanHeaders/include/src/stan/model/log_prob_grad.hpp:4,
                 from /usr/lib64/R/library/StanHeaders/include/src/stan/model/test_gradients.hpp:7,
                 from /usr/lib64/R/library/StanHeaders/include/src/stan/services/diagnose/diagnose.hpp:10,
                 from /usr/lib64/R/library/rstan/include/rstan/stan_fit.hpp:35,
                 from /usr/lib64/R/library/rstan/include/rstan/rstaninc.hpp:3,
                 from stan_files/random_ordered.hpp:18,
                 from stan_files/random_ordered.cc:3:
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/fun/ordered_constrain.hpp:61:62: warning: 'multiply_adjoint_jacobian' function uses 'auto' type specifier without trailing return type [enabled by default]
                                  const Eigen::VectorXd& adj) const {
                                                              ^
In file included from /usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat.hpp:42:0,
                 from /usr/lib64/R/library/StanHeaders/include/src/stan/model/log_prob_grad.hpp:4,
                 from /usr/lib64/R/library/StanHeaders/include/src/stan/model/test_gradients.hpp:7,
                 from /usr/lib64/R/library/StanHeaders/include/src/stan/services/diagnose/diagnose.hpp:10,
                 from /usr/lib64/R/library/rstan/include/rstan/stan_fit.hpp:35,
                 from /usr/lib64/R/library/rstan/include/rstan/rstaninc.hpp:3,
                 from stan_files/random_ordered.hpp:18,
                 from stan_files/random_ordered.cc:3:
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/fun/positive_ordered_constrain.hpp:62:62: warning: 'multiply_adjoint_jacobian' function uses 'auto' type specifier without trailing return type [enabled by default]
                                  const Eigen::VectorXd& adj) const {
                                                              ^
In file included from /usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat.hpp:48:0,
                 from /usr/lib64/R/library/StanHeaders/include/src/stan/model/log_prob_grad.hpp:4,
                 from /usr/lib64/R/library/StanHeaders/include/src/stan/model/test_gradients.hpp:7,
                 from /usr/lib64/R/library/StanHeaders/include/src/stan/services/diagnose/diagnose.hpp:10,
                 from /usr/lib64/R/library/rstan/include/rstan/stan_fit.hpp:35,
                 from /usr/lib64/R/library/rstan/include/rstan/rstaninc.hpp:3,
                 from stan_files/random_ordered.hpp:18,
                 from stan_files/random_ordered.cc:3:
/usr/lib64/R/library/StanHeaders/include/stan/math/rev/mat/fun/simplex_constrain.hpp:67:62: warning: 'multiply_adjoint_jacobian' function uses 'auto' type specifier without trailing return type [enabled by default]
                                  const Eigen::VectorXd& adj) const {
                                                              ^
make: *** [stan_files/random_ordered.o] Error 1
rm stan_files/random_ordered.cc
ERROR: compilation failed for package 'metaBMA'
* removing '/usr/lib64/R/library/metaBMA'
Error: Failed to install 'metaBMA' from GitHub:
  (converted from warning) installation of package '/tmp/RtmpOPOkzz/file2c4617a8ea01/metaBMA_0.6.0.tar.gz' had non-zero exit status
danheck commented 5 years ago

Sorry for the late reply and these issues with compilation. I do not have any ideas about the reason for this error other than the C compiler. Is it possible to install and use other R packages that rely on pre-compiled Stan models such as rstanarm?

This would be informative to see whether the error is specific for the metaBMA package. The package uses the standard templates for such packages as provided by the Stan development team. On CRAN, these do not cause any issues.

IndrajeetPatil commented 5 years ago

@danheck Thanks, Daniel.

@weinformatics Closing this for now. Reopen if the issue persists.