[R-SIG-Mac]RSPerl
Jan de Leeuw
deleeuw@stat.ucla.edu
Wed, 30 Jan 2002 08:49:29 -0800
I cannot find the test.pl script. One possible problem is that
you need to add the directories with the dylibs to
DYLD_LIBRARY_PATH, but I cannot really test anything
until I know what script you use.
There is a substantial probability that the scheme of loading
the dylib into Perl will not work (on Mac OS X objects
loaded into a running executable are bundles and are
usually called foo.so, while dylibs are used at link time).
Do .PerlExpr and .PerlPackage work for you ?
On Wednesday, January 30, 2002, at 02:07 AM, David Firth wrote:
> Thanks to Jan for the fix below, which worked: I now have RSPerl
> installed.
>
> However, I cannot get the test script in "test.pl" to work. Here's
> what happens:
>
> nuff-pingo% pwd
> /usr/local/R-1.4.0/lib/R/library/RSPerl/examples
> nuff-pingo% echo $LD_LIBRARY_PATH
> /usr/local/R-1.4.0/lib/R/bin:/usr/local/R-1.4.0/lib/R/library/RSPerl/libs
> nuff-pingo% perl -I../share/blib/arch -I../share/blib/lib test.pl
> 1..1
> dyld: perl can't open library: libR.dylib (No such file or directory,
> errno = 2)
> nuff-pingo% ls -l $R_HOME/bin/libR.dylib
> -rwxr-xr-x 1 root wheel 4069128 Jan 5 18:13
> /usr/local/R-1.4.0/lib/R/bin/libR.dylib
> nuff-pingo%
>
> Can anyone suggest what I ought to try next?
>
> Thanks again,
> David
>
>> Line 32 of RPerlEval.c. Change
>>
>> void xs_init _((void));
>>
>> to
>>
>> void xs_init _((void)) {};
>>
>> This is unrelated to the unpacking problem.
>>
>> -- Jan
>>
>> On Saturday, January 26, 2002, at 01:28 PM, David Firth wrote:
>>
>>> Has anyone succeeded in compiling and installing the RSPerl package
>>> under OS X (Darwin)?
>>>
>>> I tried and got the errors below. Any hints would be welcomed.
>>>
>>> [Incidentally (well, is it incidental? I don't seem to have this
>>> problem
>>> so far with other R packages), I couldn't run R CMD INSTALL directly
>>> on
>>> the gzipped tar file:
>>>
>>> david% R CMD INSTALL -c /Users/david/Desktop/RSPerl.tar.gz
>>> ERROR: cannot extract package from /Users/david/Desktop/RSPerl.tar.gz
>>>
>>> --- instead I had to unzip and untar myself, then run R CMD INSTALL
>>> on the RSPerl source directory. I don't know why.]
>>>
>>> Regards,
>>> David
>>>
>>> ----------------------------------------------
>>> david% R CMD INSTALL -c RSPerl
>>> Installing *source* package `RSPerl' ...
>>> loading cache ./config.cache
>>> checking for perl... (cached) /usr/local/bin/perl
>>> Using '/usr/local/bin/perl' as the perl executable
>>> Perl modules:
>>> modules: ; linking:
>>> Support R in Perl:
>>> creating ./config.status
>>> creating src/Makevars
>>> creating R/RSUtils.S
>>> creating inst/scripts/RSPerl.csh
>>> creating src/RinPerlMakefile
>>> creating cleanup
>>> creating src/Makefile.PL
>>> libs
>>> gcc -I/usr/local/R-1.4.0/lib/R/include -I. -g -pipe -pipe
>>> -fno-common -no-cpp-precomp -flat_namespace -DHAS_TELLDIR_PROTOTYPE
>>> -fno-strict-aliasing -I/System/Library/Perl/darwin/CORE
>>> -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -I/sw/include
>>> -fno-common -g -O2 -c Converters.c -o Converters.o
>>> gcc: -flat_namespace: linker input file unused since linking not done
>>> gcc -I/usr/local/R-1.4.0/lib/R/include -I. -g -pipe -pipe
>>> -fno-common -no-cpp-precomp -flat_namespace -DHAS_TELLDIR_PROTOTYPE
>>> -fno-strict-aliasing -I/System/Library/Perl/darwin/CORE
>>> -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -I/sw/include
>>> -fno-common -g -O2 -c ForeignReference.c -o ForeignReference.o
>>> gcc: -flat_namespace: linker input file unused since linking not done
>>> gcc -I/usr/local/R-1.4.0/lib/R/include -I. -g -pipe -pipe
>>> -fno-common -no-cpp-precomp -flat_namespace -DHAS_TELLDIR_PROTOTYPE
>>> -fno-strict-aliasing -I/System/Library/Perl/darwin/CORE
>>> -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -I/sw/include
>>> -fno-common -g -O2 -c RPerlElements.c -o RPerlElements.o
>>> gcc: -flat_namespace: linker input file unused since linking not done
>>> gcc -I/usr/local/R-1.4.0/lib/R/include -I. -g -pipe -pipe
>>> -fno-common -no-cpp-precomp -flat_namespace -DHAS_TELLDIR_PROTOTYPE
>>> -fno-strict-aliasing -I/System/Library/Perl/darwin/CORE
>>> -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -I/sw/include
>>> -fno-common -g -O2 -c RPerlEval.c -o RPerlEval.o
>>> gcc: -flat_namespace: linker input file unused since linking not done
>>> gcc -I/usr/local/R-1.4.0/lib/R/include -I. -g -pipe -pipe
>>> -fno-common -no-cpp-precomp -flat_namespace -DHAS_TELLDIR_PROTOTYPE
>>> -fno-strict-aliasing -I/System/Library/Perl/darwin/CORE
>>> -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -I/sw/include
>>> -fno-common -g -O2 -c RPerlInit.c -o RPerlInit.o
>>> gcc: -flat_namespace: linker input file unused since linking not done
>>> gcc -I/usr/local/R-1.4.0/lib/R/include -I. -g -pipe -pipe
>>> -fno-common -no-cpp-precomp -flat_namespace -DHAS_TELLDIR_PROTOTYPE
>>> -fno-strict-aliasing -I/System/Library/Perl/darwin/CORE
>>> -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -I/sw/include
>>> -fno-common -g -O2 -c RPerlNew.c -o RPerlNew.o
>>> gcc: -flat_namespace: linker input file unused since linking not done
>>> gcc -I/usr/local/R-1.4.0/lib/R/include -I. -g -pipe -pipe
>>> -fno-common -no-cpp-precomp -flat_namespace -DHAS_TELLDIR_PROTOTYPE
>>> -fno-strict-aliasing -I/System/Library/Perl/darwin/CORE
>>> -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -I/sw/include
>>> -fno-common -g -O2 -c RPerlReference.c -o RPerlReference.o
>>> gcc: -flat_namespace: linker input file unused since linking not done
>>> gcc -I/usr/local/R-1.4.0/lib/R/include -I. -g -pipe -pipe
>>> -fno-common -no-cpp-precomp -flat_namespace -DHAS_TELLDIR_PROTOTYPE
>>> -fno-strict-aliasing -I/System/Library/Perl/darwin/CORE
>>> -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -I/sw/include
>>> -fno-common -g -O2 -c RPerlVars.c -o RPerlVars.o
>>> gcc: -flat_namespace: linker input file unused since linking not done
>>> gcc -I/usr/local/R-1.4.0/lib/R/include -I. -g -pipe -pipe
>>> -fno-common -no-cpp-precomp -flat_namespace -DHAS_TELLDIR_PROTOTYPE
>>> -fno-strict-aliasing -I/System/Library/Perl/darwin/CORE
>>> -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -I/sw/include
>>> -fno-common -g -O2 -c Reflectance.c -o Reflectance.o
>>> gcc: -flat_namespace: linker input file unused since linking not done
>>> gcc -I/usr/local/R-1.4.0/lib/R/include -I. -g -pipe -pipe
>>> -fno-common -no-cpp-precomp -flat_namespace -DHAS_TELLDIR_PROTOTYPE
>>> -fno-strict-aliasing -I/System/Library/Perl/darwin/CORE
>>> -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -I/sw/include
>>> -fno-common -g -O2 -c Utils.c -o Utils.o
>>> gcc: -flat_namespace: linker input file unused since linking not done
>>> gcc -I/usr/local/R-1.4.0/lib/R/include -I. -g -pipe -pipe
>>> -fno-common -no-cpp-precomp -flat_namespace -DHAS_TELLDIR_PROTOTYPE
>>> -fno-strict-aliasing -I/System/Library/Perl/darwin/CORE
>>> -DPERL_POLLUTE -D_R_=1 -DUSE_R=1 -DUSE_TOPLEVEL_EXEC=1 -I/sw/include
>>> -fno-common -g -O2 -c tryEval.c -o tryEval.o
>>> gcc: -flat_namespace: linker input file unused since linking not done
>>> gcc -bundle -bundle_loader /usr/local/R-1.4.0/lib/R/bin/R.bin -o
>>> RSPerl.so Converters.o ForeignReference.o RPerlElements.o RPerlEval.o
>>> RPerlInit.o RPerlNew.o RPerlReference.o RPerlVars.o Reflectance.o
>>> Utils.o tryEval.o
>>> /System/Library/Perl/darwin/auto/DynaLoader/DynaLoader.a
>>> -L/System/Library/Perl/darwin/CORE -lperl -lm -lc -L/usr/local/lib
>>> /usr/bin/ld: warning multiple definitions of symbol _regcomp
>>> /usr/local/R-1.4.0/lib/R/bin/R.bin definition of _regcomp
>>> /usr/lib/libm.dylib(regcomp.o) definition of _regcomp
>>> /usr/bin/ld: warning multiple definitions of symbol _regexec
>>> /usr/local/R-1.4.0/lib/R/bin/R.bin definition of _regexec
>>> /usr/lib/libm.dylib(regexec.o) definition of _regexec
>>> /usr/bin/ld: warning multiple definitions of symbol _regfree
>>> /usr/local/R-1.4.0/lib/R/bin/R.bin definition of _regfree
>>> /usr/lib/libm.dylib(regfree.o) definition of _regfree
>>> /usr/bin/ld: Undefined symbols:
>>> _xs_init
>>> /usr/bin/ld: warning unused multiple definitions of symbol _matherr
>>> /usr/local/R-1.4.0/lib/R/bin/R.bin definition of _matherr
>>> /usr/lib/libm.dylib(s_matherr.o) unused definition of _matherr
>>> /usr/bin/ld: warning unused multiple definitions of symbol _regerror
>>> /usr/local/R-1.4.0/lib/R/bin/R.bin definition of _regerror
>>> /usr/lib/libm.dylib(regerror.o) unused definition of _regerror
>>> /usr/bin/ld: warning unused multiple definitions of symbol _signgam
>>> /usr/local/R-1.4.0/lib/R/bin/R.bin definition of _signgam
>>> /usr/lib/libm.dylib(s_signgam.o) unused definition of _signgam
>>> make: *** [RSPerl.so] Error 1
>>> ERROR: compilation failed for package `RSPerl'
>>> _______________________________________________
>>> R-SIG-Mac mailing list
>>> R-SIG-Mac@stat.math.ethz.ch
>>> http://www.stat.math.ethz.ch/mailman/listinfo/r-sig-mac
>>>
===
Jan de Leeuw; Professor and Chair, UCLA Department of Statistics;
US mail: 9432 Boelter Hall, Box 951554, Los Angeles, CA 90095-1554
phone (310)-825-9550; fax (310)-206-5658; email: deleeuw@stat.ucla.edu
homepage: http://www.stat.ucla.edu/~deleeuw
========================================================
No matter where you go, there you are. --- Buckaroo Banzai
http://www.stat.ucla.edu/~deleeuw/sounds/nomatter.au
========================================================
>>
>