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

problem with meat's clone #10

Closed
pachadotdev opened this issue Jun 21, 2022 · 2 comments
Closed

problem with meat's clone #10

pachadotdev opened this issue Jun 21, 2022 · 2 comments

Comments

@pachadotdev
Copy link
Owner

@pachadotdev pachadotdev commented Jun 21, 2022

The following error occurs because of the line: https://github.com/pachadotdev/fixest/blob/cpp11/src/09_02_vcov_dwdk.cpp.

What I've done to obtain this is to open RStudio/VSCode and run devtools::install(). It goes well until this part. In previous commits, this didn't happen because the current refactoring fixed many build problems, and the build moved forward in the line, but it's blocked at the script 09_02_vcov_dwdk.

The main branch compiles well because it uses Rcpp. The cpp11 branch is the one that fails because it's being ported to cpp11, and it's refactored to avoid copypasting functions in different scripts.

09_02_vcov_dwdk.cpp:127:44: error: cannot convert ‘cpp11::writable::doubles_matrix<>’ {aka ‘cpp11::matrix<cpp11::writable::r_vector<double>, cpp11::writable::r_vector<double>::proxy, cpp11::by_column>’} to ‘int (*)(void*)’
  127 |     writable::doubles_matrix<> res = clone(meat);
      |                                            ^~~~
      |                                            |
      |                                            cpp11::writable::doubles_matrix<> {aka cpp11::matrix<cpp11::writable::r_vector<double>, cpp11::writable::r_vector<double>::proxy, cpp11::by_column>}
In file included from /usr/include/sched.h:43,
                 from /usr/include/pthread.h:22,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/gthr.h:148,
                 from /usr/include/c++/9/ext/atomicity.h:35,
                 from /usr/include/c++/9/memory:73,
                 from /home/pacha/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/as.hpp:5,
                 from /home/pacha/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11.hpp:5,
                 from 09_vcov.h:13,
                 from 09_02_vcov_dwdk.cpp:1:
@DavisVaughan
Copy link

@DavisVaughan DavisVaughan commented Jul 12, 2022

Isn't clone() an Rcpp function? So you shouldn't expect it to necessarily be compatible with cpp11

pachadotdev added a commit that referenced this issue Jul 19, 2022
@pachadotdev
Copy link
Owner Author

@pachadotdev pachadotdev commented Jul 19, 2022

Isn't clone() an Rcpp function? So you shouldn't expect it to necessarily be compatible with cpp11

that was the problem! I found a way to avoid it and now I moved to the next error
thanks

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