Tidyr: error: unmove is not a member of cpp11

Created on 10 Aug 2020  Â·  12Comments  Â·  Source: tidyverse/tidyr

I'm getting this error when installing the latest versions of tidyr from both CRAN (1.1.1) and GitHub (61e9209).

docker run --rm -it rocker/r-ubuntu:20.04
Rscript -e 'install.packages("tidyr")'
Rscript -e 'install.packages("remotes")'
Rscript -e 'remotes::install_github("tidyverse/tidyr")'

The error also appears on CRAN: https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-gcc/tidyr-00install.html

make[1]: Entering directory '/data/gannet/ripley/R/packages/tests-devel/tidyr/src'
g++ -std=gnu++11 -I"/data/gannet/ripley/R/R-devel/include" -DNDEBUG  -I'/data/gannet/ripley/R/test-4.1/cpp11/include' -I/usr/local/include   -fpic  -g -O2 -Wall -pedantic -mtune=native -Wno-ignored-attributes -Wno-parentheses -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong -fstack-clash-protection -fcf-protection  -c cpp11.cpp -o cpp11.o
g++ -std=gnu++11 -I"/data/gannet/ripley/R/R-devel/include" -DNDEBUG  -I'/data/gannet/ripley/R/test-4.1/cpp11/include' -I/usr/local/include   -fpic  -g -O2 -Wall -pedantic -mtune=native -Wno-ignored-attributes -Wno-parentheses -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong -fstack-clash-protection -fcf-protection  -c fill.cpp -o fill.o
g++ -std=gnu++11 -I"/data/gannet/ripley/R/R-devel/include" -DNDEBUG  -I'/data/gannet/ripley/R/test-4.1/cpp11/include' -I/usr/local/include   -fpic  -g -O2 -Wall -pedantic -mtune=native -Wno-ignored-attributes -Wno-parentheses -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong -fstack-clash-protection -fcf-protection  -c melt.cpp -o melt.o
g++ -std=gnu++11 -I"/data/gannet/ripley/R/R-devel/include" -DNDEBUG  -I'/data/gannet/ripley/R/test-4.1/cpp11/include' -I/usr/local/include   -fpic  -g -O2 -Wall -pedantic -mtune=native -Wno-ignored-attributes -Wno-parentheses -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong -fstack-clash-protection -fcf-protection  -c simplifyPieces.cpp -o simplifyPieces.o
cpp11.cpp: In function ‘SEXPREC* _tidyr_fillDown(SEXP)’:
cpp11.cpp:10:43: error: ‘unmove’ is not a member of ‘cpp11’
   10 |     return cpp11::as_sexp(fillDown(cpp11::unmove(cpp11::as_cpp<SEXP>(x))));
      |                                           ^~~~~~
cpp11.cpp: In function ‘SEXPREC* _tidyr_fillUp(SEXP)’:
cpp11.cpp:17:41: error: ‘unmove’ is not a member of ‘cpp11’
   17 |     return cpp11::as_sexp(fillUp(cpp11::unmove(cpp11::as_cpp<SEXP>(x))));
      |                                         ^~~~~~
cpp11.cpp: In function ‘SEXPREC* _tidyr_melt_dataframe(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)’:
cpp11.cpp:24:49: error: ‘unmove’ is not a member of ‘cpp11’
   24 |     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
      |                                                 ^~~~~~
cpp11.cpp:24:104: error: ‘unmove’ is not a member of ‘cpp11’
   24 |     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
      |                                                                                                        ^~~~~~
cpp11.cpp:24:155: error: use of deleted function ‘cpp11::enable_if_t<(! std::is_same<typename std::decay<_Tp>::type, T>::value), T> cpp11::as_cpp(SEXP) [with T = const cpp11::r_vector<int>&; cpp11::enable_if_t<(! std::is_same<typename std::decay<_Tp>::type, T>::value), T> = const cpp11::r_vector<int>&; typename std::decay<_Tp>::type = std::decay<const cpp11::r_vector<int>&>::type; SEXP = SEXPREC*]’
   24 |     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
      |                                                                                                                                                           ^
In file included from /data/gannet/ripley/R/test-4.1/cpp11/include/cpp11.hpp:5,
                 from /data/gannet/ripley/R/test-4.1/cpp11/include/cpp11/declarations.hpp:8,
                 from cpp11.cpp:4:
/data/gannet/ripley/R/test-4.1/cpp11/include/cpp11/as.hpp:180:53: note: declared here
  180 | enable_if_t<!std::is_same<decay_t<T>, T>::value, T> as_cpp(SEXP from) = delete;
      |                                                     ^~~~~~
cpp11.cpp:24:166: error: ‘unmove’ is not a member of ‘cpp11’
   24 |     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
      |                                                                                                                                                                      ^~~~~~
cpp11.cpp:24:222: error: use of deleted function ‘cpp11::enable_if_t<(! std::is_same<typename std::decay<_Tp>::type, T>::value), T> cpp11::as_cpp(SEXP) [with T = const cpp11::r_vector<int>&; cpp11::enable_if_t<(! std::is_same<typename std::decay<_Tp>::type, T>::value), T> = const cpp11::r_vector<int>&; typename std::decay<_Tp>::type = std::decay<const cpp11::r_vector<int>&>::type; SEXP = SEXPREC*]’
   24 |     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
      |                                                                                                                                                                                                                              ^
In file included from /data/gannet/ripley/R/test-4.1/cpp11/include/cpp11.hpp:5,
                 from /data/gannet/ripley/R/test-4.1/cpp11/include/cpp11/declarations.hpp:8,
                 from cpp11.cpp:4:
/data/gannet/ripley/R/test-4.1/cpp11/include/cpp11/as.hpp:180:53: note: declared here
  180 | enable_if_t<!std::is_same<decay_t<T>, T>::value, T> as_cpp(SEXP from) = delete;
      |                                                     ^~~~~~
cpp11.cpp:24:233: error: ‘unmove’ is not a member of ‘cpp11’
   24 |     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
      |                                                                                                                                                                                                                                         ^~~~~~
cpp11.cpp:24:294: error: ‘unmove’ is not a member of ‘cpp11’
   24 |     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
      |                                                                                                                                                                                                                                                                                                      ^~~~~~
cpp11.cpp:24:352: error: ‘unmove’ is not a member of ‘cpp11’
   24 |     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
      |                                                                                                                                                                                                                                                                                                                                                                ^~~~~~
cpp11.cpp:24:409: error: ‘unmove’ is not a member of ‘cpp11’
   24 |     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
      |                                                                                                                                                                                                                                                                                                                                                                                                                         ^~~~~~
cpp11.cpp:24:463: error: ‘unmove’ is not a member of ‘cpp11’
   24 |     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ^~~~~~
cpp11.cpp:24:514: error: ‘unmove’ is not a member of ‘cpp11’
   24 |     return cpp11::as_sexp(melt_dataframe(cpp11::unmove(cpp11::as_cpp<cpp11::data_frame>(data)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(id_ind)), cpp11::unmove(cpp11::as_cpp<const cpp11::integers&>(measure_ind)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(variable_name)), cpp11::unmove(cpp11::as_cpp<cpp11::strings>(value_name)), cpp11::unmove(cpp11::as_cpp<cpp11::sexp>(attrTemplate)), cpp11::unmove(cpp11::as_cpp<bool>(factorsAsStrings)), cpp11::unmove(cpp11::as_cpp<bool>(valueAsFactor)), cpp11::unmove(cpp11::as_cpp<bool>(variableAsFactor))));
      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ^~~~~~
cpp11.cpp: In function ‘SEXPREC* _tidyr_simplifyPieces(SEXP, SEXP, SEXP)’:
cpp11.cpp:31:49: error: ‘unmove’ is not a member of ‘cpp11’
   31 |     return cpp11::as_sexp(simplifyPieces(cpp11::unmove(cpp11::as_cpp<cpp11::list>(pieces)), cpp11::unmove(cpp11::as_cpp<int>(p)), cpp11::unmove(cpp11::as_cpp<bool>(fillLeft))));
      |                                                 ^~~~~~
cpp11.cpp:31:100: error: ‘unmove’ is not a member of ‘cpp11’
   31 |     return cpp11::as_sexp(simplifyPieces(cpp11::unmove(cpp11::as_cpp<cpp11::list>(pieces)), cpp11::unmove(cpp11::as_cpp<int>(p)), cpp11::unmove(cpp11::as_cpp<bool>(fillLeft))));
      |                                                                                                    ^~~~~~
cpp11.cpp:31:138: error: ‘unmove’ is not a member of ‘cpp11’
   31 |     return cpp11::as_sexp(simplifyPieces(cpp11::unmove(cpp11::as_cpp<cpp11::list>(pieces)), cpp11::unmove(cpp11::as_cpp<int>(p)), cpp11::unmove(cpp11::as_cpp<bool>(fillLeft))));
      |                                                                                                                                          ^~~~~~
make[1]: *** [/data/gannet/ripley/R/R-devel/etc/Makeconf:175: cpp11.o] Error 1
make[1]: Target 'all' not remade because of errors.
make[1]: Leaving directory '/data/gannet/ripley/R/packages/tests-devel/tidyr/src'
ERROR: compilation failed for package ‘tidyr’

Most helpful comment

This should be resolved by the 0.2.1 release of cpp11, which is now on CRAN.

All 12 comments

I'm having the same issue with Ubuntu 18.04. It appears that this issue started because of an update of the cpp11 package to 0.2.0. I've removed and downgraded the cpp11 package to 0.1.0, and then can compile/install the tidyr package as expected.

Same here on Pop!_OS 20.04 LTS

@chriswier: thanks a lot for the workaround!

To do that:

devtools::install_version("cpp11", version = "0.1", repos = "http://cran.us.r-project.org")

cc @jimhester

To do that:

devtools::install_version("cpp11", version = "0.1", repos = "http://cran.us.r-project.org")

version should probably be "0.1.0", otherwise I was getting

version '0.1' is invalid for package 'cpp11'

error.

Can confirm that I'm seeing this on Fedora as well. Downgrading to cpp11 v0.1.0 (https://cran.r-project.org/src/contrib/Archive/cpp11/cpp11_0.1.0.tar.gz) allows tidyr to install.

I have this error on Travis, but haven't figured out a solution.

I'm having the same issue on GHA while trying to install tidyr:
error: ‘unmove’ is not a member of ‘cpp11’

same problem on Travis-CI

This should be resolved by the 0.2.1 release of cpp11, which is now on CRAN.

@jimhester That was fast, thanks a lot for addressing this so quickly!

I confirm that the problem is solved with cpp11 0.2.1. Thanks @jimhester for the quick solution. And @chriswier and @birderboone for the suggested workaround.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

damianooldoni picture damianooldoni  Â·  13Comments

earowang picture earowang  Â·  9Comments

andrewpbray picture andrewpbray  Â·  8Comments

MarcusWalz picture MarcusWalz  Â·  16Comments

leungi picture leungi  Â·  19Comments