[R-SIG-Mac] RSPerl and leopard (osx 10.5.3/4)

Simon Urbanek simon.urbanek at r-project.org
Tue Jul 1 15:40:18 CEST 2008


On Jul 1, 2008, at 3:39 AM, gregory lefebvre wrote:

> Hi all,
>
> does anybody has any experience in installing RSPerl on leopard  
> (10.5.3/4) ?
>

The way RSPerl attempts to build the code simply doesn't work in this  
setup. The main problem is mismatch between what R sees and what Perl  
sees. Simply pasting their compiler flags doesn't work, because R uses  
10.4u SDK whereas Perl uses 10.5 system libraries directly. The error  
you get is due to that fact - libutil is only present in 10.5 and not  
in 10.4, but RSPerl attempts to link it using the 10.4 setup. I  
suspect that for this to work RSPerl would need to be designed more  
carefully to use the separate compiler and flags for each part of the  
interface.

You can get past that error if you use R compiled specifically for  
10.5 (thus without the 10.4u SDK), but still RSPerl doesn't work for  
me in that setup because of this error:
 > library(RSPerl)
Error in dyn.load(file, DLLpath = DLLpath, ...) :
   unable to load shared library '/Users/urbanek/Library/R/2.8/library/ 
RSPerl/libs/i386/RSPerl.so':
   dlopen(/Users/urbanek/Library/R/2.8/library/RSPerl/libs/i386/ 
RSPerl.so, 6): Symbol not found: _boot_R
   Referenced from: /Users/urbanek/Library/R/2.8/library/RSPerl/libs/ 
i386/RSPerl.so
   Expected in: dynamic lookup

I didn't dig deeper, but I suspect here are even more problems with  
RSPerl. You may want to contact the maintainer for help.

Cheers,
Simon

PS: I could only find RSPerl_0.92-1.tar.gz on the omegahat webpage, so  
I'm wondering where you got 0.92-2 ...



