[Rcpp-devel] Package built with Rcpp fails to install

Simon Zehnder szehnder at uni-bonn.de
Mon Feb 3 21:24:07 CET 2014


Hi all,

compiled the package from github on a Linux Scientific Machine:

install_github("dendextendRcpp", user = "talgalili")
Installing github repo(s) dendextendRcpp/master from talgalili
Downloading dendextendRcpp.zip from https://github.com/talgalili/dendextendRcpp/archive/master.zip
Installing package from /tmp/simo_109/cluster_2399/RtmptE5Cd0/dendextendRcpp.zip
Installing dendextendRcpp
'/home/simo_109/opt/R/lib64/R/bin/R' --vanilla CMD INSTALL  \
  '/w0/tmp/simo_109/cluster_2399/RtmptE5Cd0/dendextendRcpp-master'  \
  --library='/rwthfs/rz/cluster/home/simo_109/opt/R/lib64/R/library'  \
  --with-keep.source --install-tests

* installing *source* package 'dendextendRcpp' ...
** libs
g++ -I/home/simo_109/opt/R/lib64/R/include -DNDEBUG  -I/usr/local/include -I"/rwthfs/rz/cluster/home/simo_109/opt/R/lib64/R/library/Rcpp/include"   -fpic  -g -O2  -c RcppExports.cpp -o RcppExports.o
g++ -I/home/simo_109/opt/R/lib64/R/include -DNDEBUG  -I/usr/local/include -I"/rwthfs/rz/cluster/home/simo_109/opt/R/lib64/R/library/Rcpp/include"   -fpic  -g -O2  -c cut_lower.cpp -o cut_lower.o
g++ -I/home/simo_109/opt/R/lib64/R/include -DNDEBUG  -I/usr/local/include -I"/rwthfs/rz/cluster/home/simo_109/opt/R/lib64/R/library/Rcpp/include"   -fpic  -g -O2  -c get_branches_heights.cpp -o get_branches_heights.o
g++ -I/home/simo_109/opt/R/lib64/R/include -DNDEBUG  -I/usr/local/include -I"/rwthfs/rz/cluster/home/simo_109/opt/R/lib64/R/library/Rcpp/include"   -fpic  -g -O2  -c heights_per_k.cpp -o heights_per_k.o
g++ -I/home/simo_109/opt/R/lib64/R/include -DNDEBUG  -I/usr/local/include -I"/rwthfs/rz/cluster/home/simo_109/opt/R/lib64/R/library/Rcpp/include"   -fpic  -g -O2  -c is_functions.cpp -o is_functions.o
g++ -I/home/simo_109/opt/R/lib64/R/include -DNDEBUG  -I/usr/local/include -I"/rwthfs/rz/cluster/home/simo_109/opt/R/lib64/R/library/Rcpp/include"   -fpic  -g -O2  -c labels_dendrogram.cpp -o labels_dendrogram.o
g++ -shared -L/usr/local/lib64 -o dendextendRcpp.so RcppExports.o cut_lower.o get_branches_heights.o heights_per_k.o is_functions.o labels_dendrogram.o -L/rwthfs/rz/cluster/home/simo_109/opt/R/lib64/R/library/Rcpp/lib -lRcpp -Wl,-rpath,/rwthfs/rz/cluster/home/simo_109/opt/R/lib64/R/library/Rcpp/lib
installing to /rwthfs/rz/cluster/home/simo_109/opt/R/lib64/R/library/dendextendRcpp/libs
** R
** inst
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Warning: changing locked binding for 'get_branches_heights' in 'dendextend' whilst loading 'dendextendRcpp'
Warning: changing locked binding for 'heights_per_k.dendrogram' in 'dendextend' whilst loading 'dendextendRcpp'
Warning: changing locked binding for 'cut_lower_fun' in 'dendextend' whilst loading 'dendextendRcpp'
* DONE (dendextendRcpp)

BUT, Rcpp Version 0.10.6

Best

Simon


On 03 Feb 2014, at 20:52, Dirk Eddelbuettel <edd at debian.org> wrote:

> 
> On 3 February 2014 at 21:35, Tal Galili wrote:
> | Dear all,
> | 
> | Dirk - 
> | I have now re-checked, and the package loads fine on my machine, and it is
> | completely synced with github.
> | The only files in my gitignore are:
> | .Rproj.user
> | .Rhistory
> | .RData
> | src/*.o
> | src/*.so
> | src/*.dll
> | So I suspect that the versions are indeed the same.
> | 
> | Kevin - thanks.
> | 
> | Romain - 
> | I am glad you have an idea for what the problem might be. However, I am not
> | sure I understand how to proceed in fixing it.
> | 
> | 
> | Since the package is very minimalistic, any specific examples on what can be
> | improved would be of great help.
> 
> As I mentioned off-list to you, this is possibly a compiler mismatch, and
> newer versions tend to be stricter. 
> 
> But by Occam's Razor, I also suspect that you are building locally against a
> different Rcpp version.  
> 
> What you had were __basic compiler errors__.  You need to fix those, and that
> may involve setting up a VM with a different build environment.
> 
> Dirk
> 
> 
> | 
> | 
> | 
> | Thanks everyone,
> | Tal
> | 
> | 
> | 
> | 
> | 
> | 
> | ----------------Contact
> | Details:-------------------------------------------------------
> | Contact me: Tal.Galili at gmail.com | 
> | Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
> | www.r-statistics.com (English)
> | ----------------------------------------------------------------------------------------------
> | 
> | 
> | 
> | On Mon, Feb 3, 2014 at 9:12 PM, Romain Francois <romain at r-enthusiasts.com>
> | wrote:
> | 
> |     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
> | 
> | 
> | 
> | ----------------------------------------------------------------------
> | _______________________________________________
> | 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
> -- 
> Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
> _______________________________________________
> 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