GeezerVison is showing github.com — attributes::sourceCpp() errs out · Issue #207 · Rcpp11/Rcpp11
attributes::sourceCpp() errs out #207DescriptionWhile I already had the command line tools, I went ahead and downloaded the .dmg file "Command Line Tools (OS X Mavericks) for Xcode - Late June 2014" from https://developer.apple.com/downloads (after logging in with my Apple ID) and installed them again and restarted my computer. Still no luck with:
> writeLines( '
#include <Rcpp11>
// [[export]]
IntegerVector foo(){
return {1, 2, 3} ;
}
', "test.cpp" )
> attributes::sourceCpp("test.cpp", verbose = T)
/Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB 'file1bf56eb0da.cpp'
/bin/sh: I/Library/Frameworks/R.framework/Resources/include: No such file or directory
make: [file1bf56eb0da.o] Error 127 (ignored)
/bin/sh: -dynamiclib: command not found
make: *** [file1bf56eb0da.so] Error 127
I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp11/include" -c file1bf56eb0da.cpp -o file1bf56eb0da.o
-dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -L/usr/local/lib -o file1bf56eb0da.so file1bf56eb0da.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
Error in dyn.load(basename(dynlib)) :
unable to load shared object '/private/var/folders/y7/d6n5439x7754v_1x9v88jwv40000gn/T/RtmpIdpnrD/file1bf56eb0da.so':
dlopen(/private/var/folders/y7/d6n5439x7754v_1x9v88jwv40000gn/T/RtmpIdpnrD/file1bf56eb0da.so, 6): image not found
In addition: Warning message:
running command '/Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB 'file1bf56eb0da.cpp'' had status 1
Here's the line you mentioned:
> devtools::has_devel()
'/Library/Frameworks/R.framework/Resources/bin/R' --vanilla CMD SHLIB foo.c
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.1/Resources/library/Rcpp11/include" -fPIC -mtune=core2 -g -O2 -c foo.c -o foo.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -L/usr/local/lib -o foo.so foo.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
[1] TRUE
Here's some version info for some tools:
earls-mbp:~ earlbrown$ make -v
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0
earls-mbp:~ earlbrown$ clang -v
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.2.0
Thread model: posix
Activitykevinushey commented on Jun 24, 2014 This is quite bizarre.
Do you have anything in your ~/.R/Makevars file? Or perhaps /Library/Frameworks/R.framework/Resources/etc/Makevars.site? What is the output from Sys.getenv() in your R session? What version of R? romainfrancois commented on Jun 24, 2014 This is strange indeed. next suggestion is perhaps to reinstall R, maybe something has been corrupt. I am assuming you are running the current snapshot of attributes right ? kevinushey commented on Jun 25, 2014 We need to see the actual commands R CMD SHLIB is running to further diagnose this. @romainfrancois, can you modify sourceCpp to print out those calls? ekbrown commented on Jun 25, 2014 Success! I uninstalled R and RStudio and reinstalled them both and now I've got foo() printing out 1, 2, 3. I'm good to go.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|