[Rcpp-devel] Problem compling rinside_sample0 on OSX
Hey, I just installed Rcpp RInside successful using CRAN, but when I try to "make rinside_sample0" I get the following linking errors: ld warning: option -s is obsolete and being ignored Undefined symbols: "SEXPREC* Rcpp::grow(Rcpp::Named const&, SEXPREC*)", referenced from: SEXPREC* Rcpp::pairlist(Rcpp::Function const&, Rcpp::Named const&, Rcpp::Named const&)in libRInside.a(RInside.o) SEXPREC* Rcpp::pairlist(Rcpp::Function const&, Rcpp::Named const&, Rcpp::Named const&)in libRInside.a(RInside.o) ld: symbol(s) not found collect2: ld returned 1 exit status make: *** [rinside_sample0] Error 1 Is this an OSX specific thing, or is the example code not sync'd with the library from CRAN? or something else? THanks, Dan -- Dan Kulp, PhD Postdoctoral Fellow Biosciences Division, B-9 Los Alamos National Laboratory Los Alamos,NM 87545 ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Re: [Rcpp-devel] Problem compling rinside_sample0 on OSX
Haha, looks like the thread got sidetracked I have a 3-button mouse all the time. How should I "switching to 0.7.11 from its tarball may do the trick" ... ? Libraries from CRAN installed into .../Library/R/2.10/library/Rcpp and .../LibraryR/2.10/library/RIniside I tried to download the OSX binary 0.7.11 tar ball and untar into /Library/R/2.10/library/ , but got the same error. Thanks, Dan On Tue, Apr 6, 2010 at 6:45 AM, Romain Francois wrote: > Le 06/04/10 14:34, Douglas Bates a écrit : > > > > On Tue, Apr 6, 2010 at 5:19 AM, Romain Francois > > wrote: > >> Le 06/04/10 12:14, Dirk Eddelbuettel a écrit : > >>> Hi Dan, > >>> > >>> Thanks for switching to the list. > >>> > >>> On 5 April 2010 at 22:12, Dan Kulp wrote: > >>> | Hey, > >>> | I just installed Rcpp RInside successful using CRAN, but when I try > to > >>> | "make rinside_sample0" I get the following linking errors: > >>> | > >>> | ld warning: option -s is obsolete and being ignored > >>> | Undefined symbols: > >>> | "SEXPREC* Rcpp::grow(Rcpp::Named const&, SEXPREC*)", > >>> | referenced from: > >>> | SEXPREC* Rcpp::pairlist >>> | Rcpp::Named>(Rcpp::Function const&, Rcpp::Named const&, Rcpp::Named > >>> | const&)in libRInside.a(RInside.o) > >>> | SEXPREC* Rcpp::pairlist >>> | Rcpp::Named>(Rcpp::Function const&, Rcpp::Named const&, Rcpp::Named > >>> | const&)in libRInside.a(RInside.o) > >>> | ld: symbol(s) not found > >>> | collect2: ld returned 1 exit status > >>> | make: *** [rinside_sample0] Error 1 > >>> > >>> I think I just had that yesterday at work -- you do have to be careful > to use > >>> _matching_ RInside and Rcpp releases. Which I why going with CRAN is a > good > >>> option. > >>> > >>> Using the _released_ versions 0.7.11 for Rcpp and 0.2.2 for RInside > should > >>> 'just work'. As Romain said, please send along the version numbers > you used. > >> > >> Totally. It seems though that when you install from cran you get Rcpp > >> 0.7.10 even though cran advertizes 0.7.11, but I did not try all > mirrors. > > > > It is not uncommon for the OS X binaries on CRAN to lag the other > > versions of a package. It seems that building the OS X binaries is > > more involved than even the Windows binaries. > > > > I solve the problem of lagging OS X binaries by installing Linux on > > any Macs I use and ignoring the OS X system. Now if only I could get > > around the stupid 1-button mouse and bizarre key mappings. :-) > > There is a setting in System preferences > Mouse that lets you emulate a > two button mouse (at least with the magic mouse that was shipped with mine) > > For the keyboard, I am still hostage. I often google for the keystrokes. > > > (The true sign of a died-in-the-wool Macophile is when they try to > > convince why a 1-button mouse is really a good idea.) > > not there yet. > > >>> | Is this an OSX specific thing, or is the example code not sync'd with > the > >>> | library from CRAN? or something else? > >>> > >>> We do try to make pretty sure that this works for _released_ versions. > >> > > >>> Rcpp tends to change a lot so there sometimes is something changing at > its > >>> side that may not yet be reflected at the RInside side. We try to > minimise > >>> that but it happens. Sticking with the releases should help as a > remedy. > >>> > >>> Thanks, Dirk > > > -- > Romain Francois > Professional R Enthusiast > +33(0) 6 28 91 30 30 > http://romainfrancois.blog.free.fr > |- http://bit.ly/9aKDM9 : embed images in Rd documents > |- http://tr.im/OIXN : raster images and RImageJ > |- http://tr.im/OcQe : Rcpp 0.7.7 > > ___ > Rcpp-devel mailing list > Rcpp-devel@lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel > -- Dan Kulp, PhD Postdoctoral Fellow Biosciences Division, B-9 Los Alamos National Laboratory Los Alamos,NM 87545 ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Re: [Rcpp-devel] Problem compling rinside_sample0 on OSX
Sorry about that, I thought you had figured out the CRAN version numbers Rcpp : 0.7.11 RInside: 0.2.2 I also tried installing the package as you recommend .. doesn't help, clearly because I already have 0.7.11 Any more suggestions? ~Dan On Tue, Apr 6, 2010 at 9:14 AM, Dirk Eddelbuettel wrote: > > On 6 April 2010 at 08:58, Dan Kulp wrote: > | Libraries from CRAN installed into .../Library/R/2.10/library/Rcpp and > | .../LibraryR/2.10/library/RIniside > > We asked about the _version numbers_ which you still have not provided. > Please do (inside R) > > library(help=Rcpp) > library(help=RInside) > > and/or look at the DESCRIPTION files in the directories you listed. > > | I tried to download the OSX binary 0.7.11 tar ball and untar into > | /Library/R/2.10/library/ , but got the same error. > > You install an R package from source by doing > >R CMD INSTALL Rcpp_0.7.11.tar.gz > > wich is different from untar-ring a source package. > > Dirk > > -- > Registration is open for the 2nd International conference R / Finance 2010 > See http://www.RinFinance.com for details, and see you in Chicago in > April! > -- Dan Kulp, PhD Postdoctoral Fellow Biosciences Division, B-9 Los Alamos National Laboratory Los Alamos,NM 87545 ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Re: [Rcpp-devel] Problem compling rinside_sample0 on OSX
By the way: > Rscript -e "RInside:::CxxFlags()" -I/Users/dwkulp/Library/R/2.10/library/RInside/lib/i386 > Rscript -e "RInside:::LdFlags()" /Users/dwkulp/Library/R/2.10/library/RInside/lib/i386/libRInside.a ~Dan On Tue, Apr 6, 2010 at 9:22 AM, Dan Kulp wrote: > Sorry about that, I thought you had figured out the CRAN version > numbers > > Rcpp : 0.7.11 > RInside: 0.2.2 > > I also tried installing the package as you recommend .. doesn't help, > clearly because I already have 0.7.11 > > Any more suggestions? > > ~Dan > > On Tue, Apr 6, 2010 at 9:14 AM, Dirk Eddelbuettel wrote: > >> >> On 6 April 2010 at 08:58, Dan Kulp wrote: >> | Libraries from CRAN installed into .../Library/R/2.10/library/Rcpp and >> | .../LibraryR/2.10/library/RIniside >> >> We asked about the _version numbers_ which you still have not provided. >> Please do (inside R) >> >> library(help=Rcpp) >> library(help=RInside) >> >> and/or look at the DESCRIPTION files in the directories you listed. >> >> | I tried to download the OSX binary 0.7.11 tar ball and untar into >> | /Library/R/2.10/library/ , but got the same error. >> >> You install an R package from source by doing >> >>R CMD INSTALL Rcpp_0.7.11.tar.gz >> >> wich is different from untar-ring a source package. >> >> Dirk >> >> -- >> Registration is open for the 2nd International conference R / Finance >> 2010 >> See http://www.RinFinance.com for details, and see you in Chicago in >> April! >> > > > > -- > Dan Kulp, PhD > Postdoctoral Fellow > Biosciences Division, B-9 > Los Alamos National Laboratory > Los Alamos,NM 87545 > -- Dan Kulp, PhD Postdoctoral Fellow Biosciences Division, B-9 Los Alamos National Laboratory Los Alamos,NM 87545 ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Re: [Rcpp-devel] Problem compling rinside_sample0 on OSX
Success! The snag was installing both packages from their source packages, not the binary OSX ones. I appreciate your guys time, too bad installation from CRAN didn't "just work". For me there is a lot of potential for this library. I use R for all my data analysis, but I have a set of c++ libraries used for generating the data (my application is protein design), it would be great to fuse the two. One question, does RInside allow you to load installed packages ( library("RSvgDevice") ) ? Thanks again, Dan On Tue, Apr 6, 2010 at 9:36 AM, Dirk Eddelbuettel wrote: > > On 6 April 2010 at 09:22, Dan Kulp wrote: > | Sorry about that, I thought you had figured out the CRAN version > numbers > | > | Rcpp : 0.7.11 > | RInside: 0.2.2 > | > | I also tried installing the package as you recommend .. doesn't help, > | clearly because I already have 0.7.11 > | > | Any more suggestions? > > Not at this point given the somewhat incomplete information you provided. > > See below for a log from my Linux box. > > Dirk > > e...@ron:~/svn/rcpp> R CMD INSTALL pkg/Rcpp_0.7.11.tar.gz > * installing to library ‘/usr/local/lib/R/site-library’ > * installing *source* package ‘Rcpp’ ... > ** libs > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c Dimension.cpp > -o Dimension.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c > DottedPair.cpp -o DottedPair.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c > Environment.cpp -o Environment.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c Evaluator.cpp > -o Evaluator.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c Function.cpp > -o Function.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c Language.cpp > -o Language.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c Pairlist.cpp > -o Pairlist.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c Promise.cpp > -o Promise.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c RObject.cpp > -o RObject.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c > RcppCommon.cpp -o RcppCommon.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c RcppDate.cpp > -o RcppDate.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c > RcppDateVector.cpp -o RcppDateVector.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c > RcppDatetime.cpp -o RcppDatetime.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c > RcppDatetimeVector.cpp -o RcppDatetimeVector.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c RcppFrame.cpp > -o RcppFrame.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c > RcppFunction.cpp -o RcppFunction.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c RcppList.cpp > -o RcppList.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c > RcppMatrix.cpp -o RcppMatrix.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c > RcppMatrixView.cpp -o RcppMatrixView.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c > RcppNumList.cpp -o RcppNumList.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c > RcppParams.cpp -o RcppParams.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c > RcppResultSet.cpp -o RcppResultSet.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c > RcppStringVector.cpp -o RcppStringVector.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c > RcppStringVectorView.cpp -o RcppStringVectorView.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c > RcppVector.cpp -o RcppVector.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c > RcppVectorView.cpp -o RcppVectorView.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c S4.cpp -o > S4.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c Symbol.cpp -o > Symbol.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c > WeakReference.cpp -o WeakReference.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c clone.cpp -o > clone.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c coerce.cpp -o > coerce.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c debugging.cpp > -o debugging.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c > exceptions.cpp -o exceptions.o > g++ -I/usr/share/R/include -I. -fpic -O3 -Wall -pipe -c r_cast.cpp -o > r_cast.o > g++ -shared -o Rcpp.so Dimension.o DottedPair.o Environment.o Evaluator.o > Function.o Language.o Pairlist.o Promise.o RObject.o RcppCommon.o RcppDate.o > RcppDateVector.o Rcp
Re: [Rcpp-devel] Problem compling rinside_sample0 on OSX
Maybe "using source from CRAN" -- how/where do I document that better? Where would you have looked? IMHO http://dirk.eddelbuettel.com/code/rcpp.html should have an installation section, where you explicitly state the multiple ways in which you can install: 1. install.packages("Rcpp") 2. "R CMD INSTALL " 3. To install from binary tgz you should bla,bla.. My confusion: >From 1, usually install.package(PKG) I've used for installing a package like RSvgDevice, where I would be calling it from R. In this case I was expecting to install some header/source files that I could build and link against. >From 2, I don't use a lot of R command-line so I wasn't aware that you could R CMD INSTALL a source package and it would compile+install for you. Also, in all the tar files you have, very few have README or INSTALL files, which could have been helpful with the above information. Thanks again for your quick response and help get me going. I already have RInside working in my code to generate specific plots of my datasets. ~Dan On Tue, Apr 6, 2010 at 10:45 AM, Romain Francois wrote: > Le 06/04/10 18:02, Dirk Eddelbuettel a écrit : > > >> On 6 April 2010 at 09:47, Dan Kulp wrote: >> | Success! The snag was installing both packages from their source >> packages, >> | not the binary OSX ones. >> >> Fiddlesticks! I once knew that, but forgot, and it doesn't hit Romain on >> OS X >> as he builds from source anyway. >> > > I'd guess that the RInside binary was built against Rcpp 0.7.10 which has > some binary incompatibilities with Rcpp 0.7.11, or the other way around > ..?.? > > (Rcpp::Named as been promoted from a class to a function so that might be > it. The interface has been retained, so I think this is why compiling both > from source works. ) > > We try out best not to introduce binary incompatibilities like this one, > but it is not an easy task to track them. thanks for reporting this. > > I know that on windows, if package B that depends on package A and A is > resubmitted, Uwe rebuilds both A and B for the windows binaries, not sure > this also is the case for OSX binaries. (Beyond C incompatibilities other > things can break such as S4 classes, etc ...) > > > | I appreciate your guys time, too bad installation from CRAN didn't "just >> | work". For me there is a lot of potential for this library. I use R >> for >> >> Maybe "using source from CRAN" -- how/where do I document that better? >> Where >> would you have looked? >> > > Maybe we can couple more tightly, e.g have RInside depend on Rcpp (>= > 0.7.11). Dunno. > > Not sure this would have happened with dynamic linking, but this might be > completely unrelated. > > > | all my data analysis, but I have a set of c++ libraries used for >> generating >> | the data (my application is protein design), it would be great to fuse >> the >> | two. >> >> Yup. And given how feature-complete Rcpp has gotten it is quite a joy to >> use too. >> >> | One question, does RInside allow you to load installed packages ( >> | library("RSvgDevice") ) ? >> >> "Should". See the other examples which load libraries. Devices have their >> own pecularities so I don't know off-hand about this for SVG generation. >> In >> principle it should and if it doesn't in practice we can now count on you >> to >> debug it ;-) >> >> Good it works now. >> >> Dirk >> > > Same analysis, it should work. > > -- > Romain Francois > Professional R Enthusiast > +33(0) 6 28 91 30 30 > http://romainfrancois.blog.free.fr > |- http://bit.ly/9aKDM9 : embed images in Rd documents > |- http://tr.im/OIXN : raster images and RImageJ > |- http://tr.im/OcQe : Rcpp 0.7.7 > > -- Dan Kulp, PhD Postdoctoral Fellow Biosciences Division, B-9 Los Alamos National Laboratory Los Alamos,NM 87545 ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
[Rcpp-devel] Static linking of Rcpp
It seems on MacOS the default flags in the RInside/examples/standard/Makefile have the "-framework R" flag and won't compile without it. Why do I need this if I am already providing libRcpp.a and libRInside.a ? I'd like to be able to build a program that I can distribute to a computer that does not have R installed... Or is this not possible? Thanks, Dan ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
[Rcpp-devel] 64-bit libRcpp.a on 32-bit MacOS
Hello, I was wondering what the simplest route to building a 64-bit libRcpp.a library, when running 10.5.8 32-bit. ( sysctl hw.cpu64bit_capable returns 1 ). R CMD INSTALL Rcpp_.tar.gz installs a 32-bit library (I think). I tried looking into the source, but didn't see a configure or Makefile there. Thanks in advance, Dan ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Re: [Rcpp-devel] 64-bit libRcpp.a on 32-bit MacOS
I should be able to build a 64-bit binary on this OS. R CMD INSTALL however uses -arch i386 by default.. would you know how to send compile flags to the R CMD INSTALL system? Thanks, Dan On Thu, Aug 26, 2010 at 9:38 AM, Dirk Eddelbuettel wrote: > > On 26 August 2010 at 09:16, Dan Kulp wrote: > | Hello, > | I was wondering what the simplest route to building a 64-bit > libRcpp.a > | library, when running 10.5.8 32-bit. ( sysctl hw.cpu64bit_capable returns > 1 > | ). R CMD INSTALL Rcpp_.tar.gz installs a 32-bit library (I think). I > | tried looking into the source, but didn't see a configure or Makefile > there. > > Not sure as I'm the one on the team who doesn't own Mac hardware. That > said, > as I recall some of the tips by Simon it is generally best to start from > source on OS X. So maybe you "just" need xcode etc on a 64-bit Mac. > Others > may fill in with more pertinent hints and recommendations. > > Dirk > > -- > Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com > -- Dan Kulp, PhD Postdoctoral Fellow Biosciences Division, B-9 Los Alamos National Laboratory Los Alamos,NM 87545 ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel