rstudio / rstudio/shinytest2

Compilation error during install

Open
#321 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
123
Forks
23
PR merge metrics
No merged PRs in 30d

Description

I am using the following command to install shinytest2:

R -e "install.packages(c('shinytest2'), repos='https://cran.rstudio.com')"

And I am getting the errors:

code.cpp:34:5: error: ‘cpp11::doubles_matrix’ {aka ‘cpp11::matrix<cpp11::r_vector<double>, double>’} is not a template
   34 |     cpp11::doubles_matrix<by_column> diff_matrix,
      |     ^~~~~
code.cpp:34:27: error: ‘by_column’ was not declared in this scope
   34 |     cpp11::doubles_matrix<by_column> diff_matrix,
      |                           ^~~~~~~~~
code.cpp: In function ‘double image_diff_convolution_max_value(cpp11::doubles_matrix, int)’:
code.cpp:47:3: error: ‘cpp11::writable::doubles_matrix’ {aka ‘cpp11::matrix<cpp11::writable::r_vector<double>, cpp11::writable::r_vector<double>::proxy>’} is not a template
   47 |   cpp11::writable::doubles_matrix<by_column>
      |   ^~~~~
code.cpp:47:35: error: ‘by_column’ was not declared in this scope
   47 |   cpp11::writable::doubles_matrix<by_column>
      |                                   ^~~~~~~~~
make: *** [/usr/lib/R/etc/Makeconf:181: code.o] Error 1
ERROR: compilation failed for package ‘shinytest2’

I notice in src/code.cpp the directive #include <cpp11.hpp>; however, there is no such file in the src directory (or in the whole repository). Could this be the issue?

Thanks,
Daniel Cotter

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

Reproduce the CRAN installation command and inspect src/code.cpp alongside the reported compiler output. Check how the cpp11 dependency and its matrix types are provided during the package build; done means shinytest2 installs without the compilation errors.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.