-
-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MbedTLS cert.perm is not packaged #710
Comments
Just ran into this myself. Posting stack trace, MWE reproducer and Stacktrace~ ❯ MyMbedTLSApp/bin/MyMbedTLS
fatal: error thrown and no exception handler available.
InitError(mod=:MbedTLS, error=Base.SystemError(prefix="opening file "/home/zephyr/MyMbedTLSApp/share/julia/cert.pem"", errnum=2, extrainfo=nothing))
#systemerror#81 at ./error.jl:176
systemerror##kw at ./error.jl:176
systemerror##kw at ./error.jl:176
#systemerror#80 at ./error.jl:175 [inlined]
systemerror at ./error.jl:175 [inlined]
#open#670 at ./iostream.jl:293
open at ./iostream.jl:275 [inlined]
#open#378 at ./io.jl:382
open at ./io.jl:381 [inlined]
read at ./io.jl:462 [inlined]
__sslinit__ at /home/zephyr/.julia/packages/MbedTLS/F2OjD/src/ssl.jl:807
__init__ at /home/zephyr/.julia/packages/MbedTLS/F2OjD/src/MbedTLS.jl:55
jfptr___init___40849.clone_1 at /home/zephyr/MyMbedTLSApp/lib/julia/sys.so (unknown line)
_jl_invoke at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-8/src/gf.c:2358 [inlined]
ijl_apply_generic at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-8/src/gf.c:2540
jl_apply at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-8/src/julia.h:1838 [inlined]
jl_module_run_initializer at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-8/src/toplevel.c:75
_finish_julia_init at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-8/src/init.c:763
julia_init at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-8/src/init.c:697
ijl_init_with_image at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-8/src/jlapi.c:74 [inlined]
ijl_init_with_image at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-8/src/jlapi.c:63
ijl_init at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-8/src/jlapi.c:90
main at MyMbedTLSApp/bin/MyMbedTLS (unknown line) Reproducerjulia> using Pkg, PackageCompiler;
julia> Pkg.generate("MyMbedTLS");
julia> Pkg.activate("MyMbedTLS");
julia> Pkg.add("MbedTLS");
julia> open("MyMbedTLS/src/MyMbedTLS.jl", "w") do io
write(io,
"""
module MyMbedTLS
function julia_main()::Cint
@info "Hello World!"
return 0
end
end
"""
)
end
julia> create_app("MyMbedTLS", "MyMbedTLSApp");
julia> exit()
~ ❯ MyMbedTLSApp/bin/MyMbedTLS # from a normal shell
[error stacktrace gets displayed] Version Infojulia> versioninfo()
Julia Version 1.8.0-rc3
Commit 33f19bcbd25 (2022-07-13 19:10 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 12 × Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
Threads: 10 on 12 virtual cores |
I tested the fix (9fb67a1) from @KristofferC and it works. Please merge this @KristofferC . |
When used after building a shared library, it seems to try to find the cert.pem file from the relative path to the Cpp main executable that loads this library, instead of relative to the julia lib path. Don' t know if it is easy to fix. Currently adding a symlink works. |
JuliaLang/MbedTLS.jl#219 (comment)
@KristofferC
The text was updated successfully, but these errors were encountered: