Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install #2

Open
codeaadd opened this issue Jul 1, 2019 · 9 comments
Open

How to install #2

codeaadd opened this issue Jul 1, 2019 · 9 comments

Comments

@codeaadd
Copy link

codeaadd commented Jul 1, 2019

Hi,

I have trouble to install the package. When I do

install.packages("ssMousetrack", repos = "http://cran.r-project.org")

it gives compiling error, such as

adj_jac_apply.hpp:530:5: error: ‘FReturnType’ was not declared in this scope

Can you help to resolve this issue? Thank you!

@antcalcagni
Copy link
Owner

Hello,
Please, could you give me some information about the R platform being used (just type version on your R console). Just in case, have you installed C libraries and the compiler Rcpp?

@codeaadd
Copy link
Author

codeaadd commented Jul 8, 2019

platform x86_64-redhat-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 3
minor 6.0
year 2019
month 04
day 26
svn rev 76424
language R
version.string R version 3.6.0 (2019-04-26)
nickname Planting of a Tree

@codeaadd
Copy link
Author

codeaadd commented Jul 8, 2019

I have gcc 4.8.5 installed

@codeaadd
Copy link
Author

codeaadd commented Jul 8, 2019

Rcpp is also installed. Then what are the steps I should take to install ssMousetrack? Thank you for your help!

@antcalcagni
Copy link
Owner

antcalcagni commented Jul 8, 2019

That should be enough to install ssMousetrack. It's a bit strange. In the meantime, I have tried to install the package on other Linux and Osx based systems and everything was fine. Usually, when you install ssMousetrack it automatically installs all the needed the dependencies.

In addition, take a look here https://discourse.mc-stan.org/t/compilation-problem-on-travis-linux-works-fine-on-travis-osx/9190, they suggest installing a new version of g++ compiler. Let me know..

Please, try again and let me know what kind of errors you get so I can help you with the further steps.

@antcalcagni antcalcagni reopened this Jul 8, 2019
@codeaadd
Copy link
Author

codeaadd commented Jul 8, 2019

I just do

install.packages("ssMousetrack")

It gives errors below. Thank you!

/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/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 /nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/StanHeaders/include/stan/math/rev/mat/fun/ordered_constrain.hpp:6:0,
from /nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/StanHeaders/include/stan/math/rev/mat.hpp:41,
from /nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/StanHeaders/include/src/stan/model/log_prob_grad.hpp:4,
from /nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/StanHeaders/include/src/stan/model/test_gradients.hpp:7,
from /nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/StanHeaders/include/src/stan/services/diagnose/diagnose.hpp:10,
from /nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/rstan/include/rstan/stan_fit.hpp:34,
from /nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/rstan/include/rstan/rstaninc.hpp:3,
from stan_files/fit_model_log.hpp:18,
from stan_files/fit_model_log.cc:3:
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/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{}>{});
^
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:49:77: error: expected ‘)’ before ‘{’ token
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp: At global scope:
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/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()))...)>;
^
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/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::value> M_;
^
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/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::value> M_;
^
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/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::value> M_;
^
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp: In member function ‘std::vectorstan::math::var stan::math::adj_jac_vari<F, Targs>::build_return_varis_and_vars(const std::vector&)’:
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/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();
^
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:350:32: error: invalid types ‘int[int]’ for array subscript
std::vector var_y(M_[0]);
^
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/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>&)’:
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/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();
^
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/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();
^
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/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]);
^
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/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]);
^
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp: In member function ‘void stan::math::adj_jac_vari<F, Targs>::chain()’:
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:530:5: error: ‘FReturnType’ was not declared in this scope
FReturnType y_adj;
^
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp:530:17: error: expected ‘;’ before ‘y_adj’
FReturnType y_adj;
^
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/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);
^
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/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...); },
^
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/StanHeaders/include/stan/math/rev/mat/functor/adj_jac_apply.hpp: In lambda function:
/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/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...); },
^
make: *** [stan_files/fit_model_log.o] Error 1
rm stan_files/fit_model_log.cc
ERROR: compilation failed for package ‘ssMousetrack’

  • removing ‘/nfs/stak/users/home/R/x86_64-redhat-linux-gnu-library/3.6/ssMousetrack’

The downloaded source packages are in
‘/tmp/RtmpAEAelT/downloaded_packages’
Warning message:
In install.packages("ssMousetrack") :
installation of package ‘ssMousetrack’ had non-zero exit status

@antcalcagni
Copy link
Owner

antcalcagni commented Jul 9, 2019

Well, it seems to be that something is wrong with your C compilers. Since ssMousetrack uses rstan to estimate the models, then you may try running rstan before. In this way, we can exclude that the problem belongs to ssMousetrack. Please, try running the Example 1 from this simple guide https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started (you need to install rstan before).

Anyway, I think the problem is with your gcc/g++ libraries. Here there is something related to the issue: https://discourse.mc-stan.org/t/installing-rstan-on-rhel7/1752.

Let me know is rstan works properly on your machine. As suggested here stan-dev/rstan#589, you may try to remove rstan (if installed), update the gcc/g++ libraries, and install rstan again. The last link reports an issue with rstan and redhat.

@codeaadd
Copy link
Author

codeaadd commented Jul 9, 2019

Sorry to ask more questions. I restart the installation on a new Ubuntu system with latest c/c++ compiler. Follow the example to install rstan, I get errors:

ERROR: dependecies 'rsconnect', 'rstan' are not available for package 'shinystan'

Thank you!

@antcalcagni
Copy link
Owner

It's a bit strange to me that error. Did you follow the instructions described at https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started ? Anyway, you need to test the correct functioning of rstan before using ssMousetrack. Usually, I did not experience any errors with rstan but something can be changed with the new version of Ubuntu. I would try install once again rstan by following the above link. Let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants