[R-SIG-Mac] r_arch

Kasper Daniel Hansen khansen at stat.Berkeley.EDU
Thu Jun 14 19:29:51 CEST 2007


Hi

I am using the CRAN binary of R-2.5.0 together with the supplied  
gfortran and the latest Xcode on a PPC mac running OS X 10.4.9. In my  
~/.profile I have
   export R_ARCH=/ppc

It seems as if the default of R nowadays is to build universal  
binaries of packages. At least when I try to install a source package  
on my PPC system, it starts by stating
** arch - i386
and then calls g++-4.0 with "-arch i386" (this is for a package  
containing C++ code). Later on it says
** arch - ppc
and then calls g++-4.0 with "-arch ppc".

I now have a couple of questions:

1) How do I make R only compile the ppc binaries - there is not much  
use for doing the i386 compilation when I install it on my powerbook  
and since it is slow at compiling, I would like to avoid this  
(especially in package development). I have (as stated above) set  
R_ARCH (perhaps wrongly) and have also tried with a
   R --arch=ppc CMD INSTALL
as per R-admin. And can I get that setting "stored" somewhere - it  
seems as if the default build for the CRAN binary is for the i386  
achitecture.

2) I am also the maintainer of the Bioconductor package affxparser.  
That package has subdirectory of the /src directory containing an  
entire SDK. In the /src directory we have a Makevars file containing  
additional targets so that the SDK files (in /src/fusion_sdk and  
subdirectories) gets compiled. This used to work. But these days, if  
I compile the package under PPC, it only compiles everything in /src/ 
fusion_sdk with -arch i386. The additional PPC run only compiles the  
files in /src. This means of course that the package does not work  
under PPC. I assume I will need to do some additional magic in our  
Makevars file, but I have no idea what. I have added our current  
Makevars file below. The problem with this is also in the BioC  
binaries from Simon's website, which installs fine but bails out with  
an error when I do
R> library(affxparser)

Any ideas?

Kasper

all: $(SHLIB)

MYCXXFLAGS=-O0

%.o: %.cpp
         $(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) $(MYCXXFLAGS) -c $< - 
o $@

PKG_CPPFLAGS=\
-imacros R_affx_constants.h\
-Ifusion_sdk/calvin_files/array/src\
-Ifusion_sdk/calvin_files/data/src\
-Ifusion_sdk/calvin_files/exception/src\
-Ifusion_sdk/calvin_files/fusion/src\
-Ifusion_sdk/calvin_files/fusion/src/GCOSAdapter\
-Ifusion_sdk/calvin_files/fusion/src/CalvinAdapter\
-Ifusion_sdk/calvin_files/parameter/src\
-Ifusion_sdk/calvin_files/parsers/src\
-Ifusion_sdk/calvin_files/portability/src\
-Ifusion_sdk/calvin_files/template/src\
-Ifusion_sdk/calvin_files/utils/src\
-Ifusion_sdk/calvin_files/writers/src\
-Ifusion_sdk/file\
-Ifusion_sdk/portability\
-D_USE_MEM_MAPPING_

SOURCES.fusion = \
         fusion_sdk/calvin_files/data/src/CDFData.cpp\
         fusion_sdk/calvin_files/data/src/CDFProbeGroupInformation.cpp\
         fusion_sdk/calvin_files/data/src/CDFProbeInformation.cpp\
         fusion_sdk/calvin_files/data/src/CDFProbeSetInformation.cpp\
         fusion_sdk/calvin_files/data/src/CDFQCProbeInformation.cpp\
         fusion_sdk/calvin_files/data/src/CDFQCProbeSetInformation.cpp\
         fusion_sdk/calvin_files/data/src/CELData.cpp\
         fusion_sdk/calvin_files/data/src/DataGroup.cpp\
         fusion_sdk/calvin_files/data/src/DataGroupHeader.cpp\
         fusion_sdk/calvin_files/data/src/DataSet.cpp\
         fusion_sdk/calvin_files/data/src/DataSetHeader.cpp\
         fusion_sdk/calvin_files/data/src/FileHeader.cpp\
         fusion_sdk/calvin_files/data/src/GenericData.cpp\
         fusion_sdk/calvin_files/data/src/GenericDataHeader.cpp\
         fusion_sdk/calvin_files/exception/src/ExceptionBase.cpp\
         fusion_sdk/calvin_files/fusion/src/CalvinAdapter/ 