> I am using R version 2.7.1 (2008-06-23) with the command:
> sudo R CMD INSTALL -c --configure-args='--with-in-perl'  
> RSPerl_0.92-2.tar.gz
>
> First the compiler stopped after returning :
> cc1: error: invalid option 'arch=nocona'
>
> Then in the /Library/Frameworks/R.framework/Resources/etc/i386/ 
> Makeconf file, I removed the "-march=nocona" entries (https://stat.ethz.ch/pipermail/r-sig-mac/2008-January/004462.html 
> ) and now here is the returned message :
>
> * Installing to library '/Library/Frameworks/R.framework/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/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 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 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/R.pm
> config.status: creating R/perl5lib.R
> making target all in RinPerlMakefile
> gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx- 
> version-min=10.4 -std=gnu99 -I/Library/Frameworks/R.framework/ 
> Resources/include -I/Library/Frameworks/R.framework/Resources/ 
> include/i386 -I.  -arch i386 -arch ppc -g -pipe -fno-common - 
> DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration- 
> after-statement -I/usr/local/include  -I/System/Library/Perl/5.8.8/ 
> darwin-thread-multi-2level/CORE  -DPERL_POLLUTE   -D_R_=1 -DUSE_R=1 - 
> DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -msse3    -fPIC  -g -O2  -c  
> Converters.c -o Converters.o
> gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx- 
> version-min=10.4 -std=gnu99 -I/Library/Frameworks/R.framework/ 
> Resources/include -I/Library/Frameworks/R.framework/Resources/ 
> include/i386 -I.  -arch i386 -arch ppc -g -pipe -fno-common - 
> DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration- 
> after-statement -I/usr/local/include  -I/System/Library/Perl/5.8.8/ 
> darwin-thread-multi-2level/CORE  -DPERL_POLLUTE   -D_R_=1 -DUSE_R=1 - 
> DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -msse3    -fPIC  -g -O2  -c  
> Reflectance.c -o Reflectance.o
> gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx- 
> version-min=10.4 -std=gnu99 -I/Library/Frameworks/R.framework/ 
> Resources/include -I/Library/Frameworks/R.framework/Resources/ 
> include/i386 -I.  -arch i386 -arch ppc -g -pipe -fno-common - 
> DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration- 
> after-statement -I/usr/local/include  -I/System/Library/Perl/5.8.8/ 
> darwin-thread-multi-2level/CORE  -DPERL_POLLUTE   -D_R_=1 -DUSE_R=1 - 
> DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -msse3    -fPIC  -g -O2  -c  
> ForeignReference.c -o ForeignReference.o
> gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx- 
> version-min=10.4 -std=gnu99 -I/Library/Frameworks/R.framework/ 
> Resources/include -I/Library/Frameworks/R.framework/Resources/ 
> include/i386 -I.  -arch i386 -arch ppc -g -pipe -fno-common - 
> DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration- 
> after-statement -I/usr/local/include  -I/System/Library/Perl/5.8.8/ 
> darwin-thread-multi-2level/CORE  -DPERL_POLLUTE   -D_R_=1 -DUSE_R=1 - 
> DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -msse3    -fPIC  -g -O2  -c  
> UserConverters.c -o UserConverters.o
> gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx- 
> version-min=10.4 -std=gnu99 -I/Library/Frameworks/R.framework/ 
> Resources/include -I/Library/Frameworks/R.framework/Resources/ 
> include/i386 -I.  -arch i386 -arch ppc -g -pipe -fno-common - 
> DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration- 
> after-statement -I/usr/local/include  -I/System/Library/Perl/5.8.8/ 
> darwin-thread-multi-2level/CORE  -DPERL_POLLUTE   -D_R_=1 -DUSE_R=1 - 
> DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -msse3    -fPIC  -g -O2  -c  
> GeneralConverters.c -o GeneralConverters.o
> making libPerlConverter.dylib
> MACOSX_DEPLOYMENT_TARGET="10.3" gcc -dynamiclib -undefined  
> dynamic_lookup -o libPerlConverter.dylib -install_name /Library/ 
> Frameworks/R.framework/Resources/library/RSPerl/libs/ 
> libPerlConverter.dylib Converters.o Reflectance.o ForeignReference.o  
> UserConverters.o GeneralConverters.o -F/Library/Frameworks/ 
> R.framework/.. -framework R
> if test ! -d /Library/Frameworks/R.framework/Resources/library/ 
> RSPerl/libs ; then mkdir /Library/Frameworks/R.framework/Resources/ 
> library/RSPerl/libs ; fi
> cp libPerlConverter.dylib /Library/Frameworks/R.framework/Resources/ 
> library/RSPerl/libs
> /usr/bin/perl Makefile.PL PREFIX=/Library/Frameworks/R.framework/ 
> Resources/library/RSPerl LIB=/Library/Frameworks/R.framework/ 
> Resources/library/RSPerl/perl
> Warning: -L. changed to -L/tmp/R.INSTALL.D56cTa/RSPerl/src/.
> Unrecognized argument in LIBS ignored: '-F/Library/Frameworks/ 
> R.framework/..'
> Unrecognized argument in LIBS ignored: '-framework'
> Unrecognized argument in LIBS ignored: 'R'
> Writing Makefile.perl for R
> make -f Makefile.perl LD=/usr/bin/gcc
> cp R.pm blib/lib/R.pm
> AutoSplitting blib/lib/R.pm (blib/lib/auto/R)
> cp RReferences.pm blib/lib/RReferences.pm
> cc -c  -I. -I/Library/Frameworks/R.framework/Resources/include -I/ 
> Library/Frameworks/R.framework/Resources/include/i386 -arch i386 - 
> arch ppc -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno- 
> strict-aliasing -Wdeclaration-after-statement -I/usr/local/include - 
> O3   -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\"  "-I/System/Library/ 
> Perl/5.8.8/darwin-thread-multi-2level/CORE"  -g -D_R_=1 -DUSE_R=1 - 
> DWITH_R_IN_PERL=1 R.c
> Running Mkbootstrap for R ()
> chmod 644 R.bs
> rm -f blib/arch/auto/R/R.bundle
> LD_RUN_PATH="/tmp/R.INSTALL.D56cTa/RSPerl/src" /usr/bin/gcc  -arch  
> i386 -arch ppc -bundle -undefined dynamic_lookup -L/usr/local/lib  
> R.o -F/Library/Frameworks/R.framework/.. -framework R -o blib/arch/ 
> auto/R/R.bundle         \
>          -L/tmp/R.INSTALL.D56cTa/RSPerl/src -L/Library/Frameworks/ 
> R.framework/Resources/library/RSPerl/libs -lPerlConverter   \
>
> ld: warning, duplicate dylib /usr/local/lib/libgcc_s.1.dylib
> ld: warning, duplicate dylib /usr/local/lib/libgcc_s.1.dylib
> ld: warning in /tmp/R.INSTALL.D56cTa/RSPerl/src/ 
> libPerlConverter.dylib, file is not of required architecture
> ld: warning, duplicate dylib /usr/local/lib/libgcc_s.1.dylib
> ld: warning, duplicate dylib /usr/local/lib/libgcc_s.1.dylib
> chmod 755 blib/arch/auto/R/R.bundle
> cp R.bs blib/arch/auto/R/R.bs
> chmod 644 blib/arch/auto/R/R.bs
> Manifying blib/man3/R.3pm
> Manifying blib/man3/RReferences.3pm
> calling make -f Makefile.perl install
> Manifying blib/man3/R.3pm
> Manifying blib/man3/RReferences.3pm
> Installing /Library/Frameworks/R.framework/Resources/library/RSPerl/ 
> perl/darwin-thread-multi-2level/auto/R/R.bs
> Installing /Library/Frameworks/R.framework/Resources/library/RSPerl/ 
> perl/darwin-thread-multi-2level/auto/R/R.bundle
> Files found in blib/arch: installing files in blib/lib into  
> architecture dependent library tree
> Installing /Library/Frameworks/R.framework/Resources/library/RSPerl/ 
> perl/darwin-thread-multi-2level/R.pm
> Installing /Library/Frameworks/R.framework/Resources/library/RSPerl/ 
> perl/darwin-thread-multi-2level/RReferences.pm
> Installing /Library/Frameworks/R.framework/Resources/library/RSPerl/ 
> perl/darwin-thread-multi-2level/auto/R/autosplit.ix
> Installing /Library/Frameworks/R.framework/Resources/library/RSPerl/ 
> share/man/man3/R.3pm
> Installing /Library/Frameworks/R.framework/Resources/library/RSPerl/ 
> share/man/man3/RReferences.3pm
> Writing /Library/Frameworks/R.framework/Resources/library/RSPerl/ 
> perl/darwin-thread-multi-2level/auto/R/.packlist
> Appending installation info to /Library/Frameworks/R.framework/ 
> Resources/library/RSPerl/perl/darwin-thread-multi-2level/perllocal.pod
> Finished configuration
> ** libs
> ** arch - i386
> gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx- 
> version-min=10.4 -std=gnu99 -I/Library/Frameworks/R.framework/ 
> Resources/include -I/Library/Frameworks/R.framework/Resources/ 
> include/i386 -I.  -arch i386 -arch ppc -g -pipe -fno-common - 
> DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration- 
> after-statement -I/usr/local/include  -I/System/Library/Perl/5.8.8/ 
> darwin-thread-multi-2level/CORE  -DPERL_POLLUTE   -D_R_=1 -DUSE_R=1 - 
> DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -msse3    -fPIC  -g -O2  -c  
> RPerlElements.c -o RPerlElements.o
> gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx- 
> version-min=10.4 -std=gnu99 -I/Library/Frameworks/R.framework/ 
> Resources/include -I/Library/Frameworks/R.framework/Resources/ 
> include/i386 -I.  -arch i386 -arch ppc -g -pipe -fno-common - 
> DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration- 
> after-statement -I/usr/local/include  -I/System/Library/Perl/5.8.8/ 
> darwin-thread-multi-2level/CORE  -DPERL_POLLUTE   -D_R_=1 -DUSE_R=1 - 
> DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -msse3    -fPIC  -g -O2  -c  
> RPerlEval.c -o RPerlEval.o
> RPerlEval.c: In function 'RS_PerlEvalString':
> RPerlEval.c:20: warning: ISO C90 forbids mixed declarations and code
> RPerlEval.c: In function 'RS_PerlEvalString':
> RPerlEval.c:20: warning: ISO C90 forbids mixed declarations and code
> RPerlEval.c: In function 'RS_PerlGet':
> RPerlEval.c:128: warning: ISO C90 forbids mixed declarations and code
> RPerlEval.c: In function 'RS_PerlCallModified':
> RPerlEval.c:208: warning: ISO C90 forbids mixed declarations and code
> RPerlEval.c: In function 'RS_PerlGet':
> RPerlEval.c:128: warning: ISO C90 forbids mixed declarations and code
> RPerlEval.c: In function 'RS_PerlCallModified':
> RPerlEval.c:208: warning: ISO C90 forbids mixed declarations and code
> RPerlEval.c: In function 'RS_PerlCall':
> RPerlEval.c:377: warning: ISO C90 forbids mixed declarations and code
> RPerlEval.c: In function 'RS_PerlCall':
> RPerlEval.c:377: warning: ISO C90 forbids mixed declarations and code
> gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx- 
> version-min=10.4 -std=gnu99 -I/Library/Frameworks/R.framework/ 
> Resources/include -I/Library/Frameworks/R.framework/Resources/ 
> include/i386 -I.  -arch i386 -arch ppc -g -pipe -fno-common - 
> DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration- 
> after-statement -I/usr/local/include  -I/System/Library/Perl/5.8.8/ 
> darwin-thread-multi-2level/CORE  -DPERL_POLLUTE   -D_R_=1 -DUSE_R=1 - 
> DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -msse3    -fPIC  -g -O2  -c  
> RPerlInit.c -o RPerlInit.o
> gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx- 
> version-min=10.4 -std=gnu99 -I/Library/Frameworks/R.framework/ 
> Resources/include -I/Library/Frameworks/R.framework/Resources/ 
> include/i386 -I.  -arch i386 -arch ppc -g -pipe -fno-common - 
> DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration- 
> after-statement -I/usr/local/include  -I/System/Library/Perl/5.8.8/ 
> darwin-thread-multi-2level/CORE  -DPERL_POLLUTE   -D_R_=1 -DUSE_R=1 - 
> DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -msse3    -fPIC  -g -O2  -c  
> RPerlNew.c -o RPerlNew.o
> gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx- 
> version-min=10.4 -std=gnu99 -I/Library/Frameworks/R.framework/ 
> Resources/include -I/Library/Frameworks/R.framework/Resources/ 
> include/i386 -I.  -arch i386 -arch ppc -g -pipe -fno-common - 
> DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration- 
> after-statement -I/usr/local/include  -I/System/Library/Perl/5.8.8/ 
> darwin-thread-multi-2level/CORE  -DPERL_POLLUTE   -D_R_=1 -DUSE_R=1 - 
> DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -msse3    -fPIC  -g -O2  -c  
> RPerlReference.c -o RPerlReference.o
> gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx- 
> version-min=10.4 -std=gnu99 -I/Library/Frameworks/R.framework/ 
> Resources/include -I/Library/Frameworks/R.framework/Resources/ 
> include/i386 -I.  -arch i386 -arch ppc -g -pipe -fno-common - 
> DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration- 
> after-statement -I/usr/local/include  -I/System/Library/Perl/5.8.8/ 
> darwin-thread-multi-2level/CORE  -DPERL_POLLUTE   -D_R_=1 -DUSE_R=1 - 
> DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -msse3    -fPIC  -g -O2  -c  
> RPerlVars.c -o RPerlVars.o
> gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx- 
> version-min=10.4 -std=gnu99 -I/Library/Frameworks/R.framework/ 
> Resources/include -I/Library/Frameworks/R.framework/Resources/ 
> include/i386 -I.  -arch i386 -arch ppc -g -pipe -fno-common - 
> DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration- 
> after-statement -I/usr/local/include  -I/System/Library/Perl/5.8.8/ 
> darwin-thread-multi-2level/CORE  -DPERL_POLLUTE   -D_R_=1 -DUSE_R=1 - 
> DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -msse3    -fPIC  -g -O2  -c  
> Utils.c -o Utils.o
> Utils.c: In function 'characterVectorToNullTerminatedArray':
> Utils.c:35: warning: assignment discards qualifiers from pointer  
> target type
> Utils.c: In function 'characterVectorToArray':
> Utils.c:78: warning: assignment discards qualifiers from pointer  
> target type
> Utils.c: In function 'characterVectorToNullTerminatedArray':
> Utils.c:35: warning: assignment discards qualifiers from pointer  
> target type
> Utils.c: In function 'characterVectorToArray':
> Utils.c:78: warning: assignment discards qualifiers from pointer  
> target type
> gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx- 
> version-min=10.4 -std=gnu99 -I/Library/Frameworks/R.framework/ 
> Resources/include -I/Library/Frameworks/R.framework/Resources/ 
> include/i386 -I.  -arch i386 -arch ppc -g -pipe -fno-common - 
> DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration- 
> after-statement -I/usr/local/include  -I/System/Library/Perl/5.8.8/ 
> darwin-thread-multi-2level/CORE  -DPERL_POLLUTE   -D_R_=1 -DUSE_R=1 - 
> DUSE_TOPLEVEL_EXEC=1 -DWITH_R_IN_PERL=1 -msse3    -fPIC  -g -O2  -c  
> xsinit.c -o xsinit.o
> gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx- 
> version-min=10.4 -std=gnu99 -dynamiclib -Wl,- 
> headerpad_max_install_names -mmacosx-version-min=10.4 -undefined  
> dynamic_lookup -single_module -multiply_defined suppress -L/usr/ 
> local/lib -o RSPerl.so Converters.o ForeignReference.o  
> GeneralConverters.o R.o RPerlElements.o RPerlEval.o RPerlInit.o  
> RPerlNew.o RPerlReference.o RPerlVars.o Reflectance.o  
> UserConverters.o Utils.o xsinit.o   -arch i386 -arch ppc -L/usr/ 
> local/lib /System/Library/Perl/5.8.8/darwin-thread-multi-2level/auto/ 
> DynaLoader/DynaLoader.a -L/System/Library/Perl/5.8.8/darwin-thread- 
> multi-2level/CORE -lperl -ldl -lm -lutil -lc   -F/Library/Frameworks/ 
> R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
> ldld::  librarylibrary  notnot  foundfound  forfor  --lutillutil
>
> collect2: ld returned 1 exit status
> collect2: ld returned 1 exit status
> lipo: can't open input file: /var/tmp//cc3Fb354.out (No such file or  
> directory)
> make: *** [RSPerl.so] Error 1
> chmod: /Library/Frameworks/R.framework/Resources/library/RSPerl/libs/ 
> i386/*: No such file or directory
> ERROR: compilation failed for package 'RSPerl'
> ** Removing '/Library/Frameworks/R.framework/Resources/library/RSPerl'
>
> I don't have any clue for resolving this issue.
> Any idea would be really appreciated.
> In advance many thanks.
> Greg
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
>



More information about the R-SIG-Mac mailing list