Problèmes d’installation de R-Perl avec GCC 4.0: Comment supprimer les indicateurs d’archive inutiles

Je souhaite installer le module R-Perl pour utiliser R à partir de Perl, mais la commande sudo R CMD INSTALL --configure-args='--with-in-perl' RSPerl/ comme sudo R CMD INSTALL --configure-args='--with-in-perl' RSPerl/ ici: http : // . J’ai déjà posté sur ce sujet et déterminé que j’avais des problèmes avec le nouveau GCC 4.2. Cependant, j’utilise maintenant GCC 4.0.1 et j’ai des problèmes différents. Voici le résultat de la commande ci-dessus:

 * installing to library '/Library/Frameworks/R.framework/Versions/2.13/Resources/library' * installing *source* package 'RSPerl' ... checking for perl... /usr/bin/perl No support for any of the Perl modules from calling Perl from R. ***************************************************** Set PERL5LIB to /Library/Frameworks/R.framework/Versions/2.13/Resources/library/RSPerl/perl ***************************************************** Testing: -F/Library/Frameworks/R.framework/.. -framework R Using '/usr/bin/perl' as the perl executable Perl modules (no): Adding R package to list of Perl modules to enable callbacks to R from Perl Creating the C code for dynamically loading modules with native code for Perl: R modules: R; linking: checking for gcc... gcc checking for C comstackr default output file name... a.out checking whether the C comstackr 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 comstackr... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed Support R in Perl: yes configure: creating ./config.status config.status: creating src/Makevars config.status: creating inst/scripts/RSPerl.csh config.status: creating inst/scripts/RSPerl.bsh config.status: creating src/RinPerlMakefile config.status: creating src/Makefile.PL config.status: creating cleanup config.status: creating src/ config.status: creating R/perl5lib.R making target all in RinPerlMakefile RinPerlMakefile:5: /Library/Frameworks/R.framework/Resources/etc/Makeconf: No such file or directory make: *** No rule to make target `/Library/Frameworks/R.framework/Resources/etc/Makeconf'. Stop. calling make -f Makefile.perl install make: Makefile.perl: No such file or directory make: *** No rule to make target `Makefile.perl'. Stop. chmod: blib/lib/ No such file or directory Finished configuration ** libs *** arch - x86_64 gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -I. -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-ssortingct-aliasing -I/usr/local/include -I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -I/usr/local/include -fPIC -g -O2 -c Converters.c -o Converters.o In file included from /Library/Frameworks/R.framework/Resources/include/R_ext/RS.h:27, from /Library/Frameworks/R.framework/Resources/include/Rdefines.h:26, from RSCommon.h:55, from RSPerl.h:8, from Converters.h:4, from Converters.c:1: /Library/Frameworks/R.framework/Resources/include/Rconfig.h:5:25: error: ppc/Rconfig.h: No such file or directory In file included from RSCommon.h:72, from RSPerl.h:8, from Converters.h:4, from Converters.c:1: /Library/Frameworks/R.framework/Resources/include/Rversion.h:5:26: error: ppc/Rversion.h: No such file or directory In file included from RSPerl.h:8, from Converters.h:4, from Converters.c:1: RSCommon.h:73:28: error: missing binary operator before token "(" lipo: can't open input file: /var/tmp//ccd76npm.out (No such file or directory) make: *** [Converters.o] Error 1 ERROR: compilation failed for package 'RSPerl' * removing '/Library/Frameworks/R.framework/Versions/2.13/Resources/library/RSPerl' 

