armgong / rjulia

R package which integrating R and Julia
GNU General Public License v2.0
145 stars 23 forks source link

New Issue About RJulia #20

Closed mammask closed 9 years ago

mammask commented 9 years ago

Hi,

I am trying to install RJulia package on windows:

Julia Version: 0.4 R Version: 3.2.1 RStudio Version: 0.99.467

but I am getting the following error:

library(devtools)
Sys.setenv(JULIA_SRC="C:/Users/user/AppData/Local/Julia-0.4.0-rc1")
Sys.setenv(LD_LIBRARY_PATH=":/Users/user/AppData/Local/Julia-0.4.0-rc1/lib/julia")
devtools::install_github("armgong/RJulia", ref="0.4")# or ref="0.4" if using Julia v0.4
Downloading github repo armgong/RJulia@0.4
Installing rjulia
"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore CMD INSTALL  \
  "C:/Users/user/AppData/Local/Temp/Rtmp0ARR7f/devtools364744c1600/armgong-RJulia-dc2dd24" --library="C:/Users/user/Documents/R/win-library/3.2" --install-tests 

* installing *source* package 'rjulia' ...
** libs

*** arch - i386
julia: not found
julia: not found
gcc -m32 -I"C:/PROGRA~1/R/R-32~1.1/include" -DNDEBUG -I/../../src -I/../../src/support -I/../include -I/../include/julia -D_WIN32_WINNT=0x0600    -I"d:/RCompile/r-compiling/local/local320/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c Julia_R.c -o Julia_R.o
Julia_R.c:13:19: fatal error: julia.h: No such file or directory
compilation terminated.
make: *** [Julia_R.o] Error 1
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-32~1.1/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-32~1.1/share/make/winshlib.mk" SHLIB="rjulia.dll" OBJECTS="Julia_R.o R_Julia.o dataframe.o embedding.o"' had status 2
ERROR: compilation failed for package 'rjulia'
* removing 'C:/Users/user/Documents/R/win-library/3.2/rjulia'
Error: Command failed (1)

Any advice?

mammask commented 9 years ago

I re-installed the latest version of RStudio 0.99.484 and re-configured the system PATH (I had two installation paths of julia v.0.4 and v.0.3.11 and I kept the stable version) and it seems to work.

armgong commented 9 years ago

install rjulia only require julia execute file in system PATH variable

you don't need the following two line Sys.setenv(JULIA_SRC="C:/Users/user/AppData/Local/Julia-0.4.0-rc1") Sys.setenv(LD_LIBRARY_PATH=":/Users/user/AppData/Local/Julia-0.4.0-rc1/lib/julia")

mammask commented 9 years ago

Hi @armgong thank you for mentioning that