armgong / rjulia

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

install on R-devel, julia 0.5.2, 64-bit Ubuntu 14.04.05: "undefined symbol jl_is_float32" #50

Closed bbolker closed 7 years ago

bbolker commented 7 years ago

Any ideas to follow up on debugging this ... ?

The result of devtools::install_github("armgong/rjulia", ref="julia0.5") ends with

unable to load shared object '/usr/local/lib/R/site-library/rjulia/libs/rjulia.so': /usr/local/lib/R/site-library/rjulia/libs/rjulia.so: undefined symbol: jl_is_float32

> devtools::install_github("armgong/rjulia", ref="julia0.5")
Using GitHub PAT from envvar GITHUB_PAT
Downloading GitHub repo armgong/rjulia@julia0.5
from URL https://api.github.com/repos/armgong/rjulia/zipball/julia0.5
Installing rjulia
'/usr/local/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore  \
  --quiet CMD INSTALL  \
  '/tmp/Rtmp580ryd/devtools62492f61ac90/armgong-rjulia-8c55824'  \
  --library='/usr/local/lib/R/site-library' --install-tests 

* installing *source* package ‘rjulia’ ...
** libs
gcc -std=gnu99 -I/usr/local/lib/R/include -DNDEBUG   -I/usr/local/include  -DJULIA_ENABLE_THREADING=1 -fPIC -DJULIA_INIT_DIR=\"/usr/lib/x86_64-linux-gnu\" -I/usr/include/julia -fpic  -g -O2  -c Julia_R.c -o Julia_R.o
Julia_R.c: In function ‘Julia_R_Scalar’:
Julia_R.c:232:3: warning: implicit declaration of function ‘jl_is_float64’ [-Wimplicit-function-declaration]
   if (jl_is_float64(Var)) return ScalarReal(jl_unbox_float64(Var));
   ^
Julia_R.c:233:3: warning: implicit declaration of function ‘jl_is_float32’ [-Wimplicit-function-declaration]
   if (jl_is_float32(Var)) return ScalarReal(jl_unbox_float32(Var));
   ^
gcc -std=gnu99 -I/usr/local/lib/R/include -DNDEBUG   -I/usr/local/include  -DJULIA_ENABLE_THREADING=1 -fPIC -DJULIA_INIT_DIR=\"/usr/lib/x86_64-linux-gnu\" -I/usr/include/julia -fpic  -g -O2  -c R_Julia.c -o R_Julia.o
gcc -std=gnu99 -I/usr/local/lib/R/include -DNDEBUG   -I/usr/local/include  -DJULIA_ENABLE_THREADING=1 -fPIC -DJULIA_INIT_DIR=\"/usr/lib/x86_64-linux-gnu\" -I/usr/include/julia -fpic  -g -O2  -c dataframe.c -o dataframe.o
gcc -std=gnu99 -I/usr/local/lib/R/include -DNDEBUG   -I/usr/local/include  -DJULIA_ENABLE_THREADING=1 -fPIC -DJULIA_INIT_DIR=\"/usr/lib/x86_64-linux-gnu\" -I/usr/include/julia -fpic  -g -O2  -c embedding.c -o embedding.o
gcc -std=gnu99 -shared -L/usr/local/lib -o rjulia.so Julia_R.o R_Julia.o dataframe.o embedding.o -Wl,-rpath,/usr/lib/x86_64-linux-gnu -ljulia -L/usr/lib/x86_64-linux-gnu
installing to /usr/local/lib/R/site-library/rjulia/libs
** R
** demo
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error: package or namespace load failed for ‘rjulia’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/usr/local/lib/R/site-library/rjulia/libs/rjulia.so':
  /usr/local/lib/R/site-library/rjulia/libs/rjulia.so: undefined symbol: jl_is_float32
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/rjulia’
Installation failed: Command failed (1)

Results of sessionInfo():

R Under development (unstable) (2017-07-12 r72910)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS
Matrix products: default
BLAS: /usr/local/lib/R/lib/libRblas.so
LAPACK: /usr/local/lib/R/lib/libRlapack.so
[locale information excluded]
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     
loaded via a namespace (and not attached):
[1] compiler_3.5.0
bbolker commented 7 years ago

FWIW I seem to be making some progress by forking the repo and hacking the two relevant lines. I'm not sure if a pull request is a good idea - don't know whether this will break things on other platforms?

armgong commented 7 years ago

will see this in weekend ,thanks

armgong commented 7 years ago

and pull request is welcome

phaverty commented 7 years ago

Fixed in julia0.6 branch