Et voici le contenu de config.log:

 This file contains any messages produced by comstackrs while running configure, to aid debugging if configure makes a mistake. It was created by configure, which was generated by GNU Autoconf 2.60. Invocation command line was $ ./configure --with-in-perl ## --------- ## ## Platform. ## ## --------- ## hostname = N01-0006-_MBP.local uname -m = x86_64 uname -r = 10.8.0 uname -s = Darwin uname -v = Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 /usr/bin/uname -p = i386 /bin/uname -X = unknown /bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = Mach kernel version: Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 Kernel configured for up to 4 processors. 2 processors are physically available. 4 processors are logically available. Processor type: i486 (Intel 80486) Processors active: 0 1 2 3 Primary memory available: 4.00 gigabytes Default processor set: 79 tasks, 365 threads, 4 processors Load average: 0.52, Mach factor: 3.46 /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: /usr/local/bin PATH: /usr/local/sbin PATH: /usr/local/mysql/bin PATH: /opt/local/bin PATH: /opt/local/sbin PATH: /opt/local/bin PATH: /opt/local/sbin PATH: /usr/bin PATH: /bin PATH: /usr/sbin PATH: /sbin PATH: /usr/local/bin PATH: /usr/X11/bin ## ----------- ## ## Core tests. ## ## ----------- ## configure:1645: checking for perl configure:1663: found /usr/bin/perl configure:1675: result: /usr/bin/perl configure:2013: checking for gcc configure:2029: found /usr/bin/gcc configure:2040: result: gcc configure:2278: checking for C comstackr version configure:2285: gcc --version >&5 i686-apple-darwin10-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5494) Copyright (C) 2005 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. configure:2288: $? = 0 configure:2295: gcc -v >&5 Using built-in specs. Target: i686-apple-darwin10 Configured with: /var/tmp/gcc_40/gcc_40-5494~315/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin10 --with-arch=apple --with-tune=generic --host=i686-apple-darwin10 --target=i686-apple-darwin10 Thread model: posix gcc version 4.0.1 (Apple Inc. build 5494) configure:2298: $? = 0 configure:2305: gcc -V >&5 gcc-4.0: argument to `-V' is missing configure:2308: $? = 1 configure:2331: checking for C comstackr default output file name configure:2358: gcc -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-ssortingct-aliasing -I/usr/local/include -I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE -DPERL_POLLUTE conftest.c >&5 configure:2361: $? = 0 configure:2407: result: a.out configure:2412: checking whether the C comstackr works configure:2422: ./a.out configure:2425: $? = 0 configure:2442: result: yes configure:2449: checking whether we are cross compiling configure:2451: result: no configure:2454: checking for suffix of executables configure:2461: gcc -o conftest -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-ssortingct-aliasing -I/usr/local/include -I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE -DPERL_POLLUTE conftest.c >&5 configure:2464: $? = 0 configure:2488: result: configure:2494: checking for suffix of object files configure:2520: gcc -c -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-ssortingct-aliasing -I/usr/local/include -I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE -DPERL_POLLUTE conftest.c >&5 configure:2523: $? = 0 configure:2546: result: o configure:2550: checking whether we are using the GNU C comstackr configure:2579: gcc -c -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-ssortingct-aliasing -I/usr/local/include -I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE -DPERL_POLLUTE conftest.c >&5 configure:2585: $? = 0 configure:2592: test -z "$ac_c_werror_flag" || test ! -s conftest.err configure:2595: $? = 0 configure:2602: test -s conftest.o configure:2605: $? = 0 configure:2619: result: yes configure:2624: checking whether gcc accepts -g configure:2654: gcc -c -g conftest.c >&5 configure:2660: $? = 0 configure:2667: test -z "$ac_c_werror_flag" || test ! -s conftest.err configure:2670: $? = 0 configure:2677: test -s conftest.o configure:2680: $? = 0 configure:2810: result: yes configure:2827: checking for gcc option to accept ISO C89 configure:2901: gcc -c -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-ssortingct-aliasing -I/usr/local/include -I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE -DPERL_POLLUTE conftest.c >&5 configure:2907: $? = 0 configure:2914: test -z "$ac_c_werror_flag" || test ! -s conftest.err configure:2917: $? = 0 configure:2924: test -s conftest.o configure:2927: $? = 0 configure:2947: result: none needed configure:2988: gcc -c -arch x86_64 -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-ssortingct-aliasing -I/usr/local/include -I/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE -DPERL_POLLUTE conftest.c >&5 configure:2994: $? = 0 configure:3001: test -z "$ac_c_werror_flag" || test ! -s conftest.err configure:3004: $? = 0 configure:3011: test -s conftest.o configure:3014: $? = 0 configure:3211: creating ./config.status ## ---------------------- ## ## Running config.status. ## ## ---------------------- ## This file was extended by config.status, which was generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = CONFIG_HEADERS = CONFIG_LINKS = CONFIG_COMMANDS = $ ./config.status on N01-0006-_MBP.local config.status:584: creating src/Makevars config.status:584: creating inst/scripts/RSPerl.csh config.status:584: creating inst/scripts/RSPerl.bsh config.status:584: creating src/RinPerlMakefile config.status:584: creating src/Makefile.PL config.status:584: creating cleanup config.status:584: creating src/ config.status:584: creating R/perl5lib.R ## ---------------- ## ## Cache variables. ## ## ---------------- ## ac_cv_c_comstackr_gnu=yes ac_cv_env_CC_set= ac_cv_env_CC_value= ac_cv_env_CFLAGS_set= ac_cv_env_CFLAGS_value= ac_cv_env_CPPFLAGS_set= ac_cv_env_CPPFLAGS_value= ac_cv_env_LDFLAGS_set= ac_cv_env_LDFLAGS_value= ac_cv_env_build_alias_set= ac_cv_env_build_alias_value= ac_cv_env_host_alias_set= ac_cv_env_host_alias_value= ac_cv_env_target_alias_set= ac_cv_env_target_alias_value= ac_cv_objext=o ac_cv_path_PERL=/usr/bin/perl ac_cv_prog_ac_ct_CC=gcc ac_cv_prog_cc_c89= ac_cv_prog_cc_g=yes ## ----------------- ## ## Output variables. ## ## ----------------- ## CC='gcc' CFLAGS='' CPPFLAGS='' DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\"' ECHO_C='ECHO_N='' ECHO_T='' EXEEXT='' LANGUAGE_DEFS=' -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1' LDFLAGS='' LD_PATH='/Library/Frameworks/R.framework/Versions/2.13/Resources/library/RSPerl/libs' LD_PATH_VAR='DYLD_LIBRARY_PATH' LIBOBJS='' LIBS='' LTLIBOBJS='' NO_SUPPORT_R_IN_PERL='0' OBJEXT='o' OTHERLDFLAGS='-F/Library/Frameworks/R.framework/.. -framework R' PACKAGE_BUGREPORT='' PACKAGE_NAME='' PACKAGE_STRING='' PACKAGE_TARNAME='' PACKAGE_VERSION='' PATH_SEPARATOR=':' PERL5_PATH='/Library/Frameworks/R.framework/Versions/2.13/Resources/library/RSPerl/perl' PERL='/usr/bin/perl' PERL_INSTALL_PREFIX='PREFIX=/Library/Frameworks/R.framework/Versions/2.13/Resources/library/RSPerl LIB=/Library/Frameworks/R.framework/Versions/2.13/Resources/library/RSPerl/perl' PERL_LD_MAKE_ARG='LD=/usr/bin/gcc' PERL_MODULE_SO_DIRS='' R_HOME='/Library/Frameworks/R.framework/Resources' R_IN_PERL_DEFINES='-DWITH_R_IN_PERL=1' R_IN_PERL_LIBRARY='RinPerl' R_LIBRARY_DIR='/Library/Frameworks/R.framework/Versions/2.13/Resources/library' R_PACKAGE_DIR='/Library/Frameworks/R.framework/Versions/2.13/Resources/library/RSPerl' R_PERL_MODULES='c("R")' R_SHLIB_CPPFLAGS='-I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64' R_SHLIB_LDFLAGS='-F/Library/Frameworks/R.framework/.. -framework R' R_SO_DIR='-F/Library/Frameworks/R.framework/.. -framework R' SHELL='/bin/sh' ac_ct_CC='gcc' bindir='${exec_prefix}/bin' build_alias='' datadir='${datarootdir}' datarootdir='${prefix}/share' docdir='${datarootdir}/doc/${PACKAGE}' dvidir='${docdir}' exec_prefix='${prefix}' host_alias='' htmldir='${docdir}' includedir='${prefix}/include' infodir='${datarootdir}/info' libdir='${exec_prefix}/lib' libexecdir='${exec_prefix}/libexec' localedir='${datarootdir}/locale' localstatedir='${prefix}/var' mandir='${datarootdir}/man' oldincludedir='/usr/include' pdfdir='${docdir}' prefix='/usr/local' program_transform_name='s,x,x,' psdir='${docdir}' sbindir='${exec_prefix}/sbin' sharedstatedir='${prefix}/com' sysconfdir='${prefix}/etc' target_alias='' configure: exit 0 

