Dear MacRooters
For testing purposes I have created a library containing a class MyClassA:public TNamed
and methods to create/open a root file and methods to write/read trees.
This library compiles and works well both on FC4 and on my Intel-MacBook Pro.
However, the reason for creating this test library is that I want to call MyClassA
and the corresponding methods from within R, which I have downloaded from: cran.r-project.org/
The binary for the Mac, R-2.4.1.dmg installs its own version GNU gcc 4.0.3, since there
seem to be problems with the current Apple compiler gcc 4.0.1.
While I have succeeded compiling my package for FC4 and running it from within R,
trying to compile it on the Intel-Mac results in the following error:
m3415p019:/Volumes/CoreData/CRAN rabbitus$ tar czf myclassR1_0.1.1.tar.gz myclassR1
m3415p019:/Volumes/CoreData/CRAN rabbitus$ R_ARCH=/i386 R CMD INSTALL -l ~/Library/R/library myclassR1_0.1.1.tar.gz
* Installing *source* package 'myclassR1' ...
** libs
** arch - i386
c++ -O2 -pipe -Wall -W -Woverloaded-virtual -D_REENTRANT -Wno-long-double -I/Volumes/CoreData/ROOT/root/include -c MyClassC.cxx
cc1plus: error: unrecognized command line option "-Wno-long-double"
make: *** [MyClassC.o] Error 1
ERROR: compilation failed for package 'myclassR1'
** Removing '/Users/rabbitus/Library/R/library/myclassR1'
In order to test if I can avoid this error, I have disabled in “root-config” the line:
auxcflags="-Wno-long-double"
Interestingly, now I can compile and run my package from within R w/o problems.
My questions are now:
- Why is this command line option used for macosx?
- Should not gcc 4.0.3 also recognize this option?
- Is it possible to disable this line permannently in the root distribution?
Thank you in advance.
Best regards
Christian