Re: [R-SIG-Mac] Which gfortran for Leopard?
Dear Simon, Meanwhile I have tried to install xps: $ R CMD INSTALL -l ~/Library/R/2.10/library xps_1.7.4.tar.gz * installing *source* package 'xps' ... checking for gcc... gcc-4.2 -arch i386 -std=gnu99 checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc-4.2 -arch i386 -std=gnu99 accepts -g... yes checking for gcc-4.2 -arch i386 -std=gnu99 option to accept ANSI C... none needed checking how to run the C preprocessor... gcc-4.2 -arch i386 -std=gnu99 -E checking for gcc... (cached) gcc-4.2 -arch i386 -std=gnu99 checking whether we are using the GNU C compiler... (cached) yes checking whether gcc-4.2 -arch i386 -std=gnu99 accepts -g... (cached) yes checking for gcc-4.2 -arch i386 -std=gnu99 option to accept ANSI C... (cached) none needed found ROOT version 5.24/00 in directory /Users/rabbitus/ROOT/root ** libs ** arch - i386 As you can see it compiles using the wrong architecture: library(xps) Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/Users/rabbitus/Library/R/2.10/library/xps/libs/i386/xps.so': dlopen(/Users/rabbitus/Library/R/2.10/library/xps/libs/i386/xps.so, 6): no suitable image found. Did find: /Users/rabbitus/Library/R/2.10/library/xps/libs/i386/xps.so: mach-o, but wrong architecture Error: package/namespace load failed for 'xps' In my file config.in I have the following lines: # See Writing R Extensions : ${R_HOME=`R RHOME`} if test -z ${R_HOME}; then echo could not determine R_HOME exit 1 fi CC=`${R_HOME}/bin/R CMD config CC` CFLAGS=`${R_HOME}/bin/R CMD config CFLAGS` AC_PROG_CPP AC_PROG_CC Thus I assume that I need to use 64 bit R so that the flags are set correctly. Is this correct? If yes, can I use: http://r.research.att.com/R-GUI-5548-2.10-leopard-Leopard64.dmg or do I need to build 64 bit R from source? Best regards Christian Simon Urbanek wrote: On Jan 25, 2010, at 5:34 PM, cstrato wrote: Dear Simon, Thank you, with this version I could finally compile ROOT as 64 bit. Now I have one more question: When I do R CMD Install xps.tar.gz which now depends on 64 bit ROOT, do I need to install the 64 bit version of R or can I use the current R version? I have no idea since I don't know your package. If you *link* to ROOT then yes, you have to use 64-bit R to load 64-bit code. (Linking in itself can be quite interesting given the flags ROOT uses, so your journey may not end there ;)). Cheers, Simon Best regards Christian Simon Urbanek wrote: On Jan 25, 2010, at 15:03 , cstrato wrote: Dear Simon, Thank you for your suggestions, which I have just tried. Sadly the error remains the same. The problem seems to be that for some reason gfortran-4.2-5564-darwin9.tar.gz does not have a /usr/lib/gcc/i686-apple-darwin9/4.2.1/x86_64 directory containing libgfortranbegin.a. For this reason the 64 bit version of libgfortranbegin.a is not installed in the corresponding directory x86_64 which contains only libgcc.a etc. Oh ... that's a surprise - it should be there, sorry. Ok, so please use the more recent 5566 build: http://r.research.att.com/tools/gfortran-4.2-5566-darwin9.tar.gz that one has the x86_64 files - I checked: ginaz:~$ curl -s -S http://r.research.att.com/tools/gfortran-4.2-5566-darwin9.tar.gz | tar fvtz - | grep gfortran.a -rw-r--r-- root/wheel 3592608 2008-12-24 14:51:33 usr/lib/gcc/i686-apple-darwin9/4.2.1/libgfortran.a -rw-r--r-- root/wheel 3870032 2008-12-24 14:51:33 usr/lib/gcc/powerpc-apple-darwin9/4.2.1/libgfortran.a -rw-r--r-- root/wheel 5002152 2008-12-24 14:51:33 usr/lib/gcc/i686-apple-darwin9/4.2.1/x86_64/libgfortran.a (Ideally you should install Xcode 3.1.2 for this since that is where the 5566 build comes from, but it will probably work even if the builds don't match perfectly). Cheers, Simon You can see this by double-clicking on gfortran-4.2-5564-darwin9.tar.gz when located in some directory. In contrast, gfortran-4.2.3.dmg did install libgfortranbegin.a in the /usr/local/lib/gcc/i686-apple-darwin9/4.2.1/x86_64 directory. Could you please check or tell me what the reason might be? I have installed it using: $ gunzip gfortran-4.2-5564-darwin9.tar.gz $ sudo tar -xvf gfortran-4.2-5564-darwin9.tar -C / Best regards Christian Simon Urbanek wrote: On Jan 24, 2010, at 3:28 PM, cstrato wrote: Dear Kasper, You are right. Since ROOT supports the CC, CXX, F77 and LD flags I did: ./configure macosx64 --with-cxx=/usr/bin/g++-4.2 -arch x86_64 --with-f77=/usr/bin/gfortran-4.2 -arch x86_64 You don't really need the override - it works without and they add -m64 anyway so the -arch gets essentially ignored. The error was still the
Re: [R-SIG-Mac] Which gfortran for Leopard?
On Jan 26, 2010, at 15:24 , cstrato wrote: Dear Simon, Meanwhile I have tried to install xps: $ R CMD INSTALL -l ~/Library/R/2.10/library xps_1.7.4.tar.gz * installing *source* package 'xps' ... checking for gcc... gcc-4.2 -arch i386 -std=gnu99 checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc-4.2 -arch i386 -std=gnu99 accepts -g... yes checking for gcc-4.2 -arch i386 -std=gnu99 option to accept ANSI C... none needed checking how to run the C preprocessor... gcc-4.2 -arch i386 - std=gnu99 -E checking for gcc... (cached) gcc-4.2 -arch i386 -std=gnu99 checking whether we are using the GNU C compiler... (cached) yes checking whether gcc-4.2 -arch i386 -std=gnu99 accepts -g... (cached) yes checking for gcc-4.2 -arch i386 -std=gnu99 option to accept ANSI C... (cached) none needed found ROOT version 5.24/00 in directory /Users/rabbitus/ROOT/root ** libs ** arch - i386 As you can see it compiles using the wrong architecture: Well, you're running the wrong architecture ... As I said when you want to link, you have to use 64-bit. library(xps) Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/Users/rabbitus/Library/R/2.10/ library/xps/libs/i386/xps.so': dlopen(/Users/rabbitus/Library/R/2.10/library/xps/libs/i386/xps.so, 6): no suitable image found. Did find: /Users/rabbitus/Library/R/2.10/library/xps/libs/i386/xps.so: mach-o, but wrong architecture Error: package/namespace load failed for 'xps' In my file config.in I have the following lines: # See Writing R Extensions : ${R_HOME=`R RHOME`} if test -z ${R_HOME}; then echo could not determine R_HOME exit 1 fi CC=`${R_HOME}/bin/R CMD config CC` CFLAGS=`${R_HOME}/bin/R CMD config CFLAGS` AC_PROG_CPP AC_PROG_CC Thus I assume that I need to use 64 bit R so that the flags are set correctly. Is this correct? You have to use 64-bit R if you want to link to a 64-bit program - as I said. If yes, can I use: http://r.research.att.com/R-GUI-5548-2.10-leopard-Leopard64.dmg or do I need to build 64 bit R from source? Neither - just pick it from CRAN - it's the first download in the list. Note that you still have to run 64-bit R -- e.g. R --arch=x86_64 Cheers, Simon Simon Urbanek wrote: On Jan 25, 2010, at 5:34 PM, cstrato wrote: Dear Simon, Thank you, with this version I could finally compile ROOT as 64 bit. Now I have one more question: When I do R CMD Install xps.tar.gz which now depends on 64 bit ROOT, do I need to install the 64 bit version of R or can I use the current R version? I have no idea since I don't know your package. If you *link* to ROOT then yes, you have to use 64-bit R to load 64-bit code. (Linking in itself can be quite interesting given the flags ROOT uses, so your journey may not end there ;)). Cheers, Simon Best regards Christian Simon Urbanek wrote: On Jan 25, 2010, at 15:03 , cstrato wrote: Dear Simon, Thank you for your suggestions, which I have just tried. Sadly the error remains the same. The problem seems to be that for some reason gfortran-4.2-5564- darwin9.tar.gz does not have a /usr/lib/gcc/i686-apple- darwin9/4.2.1/x86_64 directory containing libgfortranbegin.a. For this reason the 64 bit version of libgfortranbegin.a is not installed in the corresponding directory x86_64 which contains only libgcc.a etc. Oh ... that's a surprise - it should be there, sorry. Ok, so please use the more recent 5566 build: http://r.research.att.com/tools/gfortran-4.2-5566-darwin9.tar.gz that one has the x86_64 files - I checked: ginaz:~$ curl -s -S http://r.research.att.com/tools/gfortran-4.2-5566-darwin9.tar.gz | tar fvtz - | grep gfortran.a -rw-r--r-- root/wheel 3592608 2008-12-24 14:51:33 usr/lib/gcc/ i686-apple-darwin9/4.2.1/libgfortran.a -rw-r--r-- root/wheel 3870032 2008-12-24 14:51:33 usr/lib/gcc/ powerpc-apple-darwin9/4.2.1/libgfortran.a -rw-r--r-- root/wheel 5002152 2008-12-24 14:51:33 usr/lib/gcc/ i686-apple-darwin9/4.2.1/x86_64/libgfortran.a (Ideally you should install Xcode 3.1.2 for this since that is where the 5566 build comes from, but it will probably work even if the builds don't match perfectly). Cheers, Simon You can see this by double-clicking on gfortran-4.2-5564- darwin9.tar.gz when located in some directory. In contrast, gfortran-4.2.3.dmg did install libgfortranbegin.a in the /usr/local/lib/gcc/i686-apple-darwin9/4.2.1/x86_64 directory. Could you please check or tell me what the reason might be? I have installed it using: $ gunzip gfortran-4.2-5564-darwin9.tar.gz $ sudo tar -xvf gfortran-4.2-5564-darwin9.tar -C / Best regards Christian Simon Urbanek wrote: On Jan 24, 2010, at 3:28 PM, cstrato wrote:
Re: [R-SIG-Mac] Which gfortran for Leopard?
On Jan 26, 2010, at 15:24 PM, cstrato wrote: Dear Simon, Meanwhile I have tried to install xps: $ R CMD INSTALL -l ~/Library/R/2.10/library xps_1.7.4.tar.gz * installing *source* package 'xps' ... checking for gcc... gcc-4.2 -arch i386 -std=gnu99 checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc-4.2 -arch i386 -std=gnu99 accepts -g... yes checking for gcc-4.2 -arch i386 -std=gnu99 option to accept ANSI C... none needed checking how to run the C preprocessor... gcc-4.2 -arch i386 -std=gnu99 -E checking for gcc... (cached) gcc-4.2 -arch i386 -std=gnu99 checking whether we are using the GNU C compiler... (cached) yes checking whether gcc-4.2 -arch i386 -std=gnu99 accepts -g... (cached) yes checking for gcc-4.2 -arch i386 -std=gnu99 option to accept ANSI C... (cached) none needed found ROOT version 5.24/00 in directory /Users/rabbitus/ROOT/root ** libs ** arch - i386 As you can see it compiles using the wrong architecture: library(xps) Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/Users/rabbitus/Library/R/2.10/library/xps/libs/i386/xps.so': dlopen(/Users/rabbitus/Library/R/2.10/library/xps/libs/i386/xps.so, 6): no suitable image found. Did find: /Users/rabbitus/Library/R/2.10/library/xps/libs/i386/xps.so: mach-o, but wrong architecture Error: package/namespace load failed for 'xps' In my file config.in I have the following lines: # See Writing R Extensions : ${R_HOME=`R RHOME`} if test -z ${R_HOME}; then echo could not determine R_HOME exit 1 fi CC=`${R_HOME}/bin/R CMD config CC` CFLAGS=`${R_HOME}/bin/R CMD config CFLAGS` AC_PROG_CPP AC_PROG_CC Thus I assume that I need to use 64 bit R so that the flags are set correctly. Is this correct? This is probably because you are using the CRAN binary which is a universal binary. Specifically this means that it will try to compile the package for all architectures, which will fail because ROOT is only installed for one of the architectures. This will happen for any package with C code you install from source, try picking your favorite R package with C code (say, preprocessCore), set options(pkgType = source) and install it using biocLite. You will see several compilation runs. There are a hack to fix this, and there may be an official way to compile a package only for a specific architecture, which I don't know about. The hack: inside (this is for 2.11) /Library/Frameworks/R.framework/Versions/2.11/Resources/bin/exec/ you will see a list of subdirectories describing what architecture you have R compiled for. If you remove all the other architectures aside from x86_64 it might work. This might mess up your R.app though. Alternatively you could compile R from source, only for one architecture. This is what I do. Kasper If yes, can I use: http://r.research.att.com/R-GUI-5548-2.10-leopard-Leopard64.dmg or do I need to build 64 bit R from source? Best regards Christian Simon Urbanek wrote: On Jan 25, 2010, at 5:34 PM, cstrato wrote: Dear Simon, Thank you, with this version I could finally compile ROOT as 64 bit. Now I have one more question: When I do R CMD Install xps.tar.gz which now depends on 64 bit ROOT, do I need to install the 64 bit version of R or can I use the current R version? I have no idea since I don't know your package. If you *link* to ROOT then yes, you have to use 64-bit R to load 64-bit code. (Linking in itself can be quite interesting given the flags ROOT uses, so your journey may not end there ;)). Cheers, Simon Best regards Christian Simon Urbanek wrote: On Jan 25, 2010, at 15:03 , cstrato wrote: Dear Simon, Thank you for your suggestions, which I have just tried. Sadly the error remains the same. The problem seems to be that for some reason gfortran-4.2-5564-darwin9.tar.gz does not have a /usr/lib/gcc/i686-apple-darwin9/4.2.1/x86_64 directory containing libgfortranbegin.a. For this reason the 64 bit version of libgfortranbegin.a is not installed in the corresponding directory x86_64 which contains only libgcc.a etc. Oh ... that's a surprise - it should be there, sorry. Ok, so please use the more recent 5566 build: http://r.research.att.com/tools/gfortran-4.2-5566-darwin9.tar.gz that one has the x86_64 files - I checked: ginaz:~$ curl -s -S http://r.research.att.com/tools/gfortran-4.2-5566-darwin9.tar.gz | tar fvtz - | grep gfortran.a -rw-r--r-- root/wheel 3592608 2008-12-24 14:51:33 usr/lib/gcc/i686-apple-darwin9/4.2.1/libgfortran.a -rw-r--r-- root/wheel 3870032 2008-12-24 14:51:33 usr/lib/gcc/powerpc-apple-darwin9/4.2.1/libgfortran.a
Re: [R-SIG-Mac] Which gfortran for Leopard?
Hmm, I forgot about --arch. As Simon said, you should be able to do it by R --arch=x86_64 --no-multiarch CMD INSTALL My guess is that you need --no-multiarch, but I cannot experiment with this where I sit. Kasper On Jan 26, 2010, at 15:57 PM, Kasper Daniel Hansen wrote: On Jan 26, 2010, at 15:24 PM, cstrato wrote: Dear Simon, Meanwhile I have tried to install xps: $ R CMD INSTALL -l ~/Library/R/2.10/library xps_1.7.4.tar.gz * installing *source* package 'xps' ... checking for gcc... gcc-4.2 -arch i386 -std=gnu99 checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc-4.2 -arch i386 -std=gnu99 accepts -g... yes checking for gcc-4.2 -arch i386 -std=gnu99 option to accept ANSI C... none needed checking how to run the C preprocessor... gcc-4.2 -arch i386 -std=gnu99 -E checking for gcc... (cached) gcc-4.2 -arch i386 -std=gnu99 checking whether we are using the GNU C compiler... (cached) yes checking whether gcc-4.2 -arch i386 -std=gnu99 accepts -g... (cached) yes checking for gcc-4.2 -arch i386 -std=gnu99 option to accept ANSI C... (cached) none needed found ROOT version 5.24/00 in directory /Users/rabbitus/ROOT/root ** libs ** arch - i386 As you can see it compiles using the wrong architecture: library(xps) Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/Users/rabbitus/Library/R/2.10/library/xps/libs/i386/xps.so': dlopen(/Users/rabbitus/Library/R/2.10/library/xps/libs/i386/xps.so, 6): no suitable image found. Did find: /Users/rabbitus/Library/R/2.10/library/xps/libs/i386/xps.so: mach-o, but wrong architecture Error: package/namespace load failed for 'xps' In my file config.in I have the following lines: # See Writing R Extensions : ${R_HOME=`R RHOME`} if test -z ${R_HOME}; then echo could not determine R_HOME exit 1 fi CC=`${R_HOME}/bin/R CMD config CC` CFLAGS=`${R_HOME}/bin/R CMD config CFLAGS` AC_PROG_CPP AC_PROG_CC Thus I assume that I need to use 64 bit R so that the flags are set correctly. Is this correct? This is probably because you are using the CRAN binary which is a universal binary. Specifically this means that it will try to compile the package for all architectures, which will fail because ROOT is only installed for one of the architectures. This will happen for any package with C code you install from source, try picking your favorite R package with C code (say, preprocessCore), set options(pkgType = source) and install it using biocLite. You will see several compilation runs. There are a hack to fix this, and there may be an official way to compile a package only for a specific architecture, which I don't know about. The hack: inside (this is for 2.11) /Library/Frameworks/R.framework/Versions/2.11/Resources/bin/exec/ you will see a list of subdirectories describing what architecture you have R compiled for. If you remove all the other architectures aside from x86_64 it might work. This might mess up your R.app though. Alternatively you could compile R from source, only for one architecture. This is what I do. Kasper If yes, can I use: http://r.research.att.com/R-GUI-5548-2.10-leopard-Leopard64.dmg or do I need to build 64 bit R from source? Best regards Christian Simon Urbanek wrote: On Jan 25, 2010, at 5:34 PM, cstrato wrote: Dear Simon, Thank you, with this version I could finally compile ROOT as 64 bit. Now I have one more question: When I do R CMD Install xps.tar.gz which now depends on 64 bit ROOT, do I need to install the 64 bit version of R or can I use the current R version? I have no idea since I don't know your package. If you *link* to ROOT then yes, you have to use 64-bit R to load 64-bit code. (Linking in itself can be quite interesting given the flags ROOT uses, so your journey may not end there ;)). Cheers, Simon Best regards Christian Simon Urbanek wrote: On Jan 25, 2010, at 15:03 , cstrato wrote: Dear Simon, Thank you for your suggestions, which I have just tried. Sadly the error remains the same. The problem seems to be that for some reason gfortran-4.2-5564-darwin9.tar.gz does not have a /usr/lib/gcc/i686-apple-darwin9/4.2.1/x86_64 directory containing libgfortranbegin.a. For this reason the 64 bit version of libgfortranbegin.a is not installed in the corresponding directory x86_64 which contains only libgcc.a etc. Oh ... that's a surprise - it should be there, sorry. Ok, so please use the more recent 5566 build: http://r.research.att.com/tools/gfortran-4.2-5566-darwin9.tar.gz that one has the x86_64 files - I checked: ginaz:~$ curl -s -S
[R-SIG-Mac] Failed compile of cshapes package
Dear all, I have been submitting more recent versions of my cshapes package to CRAN. Whereas version 0.1-1 compiled just fine, all subsequent releases failed to do so, but only under OS X: http://cran.r-project.org/web/checks/check_results_cshapes.html This is weird, because * the example that triggered the OS X compilation error was not changed between 0.1-1 and now * this example has also been excluded from testing (using Not run:) Any suggestions of what I could do? Thanks! Nils -- Nils B. Weidmann Woodrow Wilson School Princeton University http://nils.weidmann.ws ___ R-SIG-Mac mailing list R-SIG-Mac@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] Which gfortran for Leopard?
On Jan 26, 2010, at 15:57 , Kasper Daniel Hansen wrote: On Jan 26, 2010, at 15:24 PM, cstrato wrote: Dear Simon, Meanwhile I have tried to install xps: $ R CMD INSTALL -l ~/Library/R/2.10/library xps_1.7.4.tar.gz * installing *source* package 'xps' ... checking for gcc... gcc-4.2 -arch i386 -std=gnu99 checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc-4.2 -arch i386 -std=gnu99 accepts -g... yes checking for gcc-4.2 -arch i386 -std=gnu99 option to accept ANSI C... none needed checking how to run the C preprocessor... gcc-4.2 -arch i386 - std=gnu99 -E checking for gcc... (cached) gcc-4.2 -arch i386 -std=gnu99 checking whether we are using the GNU C compiler... (cached) yes checking whether gcc-4.2 -arch i386 -std=gnu99 accepts -g... (cached) yes checking for gcc-4.2 -arch i386 -std=gnu99 option to accept ANSI C... (cached) none needed found ROOT version 5.24/00 in directory /Users/rabbitus/ROOT/root ** libs ** arch - i386 As you can see it compiles using the wrong architecture: library(xps) Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/Users/rabbitus/Library/R/2.10/ library/xps/libs/i386/xps.so': dlopen(/Users/rabbitus/Library/R/2.10/library/xps/libs/i386/xps.so, 6): no suitable image found. Did find: /Users/rabbitus/Library/R/2.10/library/xps/libs/i386/xps.so: mach-o, but wrong architecture Error: package/namespace load failed for 'xps' In my file config.in I have the following lines: # See Writing R Extensions : ${R_HOME=`R RHOME`} if test -z ${R_HOME}; then echo could not determine R_HOME exit 1 fi CC=`${R_HOME}/bin/R CMD config CC` CFLAGS=`${R_HOME}/bin/R CMD config CFLAGS` AC_PROG_CPP AC_PROG_CC Thus I assume that I need to use 64 bit R so that the flags are set correctly. Is this correct? This is probably because you are using the CRAN binary which is a universal binary. Specifically this means that it will try to compile the package for all architectures, Nope - see above - it has a configure. He's simply running the wrong architecture. With the proper binary R --arch=x86_64 CMD INSTALL ... will do the trick. Cheers, Simon which will fail because ROOT is only installed for one of the architectures. This will happen for any package with C code you install from source, try picking your favorite R package with C code (say, preprocessCore), set options(pkgType = source) and install it using biocLite. You will see several compilation runs. There are a hack to fix this, and there may be an official way to compile a package only for a specific architecture, which I don't know about. The hack: inside (this is for 2.11) /Library/Frameworks/R.framework/Versions/2.11/Resources/bin/exec/ you will see a list of subdirectories describing what architecture you have R compiled for. If you remove all the other architectures aside from x86_64 it might work. This might mess up your R.app though. Alternatively you could compile R from source, only for one architecture. This is what I do. Kasper If yes, can I use: http://r.research.att.com/R-GUI-5548-2.10-leopard-Leopard64.dmg or do I need to build 64 bit R from source? Best regards Christian Simon Urbanek wrote: On Jan 25, 2010, at 5:34 PM, cstrato wrote: Dear Simon, Thank you, with this version I could finally compile ROOT as 64 bit. Now I have one more question: When I do R CMD Install xps.tar.gz which now depends on 64 bit ROOT, do I need to install the 64 bit version of R or can I use the current R version? I have no idea since I don't know your package. If you *link* to ROOT then yes, you have to use 64-bit R to load 64-bit code. (Linking in itself can be quite interesting given the flags ROOT uses, so your journey may not end there ;)). Cheers, Simon Best regards Christian Simon Urbanek wrote: On Jan 25, 2010, at 15:03 , cstrato wrote: Dear Simon, Thank you for your suggestions, which I have just tried. Sadly the error remains the same. The problem seems to be that for some reason gfortran-4.2-5564- darwin9.tar.gz does not have a /usr/lib/gcc/i686-apple- darwin9/4.2.1/x86_64 directory containing libgfortranbegin.a. For this reason the 64 bit version of libgfortranbegin.a is not installed in the corresponding directory x86_64 which contains only libgcc.a etc. Oh ... that's a surprise - it should be there, sorry. Ok, so please use the more recent 5566 build: http://r.research.att.com/tools/gfortran-4.2-5566-darwin9.tar.gz that one has the x86_64 files - I checked: ginaz:~$ curl -s -S http://r.research.att.com/tools/gfortran-4.2-5566-darwin9.tar.gz | tar fvtz - | grep gfortran.a -rw-r--r-- root/wheel 3592608 2008-12-24 14:51:33
Re: [R-SIG-Mac] Which gfortran for Leopard?
Dear Kasper, dear Simon, Thank you both for your help, this was easier than I thought. Since I had already installed R-2.10.1.pkg all I needed to do was: $ R --arch=x86_64 --no-multiarch CMD INSTALL -l ~/Library/R/2.10/library xps_1.7.4.tar.gz * installing *source* package 'xps' ... checking for gcc... gcc-4.2 -arch x86_64 -std=gnu99 checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc-4.2 -arch x86_64 -std=gnu99 accepts -g... yes checking for gcc-4.2 -arch x86_64 -std=gnu99 option to accept ANSI C... none needed checking how to run the C preprocessor... gcc-4.2 -arch x86_64 -std=gnu99 -E checking for gcc... (cached) gcc-4.2 -arch x86_64 -std=gnu99 checking whether we are using the GNU C compiler... (cached) yes checking whether gcc-4.2 -arch x86_64 -std=gnu99 accepts -g... (cached) yes checking for gcc-4.2 -arch x86_64 -std=gnu99 option to accept ANSI C... (cached) none needed found ROOT version 5.24/00 in directory /Users/rabbitus/ROOT/root ** libs ** arch - x86_64 Now xps compiles for 64 bit and starting R with: $ R --arch=x86_64 I am able to load my package: library(xps) Welcome to xps version 1.7.4 an R wrapper for XPS - eXpression Profiling System (c) Copyright 2001-2009 by Christian Stratowa Now one final question remains, which is a question of a user of xps who has started the whole discussion since he has compiled ROOT as 64 bit and wanted to install xps using: biocLite(xps, type = source) I assume that when I start R using R --arch=x86_64 then every package is compiled as 64 bit automatically. Best regards Christian Simon Urbanek wrote: On Jan 26, 2010, at 15:24 , cstrato wrote: Dear Simon, Meanwhile I have tried to install xps: $ R CMD INSTALL -l ~/Library/R/2.10/library xps_1.7.4.tar.gz * installing *source* package 'xps' ... checking for gcc... gcc-4.2 -arch i386 -std=gnu99 checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc-4.2 -arch i386 -std=gnu99 accepts -g... yes checking for gcc-4.2 -arch i386 -std=gnu99 option to accept ANSI C... none needed checking how to run the C preprocessor... gcc-4.2 -arch i386 -std=gnu99 -E checking for gcc... (cached) gcc-4.2 -arch i386 -std=gnu99 checking whether we are using the GNU C compiler... (cached) yes checking whether gcc-4.2 -arch i386 -std=gnu99 accepts -g... (cached) yes checking for gcc-4.2 -arch i386 -std=gnu99 option to accept ANSI C... (cached) none needed found ROOT version 5.24/00 in directory /Users/rabbitus/ROOT/root ** libs ** arch - i386 As you can see it compiles using the wrong architecture: Well, you're running the wrong architecture ... As I said when you want to link, you have to use 64-bit. library(xps) Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/Users/rabbitus/Library/R/2.10/library/xps/libs/i386/xps.so': dlopen(/Users/rabbitus/Library/R/2.10/library/xps/libs/i386/xps.so, 6): no suitable image found. Did find: /Users/rabbitus/Library/R/2.10/library/xps/libs/i386/xps.so: mach-o, but wrong architecture Error: package/namespace load failed for 'xps' In my file config.in I have the following lines: # See Writing R Extensions : ${R_HOME=`R RHOME`} if test -z ${R_HOME}; then echo could not determine R_HOME exit 1 fi CC=`${R_HOME}/bin/R CMD config CC` CFLAGS=`${R_HOME}/bin/R CMD config CFLAGS` AC_PROG_CPP AC_PROG_CC Thus I assume that I need to use 64 bit R so that the flags are set correctly. Is this correct? You have to use 64-bit R if you want to link to a 64-bit program - as I said. If yes, can I use: http://r.research.att.com/R-GUI-5548-2.10-leopard-Leopard64.dmg or do I need to build 64 bit R from source? Neither - just pick it from CRAN - it's the first download in the list. Note that you still have to run 64-bit R -- e.g. R --arch=x86_64 Cheers, Simon Simon Urbanek wrote: On Jan 25, 2010, at 5:34 PM, cstrato wrote: Dear Simon, Thank you, with this version I could finally compile ROOT as 64 bit. Now I have one more question: When I do R CMD Install xps.tar.gz which now depends on 64 bit ROOT, do I need to install the 64 bit version of R or can I use the current R version? I have no idea since I don't know your package. If you *link* to ROOT then yes, you have to use 64-bit R to load 64-bit code. (Linking in itself can be quite interesting given the flags ROOT uses, so your journey may not end there ;)). Cheers, Simon Best regards Christian Simon Urbanek wrote: On Jan 25, 2010, at
Re: [R-SIG-Mac] Failed compile of cshapes package
On Jan 26, 2010, at 16:19 , Nils B. Weidmann wrote: Dear all, I have been submitting more recent versions of my cshapes package to CRAN. Whereas version 0.1-1 compiled just fine, all subsequent releases failed to do so, but only under OS X: http://cran.r-project.org/web/checks/check_results_cshapes.html This is weird, because * the example that triggered the OS X compilation error was not changed between 0.1-1 and now The issue is that you compiled it with too high target: java.lang.UnsupportedClassVersionError: Bad version number in .class file We only support JDK 1.5. Please use -target 1.5 when compiling your class files (they seem to not require 1.6 at all). * this example has also been excluded from testing (using Not run:) No, it's not -- the Not run is just your comment, it has no influence on the examples. Any suggestions of what I could do? See above. Cheers, Simon ___ R-SIG-Mac mailing list R-SIG-Mac@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-mac