D’après certaines informations que j’ai lues sur , j’ai supprimé les -arch ppc et -arch i386 de l’appel gcc, et cela a fonctionné sans erreur. Cependant, je ne sais pas comment éditer la source de R-Perl pour m’assurer que lorsque cet appel GCC est exécuté, il s’exécute sans les indicateurs inutiles. J’ai essayé sudo R --arch=x86_64 CMD INSTALL ... , mais cela ne supprime pas encore les autres architectures de cet appel GCC.

Toute idée de ceux qui ont plus d’expérience que je peux donner serait grandement appréciée. Je vous remercie!

Avec l’aide de l’utilisateur flolo, j’ai créé le script shell suivant:

 #!/bin/bash COMMANDLINE=$@ COMMANDLINE=${COMMANDLINE/"-arch i386"} COMMANDLINE=${COMMANDLINE/"-arch ppc"} ECHO "--------------------------------------------" ECHO "/usr/bin/gcc-4.0 $COMMANDLINE" ECHO "--------------------------------------------" /usr/bin/gcc-4.0 $COMMANDLINE 

et ensuite fait un lien symbolique appelé gcc-4.2. Cela a eu deux conséquences: il a supprimé les drapeaux indésirables et il a également été vérifié que GCC 4.0 était utilisé. (GCC 4.2 a été une douleur dans le cou.)

Cependant, je rencontre maintenant plus de problèmes, mais j’estime qu’ils n’ont aucun lien avec l’architecture, certainement les arch flags. Par conséquent, cette solution résout la question posée.