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

Cannot load the package after building locally from clone #190

Closed
helske opened this issue May 24, 2017 · 6 comments
Closed

Cannot load the package after building locally from clone #190

helske opened this issue May 24, 2017 · 6 comments

Comments

@helske
Copy link

helske commented May 24, 2017

Summary:

I cannot build and load the rstanarm package locally.

Description:

When I clone the rstanarm repo from github and try to build it locally in Rstudio, I get following output:

==> R CMD INSTALL --no-multiarch --with-keep.source --precleanOOPS rstanarm

Warning: unknown option ‘--precleanOOPS’
* installing to library ‘/home/jouni/R/x86_64-pc-linux-gnu-library/3.4’
* installing *source* package ‘rstanarm’ ...
** libs
make: Nothing to be done for 'all'.
installing to /home/jouni/R/x86_64-pc-linux-gnu-library/3.4/rstanarm/libs
** R
** data
*** moving datasets to lazyload DB
** demo
** exec
** inst
** preparing package for lazy loading
starting worker pid=20021 on localhost:11800 at 20:12:11.816
starting worker pid=20033 on localhost:11800 at 20:12:12.628
starting worker pid=20044 on localhost:11800 at 20:12:13.412
starting worker pid=20058 on localhost:11800 at 20:12:14.220
starting worker pid=20069 on localhost:11800 at 20:12:14.938
starting worker pid=20080 on localhost:11800 at 20:12:15.597
No man pages found in package  ‘rstanarm’ 
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error: package or namespace load failed for ‘rstanarm’ in .doLoadActions(where, attach):
 error in load action .__A__.1 for package rstanarm: is(module, "character"): object 'm' not found
Error: loading failed
Execution halted
ERROR: loading failed

Note that I get same error also if I build a new template package using rstantools's rstan_package_skeleton and try to load that.

I have tried this both with CRAN version of Rcpp and the github version.

Note also that installing rstanarm from CRAN using install.packages works fine.

Reproducible Steps:

Just cloned the repo from Github, made a new project in Rstudio and hit "clean and rebuild".

RStanARM Version:

commit a34c75e, but likely not commit dependent.

R Version:

R version 3.4.0 (2017-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)

Operating System:

Ubuntu 17.04

@bgoodri
Copy link
Contributor

bgoodri commented May 24, 2017 via email

@helske
Copy link
Author

helske commented May 24, 2017

Thanks, that seems to work. Seem a bit strange, why is this needed?

For vanilla package built using rstan_package_skeleton this does not help though (I get the same error as above).

@helske
Copy link
Author

helske commented May 25, 2017

I guess this can be closed. I finally managed to get rstan_package_skeleton package working as well, I needed to change init.cpp to init.c.

@helske helske closed this as completed May 25, 2017
@bgoodri
Copy link
Contributor

bgoodri commented May 25, 2017 via email

@helske
Copy link
Author

helske commented May 28, 2017

The error message was the same as above, but actually I don't think that renaming made any difference. I was just messing around trying to get things working and did two things at same time and mistakenly though the renaming was the solution. Basically RTFM (read-and-delete-me file) + actually add some stan files to the package (without the latter the module and package loading fails because there isn't any modules to load).

@bgoodri
Copy link
Contributor

bgoodri commented May 30, 2017 via email

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