lgautier / Rif.jl

Julia-to-R interface
GNU General Public License v2.0
54 stars 25 forks source link

compiled R #18

Open gusl opened 10 years ago

gusl commented 10 years ago

The requirements say: ‹‹ R, compiled with the option --enable-R-shlib ››

Is it essential to compile R myself?

require("Rif") gives lots of errors:

julia> require("Rif") Warning: replacing module Rif Warning: New definition .==(AbstractArray{Bool,N},DataArray{Bool,N}) at /Users/gustavolacerda/.julia/v0.3/DataArrays/src/operators.jl:332 is ambiguous with: .==(AbstractImageDirect{Bool,N},AbstractArray{Bool,N}) at /Users/gustavolacerda/.julia/v0.3/Images/src/algorithms.jl:74. To fix, define .==(AbstractImageDirect{Bool,N},DataArray{Bool,N}) before the new definition.

....


Can't find librinterface.so; attempting to compile...


gcc -g -Wall -DCSTACK_DEFNS -DRIF_HAS_RSIGHAND -DHAS_READLINE -fno-stack-protector R CMD config --cppflags -fPIC -c r_utils.c -o r_utils.o gcc -g -Wall -DCSTACK_DEFNS -DRIF_HAS_RSIGHAND -DHAS_READLINE -fno-stack-protector R CMD config --cppflags -lreadline -Ir_utils -fPIC -c librinterface.c -o librinterface.o clang: warning: -lreadline: 'linker' input unused librinterface.c:328:12: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'SEXP' (aka 'struct SEXPREC ') [-Wint-conversion] return -1; ^~ librinterface.c:393:17: warning: assigning to 'char ' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] name_item = translateCharUTF8(sexp_item); ^ ~~~~~~~~

...

11 warnings generated. gcc -lreadline -shared librinterface.o r_utils.o R CMD config --ldflags -o librinterface.so


Compiling complete


ERROR: could not load module /Users/gustavolacerda/.julia/v0.3/Rif/deps/librinterface: dlopen(/Users/gustavolacerda/.julia/v0.3/Rif/deps/librinterface.dylib, 1): image not found in dlopen at c.jl:19 in include at boot.jl:244 (repeats 2 times) in reload_path at loading.jl:152 in _require at loading.jl:67 in require at loading.jl:51 while loading /Users/gustavolacerda/.julia/v0.3/Rif/src/embeddedr.jl, in expression starting on line 19 while loading /Users/gustavolacerda/.julia/v0.3/Rif/src/Rif.jl, in expression starting on line 72

lgautier commented 10 years ago

Is it essential to compile R myself?

No, but it is that the R you are using is compiled as a shared library (--enable-R-shlib).

Note that a number of issues were recently fixed in Rif.