GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — attributes::sourceCpp() errs out · Issue #207 · Rcpp11/Rcpp11

attributes::sourceCpp() errs out #207

New issue
Copy link
New issue
Copy link
Open
Open
attributes::sourceCpp() errs out#207
Copy link

Description

@ekbrown
ekbrown
opened on Jun 24, 2014
Issue body actions

While 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

Activity

  1. kevinushey commented on Jun 24, 2014

    @kevinushey
    kevinushey
    on Jun 24, 2014
    Contributor
    More actions

    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?

  2. romainfrancois commented on Jun 24, 2014

    @romainfrancois
    romainfrancois
    on Jun 24, 2014
    Contributor
    More actions

    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 ?

  3. romainfrancois
    closed this as completedon Jun 24, 2014
  4. kevinushey
    reopened this on Jun 25, 2014
  5. kevinushey commented on Jun 25, 2014

    @kevinushey
    kevinushey
    on Jun 25, 2014
    Contributor
    More actions

    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?

  6. ekbrown commented on Jun 25, 2014

    @ekbrown
    ekbrown
    on Jun 25, 2014
    Author
    More actions

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.