[Rcpp-devel] Problem installing even default Rcpp skeleton package

Nick Matzke matzke at berkeley.edu
Thu May 10 01:06:58 CEST 2012



On 5/9/12 2:36 PM, Dirk Eddelbuettel wrote:
>
> Nick,
>
> On 9 May 2012 at 14:23, Nick Matzke wrote:
> | Hi all,
> |
> | I have been playing with Rcpp, and gotten the Rcpp installed
> | just fine.
> |
> | However, when I set up the default "example" package with
> | Rcpp.package.skeleton(), e.g.
> |
> | Rcpp.package.skeleton(name="RcppSkeleton")
> |
> | ...I can't get the package to install via any of the usual
> | methods.  During compilation of the C++ code, it hits a
> | "file not found" error, I think because RcppSkeleton is not
> | being produced, or not being placed in the appropriate
> | directory.
> |
> | Any help welcome!  SessionInfo() and various attempts pasted
> | below
> |
> |
> | ATTEMPT #1
> |
> | ####################################################
> | # (First, I ran this inside R:)
> | setwd("/Dropbox/_njm/__packages/")
> | Rcpp.package.skeleton( "RcppSkeleton" , force=TRUE,
> | example_code=TRUE, module=TRUE)
> |
> |
> | # Then, I tried to install from command-line with R CMD INSTALL:
> | ####################################################
> | vlsb-4151a-2:__packages nickm$ R CMD INSTALL
> | /Dropbox/_njm/__packages/RcppSkeleton
> |
> | Loading ~/.Rprofile...
>
> Where is "Loading ~/.Rprofile" coming from?
>
> I just added something the Rcpp-FAQ today (following off-list discussion with
> another user).   You just can't have verbose stuff in ~/.Rprofile as we call
> Rscript all the time to evaluate Rcpp::LdFlags() etc -- if there is stdout it
> ruins everything.
>
> Please comment out that line, or protect it at least via
>
>         if (interactive()) { ... }
>
> Dirk


Wow!  That's all it took to fix it -- encompassing 
everything in .Rprofile within if (interactive()) {...}

Thanks!!!!
Nick


Results now:

===============

setwd("/Dropbox/_njm/__packages/")
 > Rcpp.package.skeleton( "RcppSkeleton" , force=TRUE, 
example_code=TRUE, module=TRUE)
Creating directories ...
Creating DESCRIPTION ...
Creating NAMESPACE ...
Creating Read-and-delete-me ...
Saving functions and data ...
Making help files ...
Done.
Further steps are described in 
'./RcppSkeleton/Read-and-delete-me'.

Adding Rcpp settings
  >> added RcppModules: yada
  >> added Depends: Rcpp
  >> added LinkingTo: Rcpp
  >> added useDynLib directive to NAMESPACE
  >> added Makevars file with Rcpp settings
  >> added Makevars.win file with Rcpp settings
  >> added example header file using Rcpp classes
  >> added example src file using Rcpp classes
  >> added example R file calling the C++ example
  >> added Rd file for rcpp_hello_world
  >> copied the example module
 >


 > install.packages("/Dropbox/_njm/__packages/RcppSkeleton", 
lib="/Library/Frameworks/R.framework/Resources/library/", 
NULL, type='source', INSTALL_opts=c("--debug"))
processing ‘/Dropbox/_njm/__packages/RcppSkeleton’
a directory
* build_help_types=
* DBG: 'R CMD INSTALL' now doing do_install()
* created lock directory 
‘/Library/Frameworks/R.framework/Versions/2.14/Resources/library/00LOCK-RcppSkeleton’
* installing *source* package ‘RcppSkeleton’ ...
** libs
*** arch - i386
about to run R CMD SHLIB -o RcppSkeleton.so 
rcpp_hello_world.cpp rcpp_module.cpp
g++ -arch i386 
-I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/i386 
-I/usr/local/include 
-I"/Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/include" 
   -fPIC  -g -O2 -c rcpp_hello_world.cpp -o rcpp_hello_world.o
g++ -arch i386 
-I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/i386 
-I/usr/local/include 
-I"/Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/include" 
   -fPIC  -g -O2 -c rcpp_module.cpp -o rcpp_module.o
g++ -arch i386 -dynamiclib -Wl,-headerpad_max_install_names 
-undefined dynamic_lookup -single_module -multiply_defined 
suppress -L/usr/local/lib -o RcppSkeleton.so 
rcpp_hello_world.o rcpp_module.o 
/Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/lib/i386/libRcpp.a 
-F/Library/Frameworks/R.framework/.. -framework R 
-Wl,-framework -Wl,CoreFoundation
installing to 
/Library/Frameworks/R.framework/Versions/2.14/Resources/library/RcppSkeleton/libs/i386
*** arch - x86_64
about to run R CMD SHLIB -o RcppSkeleton.so 
rcpp_hello_world.cpp rcpp_module.cpp
g++ -arch x86_64 
-I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/x86_64 
-I/usr/local/include 
-I"/Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/include" 
   -fPIC  -g -O2 -c rcpp_hello_world.cpp -o rcpp_hello_world.o
g++ -arch x86_64 
-I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/x86_64 
-I/usr/local/include 
-I"/Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/include" 
   -fPIC  -g -O2 -c rcpp_module.cpp -o rcpp_module.o
g++ -arch x86_64 -dynamiclib 
-Wl,-headerpad_max_install_names -undefined dynamic_lookup 
-single_module -multiply_defined suppress -L/usr/local/lib 
-o RcppSkeleton.so rcpp_hello_world.o rcpp_module.o 
/Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/lib/x86_64/libRcpp.a 
-F/Library/Frameworks/R.framework/.. -framework R 
-Wl,-framework -Wl,CoreFoundation
installing to 
/Library/Frameworks/R.framework/Versions/2.14/Resources/library/RcppSkeleton/libs/x86_64
** R
** preparing package for lazy loading
** help
Warning: 
/Dropbox/_njm/__packages/RcppSkeleton/man/RcppSkeleton-package.Rd:30: 
All text must be in a section
*** installing help indices
** building package indices ...
** testing if installed package can be loaded
*** arch - i386
*** arch - x86_64

* DONE (RcppSkeleton)
 >
 > library(RcppSkeleton)


===============






More information about the Rcpp-devel mailing list