[Rd] Problem using ofstream in C++ class in package for MacOS X

cstrato cstrato at aon.at
Fri Feb 9 17:11:33 CET 2007


Dear Ross

Thank you  for this clarification, maybe there is something 
misconfigured on my Intel-Mac.
BTW, I have now upgraded to XCode 2.4.1 from 2.4, but the result remains 
the same.

I don´t know if this could help clarify what might be wrong, but I am 
not able to compile
plier, a simple package containing an R-wrapper around Affymetrix C++ 
plier code.
This is the output I get when trying to compile plier:

m3450p027:/Volumes/CoreData/CRAN/Bioconductor/packages rabbitus$ 
R_ARCH=/i386 R CMD INSTALL -l ~/Library/R/library plier_1.4.0.tar.gz
* Installing *source* package 'plier' ...
** libs
** arch - i386
g++-4.0 -arch i386 -I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/i386  -msse3    
-fPIC  -g -O2 -march=nocona -c affyplier.cpp -o affyplier.o
/Volumes/CoreData/temp/cc3VRxb1.s:4750:indirect jmp without `*'
/Volumes/CoreData/temp/cc3VRxb1.s:4769:indirect jmp without `*'
/Volumes/CoreData/temp/cc3VRxb1.s:4784:indirect jmp without `*'
/Volumes/CoreData/temp/cc3VRxb1.s:4799:indirect jmp without `*'
/Volumes/CoreData/temp/cc3VRxb1.s:4818:indirect jmp without `*'
/Volumes/CoreData/temp/cc3VRxb1.s:4833:indirect jmp without `*'
g++-4.0 -arch i386 -I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/i386  -msse3    
-fPIC  -g -O2 -march=nocona -c plier_impl.cpp -o plier_impl.o
/Volumes/CoreData/temp/ccLq6FYI.s:554:indirect jmp without `*'
/Volumes/CoreData/temp/ccLq6FYI.s:569:indirect jmp without `*'
/Volumes/CoreData/temp/ccLq6FYI.s:584:indirect jmp without `*'
/Volumes/CoreData/temp/ccLq6FYI.s:599:indirect jmp without `*'
/Volumes/CoreData/temp/ccLq6FYI.s:618:indirect jmp without `*'
g++-4.0 -arch i386 -I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/i386  -msse3    
-fPIC  -g -O2 -march=nocona -c plieralg.cpp -o plieralg.o
plieralg.cpp:30:20: error: malloc.h: No such file or directory
make: *** [plieralg.o] Error 1
chmod: /Users/rabbitus/Library/R/library/plier/libs/i386/*: No such file 
or directory
** arch - ppc
g++-4.0 -arch ppc -I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/ppc  
-I/usr/local/include    -fPIC  -g -O2 -c affyplier.cpp -o affyplier.o
g++-4.0 -arch ppc -I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/ppc  
-I/usr/local/include    -fPIC  -g -O2 -c plier_impl.cpp -o plier_impl.o
g++-4.0 -arch ppc -I/Library/Frameworks/R.framework/Resources/include 
-I/Library/Frameworks/R.framework/Resources/include/ppc  
-I/usr/local/include    -fPIC  -g -O2 -c plieralg.cpp -o plieralg.o
plieralg.cpp:30:20: error: malloc.h: No such file or directory
make: *** [plieralg.o] Error 1
chmod: /Users/rabbitus/Library/R/library/plier/libs/ppc/*: No such file 
or directory
ERROR: compilation failed for package 'plier'
** Removing '/Users/rabbitus/Library/R/library/plier

In any case, the problem seems to be R-specific, since the same code for 
my package MyClass
runs fine, when compiled as a shared library and called from other C++ code.

BTW, since I do not have an url, I would like to attach my package, so 
that people could try it.
In my initial mailing I have attached my package as 
MyClass_0.1.2.tar.gz, but it got scrambled
as 
https://stat.ethz.ch/pipermail/r-devel/attachments/20070204/2e7fb79c/attachment.gz 

Is there a possibility to attach it in a way so that people can use it?

Thank you
Best regards
Christian



More information about the R-devel mailing list