With latest Rcpp (0.9.10) and latest R (2.14.2),
I generated an Rcpp module skeleton, but it
blows up with a memory error "pointer being freed was not
allocated" when I run "R CMD check" for x86_64.
An Rcpp skeleton created with module=FALSE works just fine.
Here's what I did step-by-step:
1. Updated R to 2.14.2
2. Fired up 64-bit R
~/stan> R
R version 2.14.2 (2012-02-29)
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
3. Installed Rcpp
R> setwd('stan')
R> install.packages('Rcpp')
--- Please select a CRAN mirror for use in this session ---
trying URL
'http://cran.at.r-project.org/bin/macosx/leopard/contrib/2.14/Rcpp_0.9.10.tgz'
Content type 'application/x-gzip' length 7636884 bytes (7.3 Mb)
opened URL
==================================================
downloaded 7.3 Mb
4. Generated a package skeleton with module=TRUE
R> Rcpp.package.skeleton(name='mypkg2',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 './mypkg2/Read-and-delete-me'.
5. Built the package
~/stan> R CMD build mypkg2
* checking for file ?mypkg2/DESCRIPTION? ... OK
* preparing ?mypkg2?:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building ?mypkg2_1.0.tar.gz?
6. Check the package
~/stan> R CMD check mypkg2
* using log directory ?/Users/carp/stan/mypkg2.Rcheck?
* using R version 2.14.2 (2012-02-29)
* using platform: x86_64-apple-darwin9.8.0 (64-bit)
* using session charset: UTF-8
* checking for file ?mypkg2/DESCRIPTION? ... OK
* checking extension type ... Package
* this is package ?mypkg2? version ?1.0?
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking whether package ?mypkg2? can be installed ... ERROR
Installation failed.
See ?/Users/carp/stan/mypkg2.Rcheck/00install.out? for details.
7. Look at the error log
~/stan> cat /Users/carp/stan/mypkg2.Rcheck/00install.out
* installing *source* package ?mypkg2? ...
** libs
*** arch - i386
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 mypkg2.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
ld: warning: in /usr/local/lib/libstdc++.dylib, file was built for
unsupported file format which is not the architecture being linked (i386)
installing to /Users/carp/stan/mypkg2.Rcheck/mypkg2/libs/i386
*** arch - x86_64
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 mypkg2.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 /Users/carp/stan/mypkg2.Rcheck/mypkg2/libs/x86_64
** R
** preparing package for lazy loading
** help
Warning: /Users/carp/stan/mypkg2/man/mypkg2-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
R(2493) malloc: *** error for object 0x7fff704bd500: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
sh: line 1: 2493 Abort trap
'/Library/Frameworks/R.framework/Resources/bin/R' --arch=x86_64
--no-save --slave <
/var/folders/ju/juD0VflHENew03RUV+bbPU+++TM/-Tmp-//RtmpEs9sCx/file971c5161ca
ERROR: loading failed for ?x86_64?
* removing ?/Users/carp/stan/mypkg2.Rcheck/mypkg2?
Any clues as to what's going on would be greatly appreciated.
Thanks.
- Bob Carpenter
Columbia University, Deptartment of Statistics
[Rcpp-devel] R CMD check failing on skeletonc Rcpp module
10 messages · Bob Carpenter, Michael Hannon, Dirk Eddelbuettel +1 more
Bob, Thanks for the detailed email.
On 23 March 2012 at 15:42, Bob Carpenter wrote:
| With latest Rcpp (0.9.10) and latest R (2.14.2),
| I generated an Rcpp module skeleton, but it
| blows up with a memory error "pointer being freed was not
| allocated" when I run "R CMD check" for x86_64.
|
| An Rcpp skeleton created with module=FALSE works just fine.
|
| Here's what I did step-by-step:
|
| 1. Updated R to 2.14.2
|
| 2. Fired up 64-bit R
|
| ~/stan> R
|
| R version 2.14.2 (2012-02-29)
| Copyright (C) 2012 The R Foundation for Statistical Computing
| ISBN 3-900051-07-0
| Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
|
|
| 3. Installed Rcpp
|
| R> setwd('stan')
| R> install.packages('Rcpp')
| --- Please select a CRAN mirror for use in this session ---
| trying URL
| 'http://cran.at.r-project.org/bin/macosx/leopard/contrib/2.14/Rcpp_0.9.10.tgz'
| Content type 'application/x-gzip' length 7636884 bytes (7.3 Mb)
| opened URL
| ==================================================
| downloaded 7.3 Mb
|
|
| 4. Generated a package skeleton with module=TRUE
|
| R> Rcpp.package.skeleton(name='mypkg2',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 './mypkg2/Read-and-delete-me'.
|
|
| 5. Built the package
|
| ~/stan> R CMD build mypkg2
| * checking for file ?mypkg2/DESCRIPTION? ... OK
| * preparing ?mypkg2?:
| * checking DESCRIPTION meta-information ... OK
| * cleaning src
| * checking for LF line-endings in source and make files
| * checking for empty or unneeded directories
| * building ?mypkg2_1.0.tar.gz?
|
|
| 6. Check the package
|
| ~/stan> R CMD check mypkg2
| * using log directory ?/Users/carp/stan/mypkg2.Rcheck?
| * using R version 2.14.2 (2012-02-29)
| * using platform: x86_64-apple-darwin9.8.0 (64-bit)
| * using session charset: UTF-8
| * checking for file ?mypkg2/DESCRIPTION? ... OK
| * checking extension type ... Package
| * this is package ?mypkg2? version ?1.0?
| * checking package namespace information ... OK
| * checking package dependencies ... OK
| * checking if this is a source package ... OK
| * checking if there is a namespace ... OK
| * checking for executable files ... OK
| * checking whether package ?mypkg2? can be installed ... ERROR
| Installation failed.
| See ?/Users/carp/stan/mypkg2.Rcheck/00install.out? for details.
Works for me with R 2.14.2 on 64-bit Linux:
edd at max:/tmp$ R CMD build mypkg2/
R CMD build mypkg2/
* checking for file ?mypkg2/DESCRIPTION? ... OK
* preparing ?mypkg2?:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building ?mypkg2_1.0.tar.gz?
edd at max:/tmp$ R CMD check mypkg2_1.0.tar.gz
R CMD check mypkg2_1.0.tar.gz
* using log directory ?/tmp/mypkg2.Rcheck?
* using R version 2.14.2 (2012-02-29)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* checking for file ?mypkg2/DESCRIPTION? ... OK
* checking extension type ... Package
* this is package ?mypkg2? version ?1.0?
* checking CRAN incoming feasibility ... NOTE
Non-FOSS package license (What Licence is it under ?)
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking whether package ?mypkg2? can be installed ... WARNING
Found the following significant warnings:
Warning: /tmp/mypkg2.Rcheck/00_pkg_src/mypkg2/man/mypkg2-package.Rd:31: All text must be in a section
See ?/tmp/mypkg2.Rcheck/00install.out? for details.
* checking installed package size ... OK
* checking package directory ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking DESCRIPTION meta-information ... WARNING
Non-standard license specification:
What Licence is it under ?
Standardizable: FALSE
* checking top-level files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking for unstated dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... NOTE
File ?mypkg2/R/zzz.R?:
.onLoad calls:
require("methods", character = TRUE, quietly = TRUE)
Package startup functions should not change the search path.
See section ?Good practice? in ?.onAttach.
.onLoad: warning in require("methods", character = TRUE, quietly =
TRUE): partial argument match of 'character' to 'character.only'
* checking Rd files ... WARNING
prepare_Rd: mypkg2-package.Rd:31: All text must be in a section
prepare_Rd: mypkg2-package.Rd:37-39: Dropping empty section \examples
* checking Rd metadata ... OK
* checking Rd cross-references ... WARNING
Unknown package(s) ?<pkg>? in Rd xrefs
* checking for missing documentation entries ... WARNING
Undocumented code objects:
?World? ?bar? ?bla? ?bla1? ?bla2? ?foo? ?hello?
All user-level objects in a package should have documentation entries.
See the chapter ?Writing R documentation files? in the ?Writing R Extensions? manual.
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking for portable compilation flags in Makevars ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking compiled code ... OK
* checking examples ... OK
* checking PDF version of manual ... OK
WARNING: There were 5 warnings, see
?/tmp/mypkg2.Rcheck/00check.log?
for details
edd at max:/tmp$
Regards, Dirk
|
|
| 7. Look at the error log
|
| ~/stan> cat /Users/carp/stan/mypkg2.Rcheck/00install.out
| * installing *source* package ?mypkg2? ...
| ** libs
| *** arch - i386
| 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 mypkg2.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
| ld: warning: in /usr/local/lib/libstdc++.dylib, file was built for
| unsupported file format which is not the architecture being linked (i386)
| installing to /Users/carp/stan/mypkg2.Rcheck/mypkg2/libs/i386
| *** arch - x86_64
| 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 mypkg2.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 /Users/carp/stan/mypkg2.Rcheck/mypkg2/libs/x86_64
| ** R
| ** preparing package for lazy loading
| ** help
| Warning: /Users/carp/stan/mypkg2/man/mypkg2-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
| R(2493) malloc: *** error for object 0x7fff704bd500: pointer being freed
| was not allocated
| *** set a breakpoint in malloc_error_break to debug
| sh: line 1: 2493 Abort trap
| '/Library/Frameworks/R.framework/Resources/bin/R' --arch=x86_64
| --no-save --slave <
| /var/folders/ju/juD0VflHENew03RUV+bbPU+++TM/-Tmp-//RtmpEs9sCx/file971c5161ca
| ERROR: loading failed for ?x86_64?
| * removing ?/Users/carp/stan/mypkg2.Rcheck/mypkg2?
|
|
|
| Any clues as to what's going on would be greatly appreciated.
I do not have an OS X machine, so I can't test this and do anything further,
I am afraid.
Try submitting it to win-builder.r-project.org which would throw another 64
bit compiler in the mix. We have had our share of issue with the older /
deprecated g++ version on OS X so this could be related.
Dirk
| Thanks.
|
| - Bob Carpenter
| Columbia University, Deptartment of Statistics
|
|
| _______________________________________________
| 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
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too dark to read." -- Groucho Marx
From: Dirk Eddelbuettel <edd at debian.org>
. . .
I do not have an OS X machine, so I can't test this and do anything further, I am afraid.
Try submitting it to win-builder.r-project.org which would throw another 64 bit compiler in the mix.? We have had our share of issue with the older / deprecated g++ version on OS X so this could be related.
I don't know if this is relevant, but locally we had occasion to install the g++ compiler for MacOS from fink: ??? http://www.finkproject.org/ This was because there was some complication (don't recall details) in getting the new Xcode installed on the Mac in question. The version of g++ from fink installs as "g++-4" (to keep it orthogonal to the one from Xcode): ? $ g++-4 --version ? g++-4 (GCC) 4.6.2 ? Copyright (C) 2011 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. My point is that if the problem in question DOES stem from the use of an old version of g++, it's a problem that might be relatively easy to fix.? Of course, downloading the full Xcode stuff from Apple would also fix the problem. -- Mike
Bob, It also seems to work on Windows with its 64 bit OS: http://win-builder.r-project.org/2X53RuEwPD1U/ (I renamed mypkg2 to simpleTest in the few required instances, and put my name in for Author and Maintainer to get the email.) Dirk
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too dark to read." -- Groucho Marx
Bob, which version of OS X and g++ do you have? I had no problems running your example on Lion. But with that release I had to install Rcpp from source, while your transcript indicates a binary version of the package was installed, so you must be using either Leopard or Snow Leopard. The version of g++ is also important. I wonder why we see the following line in the log: ld: warning: in /usr/local/lib/libstdc++.dylib, file was built for unsupported file format which is not the architecture being linked (i386) I doubt that's the cause of the crash, because the loading fails for you for the 64-bit version of the package, not 32-bit, but still, something is off with your toolchain.
Michael Hannon wrote:
My point is that if the problem in question DOES stem from the use of an old version of g++, it's a problem that might be relatively easy to fix.? Of course, downloading the full Xcode stuff from Apple would also fix the problem.
The problem with XCode is that release 4, which you need with Mac Lion, is only available through the App store. It also does not include GCC but llvm-gcc, which some people have had problems with. It's easiest to just go with the GCC that the R team makes available at http://r.research.att.com/tools/ Davor
Davor, Thanks for the follow-up!
On 23 March 2012 at 16:45, Davor Cubranic wrote:
| Bob, which version of OS X and g++ do you have? | | I had no problems running your example on Lion. But with that release | I had to install Rcpp from source, while your transcript indicates a | binary version of the package was installed, so you must be using | either Leopard or Snow Leopard. Oh I missed that. Rcpp is from source generally makes a difference. | The version of g++ is also important. I wonder why we see the | following line in the log: | ld: warning: in /usr/local/lib/libstdc++.dylib, file was built for | unsupported file format which is not the architecture being linked (i386) | | I doubt that's the cause of the crash, because the loading fails for | you for the 64-bit version of the package, not 32-bit, but still, | something is off with your toolchain. I noticed that too but couldn't quite frame a good response for lack of familiary with OS X.
| Michael Hannon wrote:
| > My point is that if the problem in question DOES stem from the use of an old | > version of g++, it's a problem that might be relatively easy to fix.? Of | > course, downloading the full Xcode stuff from Apple would also fix the | > problem. | | The problem with XCode is that release 4, which you need with Mac | Lion, is only available through the App store. It also does not | include GCC but llvm-gcc, which some people have had problems with. | It's easiest to just go with the GCC that the R team makes available | at http://r.research.att.com/tools/ Simon to the rescue... Dirk
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too dark to read." -- Groucho Marx
On 23 March 2012 at 13:53, Michael Hannon wrote:
| I don't know if this is relevant, but locally we had occasion to install the | g++ compiler for MacOS from fink: | | ??? http://www.finkproject.org/ | | This was because there was some complication (don't recall details) in getting | the new Xcode installed on the Mac in question. | | The version of g++ from fink installs as "g++-4" (to keep it orthogonal to the | one from Xcode): | | ? $ g++-4 --version | ? g++-4 (GCC) 4.6.2 | ? Copyright (C) 2011 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. | | My point is that if the problem in question DOES stem from the use of an old | version of g++, it's a problem that might be relatively easy to fix.? Of | course, downloading the full Xcode stuff from Apple would also fix the | problem. It would be good if we had a little bit of consensus here among the OS X cogniscenti so that I could add something to the Rcpp FAQ. So what is the best way to get a decent C++ compiler on OS X for R and Rcpp ? Dirk
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too dark to read." -- Groucho Marx
On Saturday, March 24, 2012 10:46 AM, Dirk Eddelbuettel wrote:
On 23 March 2012 at 13:53, Michael Hannon wrote: | I don't know if this is relevant, but locally we had occasion to install the | g++ compiler for MacOS from fink: | |???? http://www.finkproject.org/ | | This was because there was some complication (don't recall details) in | getting the new Xcode installed on the Mac in question. | | The version of g++ from fink installs as "g++-4" (to keep it orthogonal to | the one from Xcode): | |?? $ g++-4 --version |?? g++-4 (GCC) 4.6.2 |?? Copyright (C) 2011 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 | | My point is that if the problem in question DOES stem from the use of an old | version of g++, it's a problem that might be relatively easy to fix.? Of | course, downloading the full Xcode stuff from Apple would also fix the | problem. It would be good if we had a little bit of consensus here among the OS X cogniscenti so that I could add something to the Rcpp FAQ. So what is the best way to get a decent C++ compiler on OS X for R and Rcpp ?
As I seem to be partly responsible for this thread, I feel obliged to contribute a few more, unenlightening remarks before bowing out. First, I'm definitely NOT an OS X cognoscente.? I'm a linux guy that gets dragged in to helping with Mac OS X issues. I have recommended and installed Apple's Xcode, but I have reservations about it.? I don't seem to be able to get a consistent view of it.? Some versions are free but require an upgrade to the latest version of the OS.? Or the same version is free if you sign up (for a cost) to be a developer for iOS.? Or maybe the same version is completely free if you sign up -- for free -- to be a Safari developer.? And the compiler suite is or is not gcc, depending on version.? I've probably garbled some of this. I used software from the Fink project some time ago, when I was a bit more involved with Mac OS, so I turned to it again to solve the problem to which I alluded in my original message.? It's also mildly reassuring to me that you can use "apt" to install, etc., software from the Fink project, although you're not required to do so. I thought that the page to which Davor referred was interesting: ??? http://r.research.att.com/tools/ But I didn't see any combination of {Xcode, contributed tools} on that page that would get a really recent version of g++, which may be a significant issue for some people. -- Mike
1 day later
My experience is similar to Michael's: I'm a Linux guy who started using a Mac at work a few years ago, but still feel far more comfortable in the Debian/Ubuntu world. I would second his assessment of the OS X toolchain: 1. the OS version you're using will determine your toolchain options 2. some toolchains are easier/"freer" to install than others Things were very quite simple with Snow Leopard (OS X 10.6): XCode (v3.x) was available on Apple's website with no registration or charge, and it included the standard GCC toolchain, alongside with Clang/LLVM compiler. (Clang is an independent project to implement a brand new C++ compiler for the LLVM optimizing backend. GCC has been around forever and while it works very well, it's also become quite difficult to extend and debug, or at least that's the story I heard.) Lion made a bit of a mess: XCode v4 is no longer so easy to get because downloading it requires either a Mac App store login or a $100/yr registration in the Apple developer program (the Safari developer option is news to me). Furthermore, Apple decided to remove GCC, perhaps because of issues it has with the new GPL3 license, but it still (for now) includes pieces of it (its "gcc" and "g++" are really GNU's compiler frontend and LLVM backend). The "real" GCC is easy to install from several different locations, Michael gave a few alternatives in the past. The reason why we keep talking about GCC vs. LLVM at all is because of compile/linking errors people occasionally run into with Rcpp and RcppArmadillo with LLVM/clang. It isn't clear exactly which exact compiler versions are at issue, however, because it all now works fine for me with XCode's llvm-gcc 4.2.1 (Apple build 5658), whereas it was failing with one from MacPorts a few months ago. I do stand corrected on GCC from the R project: as Michael pointed out, it's intended to be installed alongside XCode v4 and so doesn't include the linker, for example. FWIW, I haven't had any problems with XCode toolchain on either OS X release, but the new barriers to getting it on Lion really put me off and are the main reason why I'm not upgrading my machine any time soon. Davor At Sat, 24 Mar 2012 14:54:10 -0700 (PDT),
Michael Hannon wrote:
As I seem to be partly responsible for this thread, I feel obliged to contribute a few more, unenlightening remarks before bowing out. First, I'm definitely NOT an OS X cognoscente.? I'm a linux guy that gets dragged in to helping with Mac OS X issues. I have recommended and installed Apple's Xcode, but I have reservations about it.? I don't seem to be able to get a consistent view of it.? Some versions are free but require an upgrade to the latest version of the OS.? Or the same version is free if you sign up (for a cost) to be a developer for iOS.? Or maybe the same version is completely free if you sign up -- for free -- to be a Safari developer.? And the compiler suite is or is not gcc, depending on version.? I've probably garbled some of this. I used software from the Fink project some time ago, when I was a bit more involved with Mac OS, so I turned to it again to solve the problem to which I alluded in my original message.? It's also mildly reassuring to me that you can use "apt" to install, etc., software from the Fink project, although you're not required to do so. I thought that the page to which Davor referred was interesting: ??? http://r.research.att.com/tools/ But I didn't see any combination of {Xcode, contributed tools} on that page that would get a really recent version of g++, which may be a significant issue for some people. -- Mike
_______________________________________________ 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
2 days later
Just to bring a little bit of closure to this: I circled back with Bob, and this appears to be a local issue with the machine in question as the simple test of "build a skeleton package using Modules" leads to a buildable package on another machine. Dirk
R/Finance 2012 Conference on May 11 and 12, 2012 at UIC in Chicago, IL See agenda, registration details and more at http://www.RinFinance.com