[Rcpp-devel] Package built with Rcpp fails to install
Romain Francois
romain at r-enthusiasts.com
Mon Feb 3 20:12:35 CET 2014
The problem is likely to be that it was assumed that List derives from RObject.
It used to, it does not anymore.
Classes from the api now use a policy based design. See andrei alexandrescu's modern c++ book for the why and the how of policy based design.
.
Envoyé de mon iPhone
Le 3 févr. 2014 à 20:01, Kevin Ushey <kevinushey at gmail.com> a écrit :
> Hi Tal,
>
> I get the same error with the new CRAN Rcpp, 0.11.0. I'll try to take
> a look later.
>
> -Kevin
>
> On Mon, Feb 3, 2014 at 10:32 AM, Tal Galili <tal.galili at gmail.com> wrote:
>> Dear Rcpp people,
>>
>> I am trying to get a new package to CRAN called {dendextendRcpp}. Here is
>> the repos:
>> https://github.com/talgalili/dendextendRcpp
>>
>> (note that this package relies on the {dendextend} which has just been
>> released to CRAN today :) )
>>
>>
>> The package loads fine for me (on R-devel, with Windows 7), however Kurt
>> Hornik (CRAN maintainer) could not get the package to load on Linux.
>> Following is the error massage that he got. Any input (either here or on the
>> git repo) will be most appreciated.
>>
>> With regards,
>> Tal
>>
>> ========================
>>
>> (p.s: I suspect this might be because I use .hpp files in src. Should I use
>> something else?)
>>
>>
>>
>> * installing *source* package 'dendextendRcpp' ...
>> ** libs
>> clang++ -std=c++11 -I/home/Hornik/tmp/R-d-clang/include -DNDEBUG
>> -I/usr/local/include
>> -I"/home/Hornik/lib/R/Library/3.1/x86_64-linux-gnu/Rcpp/include" -fpic -g
>> -O3 -Wall -Wno-unused -pedantic -c RcppExports.cpp -o RcppExports.o
>> clang++ -std=c++11 -I/home/Hornik/tmp/R-d-clang/include -DNDEBUG
>> -I/usr/local/include
>> -I"/home/Hornik/lib/R/Library/3.1/x86_64-linux-gnu/Rcpp/include" -fpic -g
>> -O3 -Wall -Wno-unused -pedantic -c cut_lower.cpp -o cut_lower.o
>> cut_lower.cpp:35:7: error: no matching function for call to 'get_height'
>> if(get_height(tree) <= height) {
>> ^~~~~~~~~~
>> ./get_branches_heights.hpp:29:8: note: candidate function not viable: no
>> known conversion from 'List' (aka 'Vector<19>') to 'RObject' (aka
>> 'RObject_Impl<PreserveStorage>') for 1st argument
>> double get_height(RObject x);
>> ^
>> cut_lower.cpp:36:13: error: no matching member function for call to
>> 'push_back'
>> lower.push_back(tree);
>> ~~~~~~^~~~~~~~~
>> /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/stl_vector.h:901:7:
>> note: candidate function not viable: no known conversion from 'List' (aka
>> 'Vector<19>') to 'const value_type' (aka 'const
>> Rcpp::RObject_Impl<PreserveStorage>') for 1st argument
>> push_back(const value_type& __x)
>> ^
>> /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/stl_vector.h:919:7:
>> note: candidate function not viable: no known conversion from 'List' (aka
>> 'Vector<19>') to 'value_type' (aka 'Rcpp::RObject_Impl<PreserveStorage>')
>> for 1st argument
>> push_back(value_type&& __x)
>> ^
>> cut_lower.cpp:84:7: error: no matching function for call to 'is_leaf'
>> if(is_leaf( tree )) {
>> ^~~~~~~
>> ./is_functions.hpp:35:6: note: candidate function not viable: no known
>> conversion from 'List' (aka 'Vector<19>') to 'RObject' (aka
>> 'RObject_Impl<PreserveStorage>') for 1st argument
>> bool is_leaf(RObject x);
>> ^
>> 3 errors generated.
>> make: *** [cut_lower.o] Error 1
>> clang++ -std=c++11 -I/home/Hornik/tmp/R-d-clang/include -DNDEBUG
>> -I/usr/local/include
>> -I"/home/Hornik/lib/R/Library/3.1/x86_64-linux-gnu/Rcpp/include" -fpic -g
>> -O3 -Wall -Wno-unused -pedantic -c cut_lower.cpp -o cut_lower.o
>> cut_lower.cpp:35:7: error: no matching function for call to 'get_height'
>> if(get_height(tree) <= height) {
>> ^~~~~~~~~~
>> ./get_branches_heights.hpp:29:8: note: candidate function not viable: no
>> known conversion from 'List' (aka 'Vector<19>') to 'RObject' (aka
>> 'RObject_Impl<PreserveStorage>') for 1st argument
>> double get_height(RObject x);
>> ^
>> cut_lower.cpp:36:13: error: no matching member function for call to
>> 'push_back'
>> lower.push_back(tree);
>> ~~~~~~^~~~~~~~~
>> /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/stl_vector.h:901:7:
>> note: candidate function not viable: no known conversion from 'List' (aka
>> 'Vector<19>') to 'const value_type' (aka 'const
>> Rcpp::RObject_Impl<PreserveStorage>') for 1st argument
>> push_back(const value_type& __x)
>> ^
>> /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/stl_vector.h:919:7:
>> note: candidate function not viable: no known conversion from 'List' (aka
>> 'Vector<19>') to 'value_type' (aka 'Rcpp::RObject_Impl<PreserveStorage>')
>> for 1st argument
>> push_back(value_type&& __x)
>> ^
>> cut_lower.cpp:84:7: error: no matching function for call to 'is_leaf'
>> if(is_leaf( tree )) {
>> ^~~~~~~
>> ./is_functions.hpp:35:6: note: candidate function not viable: no known
>> conversion from 'List' (aka 'Vector<19>') to 'RObject' (aka
>> 'RObject_Impl<PreserveStorage>') for 1st argument
>> bool is_leaf(RObject x);
>> ^
>> 3 errors generated.
>> make: *** [cut_lower.o] Error 1
>> ERROR: compilation failed for package 'dendextendRcpp'
>> * removing '/home/Hornik/tmp/CRAN/dendextendRcpp.Rcheck/dendextendRcpp'
>>
>>
>> _______________________________________________
>> Rcpp-devel mailing list
>> Rcpp-devel at lists.r-forge.r-project.org
>> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
More information about the Rcpp-devel
mailing list