static-julia
static-julia copied to clipboard
Base.InitError(mod=:LibGit2, error=ErrorException("error initializing LibGit2 module"))
I get this error running "hello":
fatal: error thrown and no exception handler available.
Base.InitError(mod=:LibGit2, error=ErrorException("error initializing LibGit2 module"))
rec_backtrace at /home/mauro/julia/julia-0.6/src/stackwalk.c:84
record_backtrace at /home/mauro/julia/julia-0.6/src/task.c:245
jl_throw at /home/mauro/julia/julia-0.6/src/task.c:564
__init__ at ./libgit2/libgit2.jl:920
unknown function (ip: 0x7fe0b9575e58)
jl_call_fptr_internal at /home/mauro/julia/julia-0.6/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /home/mauro/julia/julia-0.6/src/julia_internal.h:358 [inlined]
jl_apply_generic at /home/mauro/julia/julia-0.6/src/gf.c:1933
jl_apply at /home/mauro/julia/julia-0.6/src/julia.h:1424 [inlined]
jl_module_run_initializer at /home/mauro/julia/julia-0.6/src/toplevel.c:87
_julia_init at /home/mauro/julia/julia-0.6/src/init.c:733
julia_init at /home/mauro/julia/julia-0.6/src/task.c:297
main at ./hello (unknown line)
__libc_start_main at /usr/lib/libc.so.6 (unknown line)
_start at ./hello (unknown line)
Compilation completes without any problem. Julia 0.6, Linux
I have this problem as well - but only on Scientific Linux (7.4), not on Ubuntu 17.04. Both are using the exact same Julia build (the official 0.6.0 amd64 binaries), and the latest version of this repository. How odd.
I have the same issue on Arch Linux using Julia v0.6.0.
Can you post the Julia version, which commit of static-julia
and the command used to generate the executable?
Here's a full transcript:
(master:✔) ~/sw/static-julia
0:jollans@mn70% git log -1
commit 82d86fe9e528c0ed2516f1e4f8536b37705f3557
Merge: fe16932 659c43b
Author: Viral B. Shah <[email protected]>
Date: Sun Oct 15 13:36:45 2017 -0400
Merge pull request #29 from lucatrv/refine_build_flags_and_messages
Refine build flags and messages
(master:✔) ~/sw/static-julia
0:jollans@mn70% julia --version
julia version 0.6.0
(master:✔) ~/sw/static-julia
0:jollans@mn70% ls -l `which julia`
lrwxrwxrwx. 1 jollans jollans 43 Oct 13 13:25 /home/jollans/bin/julia -> /home/jollans/sw/julia-903644385b/bin/julia
(master:✔) ~/sw/static-julia
0:jollans@mn70% julia juliac.jl -ve hello.jl
Program file:
"/home/jollans/sw/static-julia/hello.jl"
Build directory:
"/home/jollans/sw/static-julia/builddir"
Make build directory
Change to build directory
Build object file "hello.o":
`/home/jollans/sw/julia-903644385b/bin/julia -Cx86-64 -J/home/jollans/sw/julia-903644385b/lib/julia/sys.so --compile=yes --depwarn=yes --startup-file=no --output-o hello.o -e 'include("/home/jollans/sw/static-julia/hello.jl"); push!(Base.LOAD_CACHE_PATH, "/home/jollans/.julia/lib/v0.6"); empty!(Base.LOAD_CACHE_PATH)'`
Build shared library "libhello.so":
`gcc -m64 -shared -o libhello.so hello.o -std=gnu99 -I/home/jollans/sw/julia-903644385b/include/julia -DJULIA_ENABLE_THREADING=1 -fPIC -L/home/jollans/sw/julia-903644385b/lib -Wl,--export-dynamic -Wl,-rpath,/home/jollans/sw/julia-903644385b/lib -Wl,-rpath,/home/jollans/sw/julia-903644385b/lib/julia -ljulia`
Build executable file "hello":
`gcc -m64 -o hello /home/jollans/sw/static-julia/program.c libhello.so -std=gnu99 -I/home/jollans/sw/julia-903644385b/include/julia -DJULIA_ENABLE_THREADING=1 -fPIC -L/home/jollans/sw/julia-903644385b/lib -Wl,--export-dynamic -Wl,-rpath,/home/jollans/sw/julia-903644385b/lib -Wl,-rpath,/home/jollans/sw/julia-903644385b/lib/julia -ljulia '-Wl,-rpath,$ORIGIN'`
Delete object file "hello.o"
(master:✔) ~/sw/static-julia
0:jollans@mn70% cd builddir
(master:✔) ~/sw/static-julia/builddir
0:jollans@mn70% ./hello
fatal: error thrown and no exception handler available.
Base.InitError(mod=:LibGit2, error=ErrorException("error initializing LibGit2 module"))
rec_backtrace at /home/centos/buildbot/slave/package_tarball64/build/src/stackwalk.c:84
record_backtrace at /home/centos/buildbot/slave/package_tarball64/build/src/task.c:245
jl_throw at /home/centos/buildbot/slave/package_tarball64/build/src/task.c:564
__init__ at ./libgit2/libgit2.jl:920
unknown function (ip: 0x7f93fce64448)
jl_call_fptr_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:358 [inlined]
jl_apply_generic at /home/centos/buildbot/slave/package_tarball64/build/src/gf.c:1933
jl_apply at /home/centos/buildbot/slave/package_tarball64/build/src/julia.h:1424 [inlined]
jl_module_run_initializer at /home/centos/buildbot/slave/package_tarball64/build/src/toplevel.c:87
_julia_init at /home/centos/buildbot/slave/package_tarball64/build/src/init.c:733
julia_init at /home/centos/buildbot/slave/package_tarball64/build/src/task.c:297
main at ./hello (unknown line)
__libc_start_main at /lib64/libc.so.6 (unknown line)
unknown function (ip: 0x4008c8)
(master:✔) ~/sw/static-julia/builddir
1:jollans@mn70% lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: Scientific
Description: Scientific Linux release 7.4 (Nitrogen)
Release: 7.4
Codename: Nitrogen
The exact same procedure, with the exact same commit and julia version worked just fine for me on Ubuntu 17.04.
Same issue on Gentoo Linux, Kernel 4.12.0. Using Julia 0.6.1-pre.0 and static-julia master (82d86fe). Build output:
jpsamaroo@prometheus ~/static-julia $ julia juliac.jl -ve hello.jl
Program file:
"/home/jpsamaroo/static-julia/hello.jl"
Build directory:
"/home/jpsamaroo/static-julia/builddir"
Make build directory
Change to build directory
Build object file "hello.o":
`/opt/julia-0.6/usr/bin/julia -Cnative -J/opt/julia-0.6/usr/lib/julia/sys.so --compile=yes --depwarn=yes --startup-file=no --output-o hello.o -e 'include("/home/jpsamaroo/static-julia/hello.jl"); push!(Base.LOAD_CACHE_PATH, "/home/jpsamaroo/.julia/lib/v0.6"); empty!(Base.LOAD_CACHE_PATH)'`
Build shared library "libhello.so":
`gcc -m64 -shared -o libhello.so hello.o -std=gnu99 -I/opt/julia-0.6/usr/include/julia -DJULIA_ENABLE_THREADING=1 -fPIC -L/opt/julia-0.6/usr/lib -Wl,--export-dynamic -Wl,-rpath,/opt/julia-0.6/usr/lib -Wl,-rpath,/opt/julia-0.6/usr/lib/julia -ljulia`
Build executable file "hello":
`gcc -m64 -o hello /home/jpsamaroo/static-julia/program.c libhello.so -std=gnu99 -I/opt/julia-0.6/usr/include/julia -DJULIA_ENABLE_THREADING=1 -fPIC -L/opt/julia-0.6/usr/lib -Wl,--export-dynamic -Wl,-rpath,/opt/julia-0.6/usr/lib -Wl,-rpath,/opt/julia-0.6/usr/lib/julia -ljulia '-Wl,-rpath,$ORIGIN'`
Delete object file "hello.o"
Executing ./hello:
jpsamaroo@prometheus ~/static-julia/builddir $ ./hello
fatal: error thrown and no exception handler available.
Base.InitError(mod=:LibGit2, error=ErrorException("error initializing LibGit2 module"))
rec_backtrace at /opt/julia-0.6/src/stackwalk.c:84
record_backtrace at /opt/julia-0.6/src/task.c:245
jl_throw at /opt/julia-0.6/src/task.c:564
__init__ at ./libgit2/libgit2.jl:920
unknown function (ip: 0x7fddef457e88)
jl_call_fptr_internal at /opt/julia-0.6/src/julia_internal.h:339 [inlined]
jl_call_method_internal at /opt/julia-0.6/src/julia_internal.h:358 [inlined]
jl_apply_generic at /opt/julia-0.6/src/gf.c:1933
jl_apply at /opt/julia-0.6/src/julia.h:1424 [inlined]
jl_module_run_initializer at /opt/julia-0.6/src/toplevel.c:87
_julia_init at /opt/julia-0.6/src/init.c:733
julia_init at /opt/julia-0.6/src/task.c:297
main at ./hello (unknown line)
__libc_start_main at /lib/libc.so.6 (unknown line)
_start at ./hello (unknown line)
@tjol @jpsamaroo Are you using the generic Julia binaries from julialang.org?
Yes.
I'm able to easily reproduce this in a clean virtual machine:
- Install CentOS 7 from http://isoredirect.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1708.iso in (e.g.) VirtualBox.
- Install gcc & friends:
sudo yum groupinstall "Development Tools"
- Download and extract https://julialang-s3.julialang.org/bin/linux/x64/0.6/julia-0.6.0-linux-x86_64.tar.gz –
sudo yum install lynx
may be helpful. - Start julia to install dependencies:
for pkg in ["Distributions", "ArgParse", "UnicodePlots"] Pkg.add(pkg) end
-
git clone https://github.com/JuliaComputing/static-julia.git
- continue as in the previous comments.
I'm not using pre-packaged binaries, I'm building everything from source. Currently, all of my 0.6 Gentoo systems are having this same issue with static-julia master.
I solved it on linux
By copying:
joinpath(ROOT,"deps","julia","julia-0.6.0-linux-x86_64","share","julia","cert.pem")
and setting:
export SSL_CERT_FILE=$some_path/cert.pem
To add to @joaquimg 's reply, when using julia compiled from source, do the following (this command is assuming the julia directory is /opt/julia
): SSL_CERT_FILE=/opt/julia/usr/share/julia/cert.pem ./hello
. This worked well for me. Thanks @joaquimg !
(Of course, this obviously should be fixed in a cleaner way :smile:)