CalvinCELDataAdapter.cpp\
         fusion_sdk/calvin_files/fusion/src/FusionBPMAPData.cpp\
         fusion_sdk/calvin_files/fusion/src/FusionCDFData.cpp\
         fusion_sdk/calvin_files/fusion/src/ 
FusionCDFQCProbeSetNames.cpp\
         fusion_sdk/calvin_files/fusion/src/FusionCELData.cpp\
         fusion_sdk/calvin_files/fusion/src/GCOSAdapter/ 
GCOSCELDataAdapter.cpp\
         fusion_sdk/calvin_files/parameter/src/ 
ParameterNameValueType.cpp\
         fusion_sdk/calvin_files/parsers/src/CDFFileReader.cpp\
         fusion_sdk/calvin_files/parsers/src/CelFileReader.cpp\
         fusion_sdk/calvin_files/data/src/DataGroup.cpp\
         fusion_sdk/calvin_files/data/src/DataGroupHeader.cpp\
         fusion_sdk/calvin_files/data/src/DataSet.cpp\
         fusion_sdk/calvin_files/data/src/DataSetHeader.cpp\
         fusion_sdk/calvin_files/data/src/FileHeader.cpp\
         fusion_sdk/calvin_files/data/src/GenericData.cpp\
         fusion_sdk/calvin_files/data/src/GenericDataHeader.cpp\
         fusion_sdk/calvin_files/exception/src/ExceptionBase.cpp\
         fusion_sdk/calvin_files/fusion/src/CalvinAdapter/ 
CalvinCELDataAdapter.cpp\
         fusion_sdk/calvin_files/fusion/src/FusionBPMAPData.cpp\
         fusion_sdk/calvin_files/fusion/src/FusionCDFData.cpp\
         fusion_sdk/calvin_files/fusion/src/ 
FusionCDFQCProbeSetNames.cpp\
         fusion_sdk/calvin_files/fusion/src/FusionCELData.cpp\
         fusion_sdk/calvin_files/fusion/src/GCOSAdapter/ 
GCOSCELDataAdapter.cpp\
         fusion_sdk/calvin_files/parameter/src/ 
ParameterNameValueType.cpp\
         fusion_sdk/calvin_files/parsers/src/CDFFileReader.cpp\
         fusion_sdk/calvin_files/parsers/src/CelFileReader.cpp\
         fusion_sdk/calvin_files/parsers/src/DataGroupHeaderReader.cpp\
         fusion_sdk/calvin_files/parsers/src/DataGroupReader.cpp\
         fusion_sdk/calvin_files/parsers/src/DataSetHeaderReader.cpp\
         fusion_sdk/calvin_files/parsers/src/DataSetReader.cpp\
         fusion_sdk/calvin_files/parsers/src/FileHeaderReader.cpp\
         fusion_sdk/calvin_files/parsers/src/FileInput.cpp\
         fusion_sdk/calvin_files/parsers/src/ 
GenericDataHeaderReader.cpp\
         fusion_sdk/calvin_files/parsers/src/GenericFileReader.cpp\
         fusion_sdk/calvin_files/utils/src/AffymetrixGuid.cpp\
         fusion_sdk/calvin_files/utils/src/DateTime.cpp\
         fusion_sdk/calvin_files/utils/src/FileUtils.cpp\
         fusion_sdk/calvin_files/utils/src/StringUtils.cpp\
         fusion_sdk/calvin_files/utils/src/checksum.cpp\
         fusion_sdk/file/BPMAPFileData.cpp\
         fusion_sdk/file/BPMAPFileWriter.cpp\
         fusion_sdk/file/CDFFileData.cpp\
         fusion_sdk/file/CELFileData.cpp\        fusion_sdk/file/ 
FileIO.cpp\
         fusion_sdk/file/FileWriter.cpp

SOURCES.package = \
         R_affx_cel_parser.cpp\
         R_affx_cdf_parser.cpp\
         R_affx_cdf_extras.cpp\
         R_affx_bpmap_parser.cpp

OBJS=$(SOURCES.fusion:.cpp=.o) $(SOURCES.package:.cpp=.o)



More information about the R-SIG-Mac mailing list