JuliaInterop / JuliaCall

Embed Julia in R
https://non-contradiction.github.io/JuliaCall/index.html
Other
267 stars 36 forks source link

julia_installed_package() and Pkg.build("RCall") issue #127

Closed jjlynch2 closed 4 years ago

jjlynch2 commented 4 years ago

Calling JuliaCall::julia_installed_package() causes my R environment to crash with a segmentation fault. I tried calling Pkg.build("RCall") following the recommendations in other issues, and that is causing the segmentation fault. Any ideas what this is?

Julia version 1.3.1 R version 3.6.3

julia> Pkg.build("RCall")
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`

signal (11): Segmentation fault
in expression starting at REPL[2]:1
unknown function (ip: 0x7f81615e4e73)
http_parser_execute at /usr/bin/../lib/libhttp_parser.so.2.9 (unknown line)
unknown function (ip: 0x7f81615e6390)
unknown function (ip: 0x7f81615e8770)
unknown function (ip: 0x7f81615eab58)
unknown function (ip: 0x7f81615e8f91)
git_remote_fetch at /usr/bin/../lib/libgit2.so (unknown line)
unknown function (ip: 0x7f817c3f9cb2)
unknown function (ip: 0x7f817c3fb0d8)
unknown function (ip: 0x7f817c404000)
unknown function (ip: 0x7f817c4234de)
unknown function (ip: 0x7f817c425101)
update_registries at /build/julia/src/julia-1.3.1/usr/share/julia/stdlib/v1.3/Pkg/src/Types.jl:1137 [inlined]
update_registries at /build/julia/src/julia-1.3.1/usr/share/julia/stdlib/v1.3/Pkg/src/Types.jl:1137 [inlined]
#instantiate#114 at /build/julia/src/julia-1.3.1/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:740
unknown function (ip: 0x7f81626e3ea2)
instantiate at /build/julia/src/julia-1.3.1/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:720
build at /build/julia/src/julia-1.3.1/usr/share/julia/stdlib/v1.3/Pkg/src/Operations.jl:753
#build#106 at /build/julia/src/julia-1.3.1/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:657
build at /build/julia/src/julia-1.3.1/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:640 [inlined]
#build#105 at /build/julia/src/julia-1.3.1/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:638 [inlined]
build at /build/julia/src/julia-1.3.1/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:638 [inlined]
#build#102 at /build/julia/src/julia-1.3.1/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:635 [inlined]
build at /build/julia/src/julia-1.3.1/usr/share/julia/stdlib/v1.3/Pkg/src/API.jl:635
unknown function (ip: 0x7f81888f0ced)
unknown function (ip: 0x7f81888f099a)
unknown function (ip: 0x7f81888f16d4)
unknown function (ip: 0x7f81888f1df9)
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f817aa2d00f)
unknown function (ip: (nil))
unknown function (ip: 0x7f81888f2219)
unknown function (ip: 0x7f81887b64fd)
unknown function (ip: 0x7f81887b6b88)
jl_toplevel_eval_in at /usr/bin/../lib/libjulia.so.1 (unknown line)
unknown function (ip: 0x7f817c2f8c64)
unknown function (ip: 0x7f817c4e6659)
unknown function (ip: 0x7f817c4e6954)
unknown function (ip: 0x7f818879cc94)
unknown function (ip: 0xffffffffffffffff)
Allocations: 3567164 (Pool: 3566029; Big: 1135); GC: 4
Segmentation fault (core dumped)
Non-Contradiction commented 4 years ago

Hi, thank you for the feedback! I currently have no idea for the segfault. But there are a few things for you to try. You can try to execute R.home() in R, copy the path, and try the following thing in julia:

ENV["R_HOME"] = "the path you just get from R.home() in R"
using Pkg; Pkg.build("RCall")
jjlynch2 commented 4 years ago

Thanks for the suggestion. I tried that and it is still receiving a segmentation fault. This is really strange as I haven't updated R, Julia, or any of their packages.

Non-Contradiction commented 4 years ago

Looking more closely at the stack trace error messages, it seems the error is directly from Pkg, maybe related to libhttp_parser or libgit2. Could you try updating or installing julia packages directly from julia and see whether everything is okay or not?

jjlynch2 commented 4 years ago

Looks like a library issue on my Linux system. I ran some updates and everything resolved itself.