-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add MbedTLS as a stdlib #32706
Add MbedTLS as a stdlib #32706
Conversation
None of the MbedTLS files should actually be commited to this repo. They get pulled in during building from a repo at a certain commit. Look at how Pkg does it: Lines 21 to 23 in 16fdcf7
and https://github.com/JuliaLang/julia/blob/master/stdlib/Pkg.version |
e06ecba
to
e2ccb60
Compare
Hmmmm, anyone know what this error is? Mmap ─────────── 0.146358 seconds
Serialization ── 2.594393 seconds
Libdl ────────── 0.092973 seconds
Markdown ─────── 2.888116 seconds
MbedTLS ──────── 10.474995 seconds
error during bootstrap:
LoadError("sysimg.jl", 16, LoadError("/Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/LibGit2/src/LibGit2.jl", 21, LoadError("/Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/LibGit2/src/utils.jl", 44, ErrorException("error compiling version: could not load library \"libgit2\"\ndlopen(libgit2.dylib, 1): Library not loaded: @rpath/libmbedcrypto.3.dylib\n Referenced from: /Users/julia/buildbot/worker/package_macos64/build/usr/lib/libgit2.dylib\n Reason: image not found"))))
rec_backtrace at /Users/julia/buildbot/worker/package_macos64/build/src/stackwalk.c:94
record_backtrace at /Users/julia/buildbot/worker/package_macos64/build/src/task.c:224
jl_throw at /Users/julia/buildbot/worker/package_macos64/build/src/task.c:463
jl_rethrow_with_add at /Users/julia/buildbot/worker/package_macos64/build/src/codegen.cpp:791
jl_compile_linfo at /Users/julia/buildbot/worker/package_macos64/build/src/codegen.cpp:1201
jl_compile_method_internal at /Users/julia/buildbot/worker/package_macos64/build/src/gf.c:1778
_jl_invoke at /Users/julia/buildbot/worker/package_macos64/build/src/gf.c:2048 [inlined]
jl_apply_generic at /Users/julia/buildbot/worker/package_macos64/build/src/gf.c:2213
jl_apply at /Users/julia/buildbot/worker/package_macos64/build/src/./julia.h:1630 [inlined]
do_call at /Users/julia/buildbot/worker/package_macos64/build/src/interpreter.c:328
eval_stmt_value at /Users/julia/buildbot/worker/package_macos64/build/src/interpreter.c:368 [inlined]
eval_body at /Users/julia/buildbot/worker/package_macos64/build/src/interpreter.c:764
jl_interpret_toplevel_thunk_callback at /Users/julia/buildbot/worker/package_macos64/build/src/interpreter.c:888
Interpreter frame (ip: 1)
Core.CodeInfo(code=Array{Any, (4,)}[
Expr(:const, :VERSION),
Expr(:call, :version), Is that something anyone has seen before? Or maybe loading the MbedTLS stdlib package before libgit2 is making things weird somehow. |
I've run into something like that before. I think it was libssh2 that had gotten confused about the build state. I didn't know why, so I just wiped away my deps state locally. |
995a751
to
d64c004
Compare
@KristofferC or @fredrikekre, do either of you (or anyone else!) have any ideas on my failure here? It's trying to call |
So the CI is looking pretty good on this now, though I'm not sure if the OSX or win32 CI failures should be worrisome or not; they both have "libgit2 library not found" errors. Did I see something change w/ those recently? What about the overall review process on this; anyone up for taking a look or want to review/provide feedback? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me; I say we merge this and march towards an HTTP.jl
stdlib.
Manifests with MbedTLS as a stdlib will probably confuse Pkg on Julia versions before it was made into an stdlib. But I guess we'll see what happens. |
We should try it and if it causes confusion, we can teach Pkg to handle it smoothly, so that way it won't be a breaking change. It could maybe print a warning that it can't use the version of MbedTLS requested because MbedTLS has become a stdlib and that it's proceeding with that. |
Yeah sure, I was more worried about manifests from 1.4 being used in pre 1.4 julias. |
We don't promise anything about compatibility in that direction, so 🤷♂ |
Barring major concerns, I'll merge this in the next day or two. |
stdlib/Makefile
Outdated
PKG_GIT_URL := git://github.com/JuliaLang/Pkg.jl.git | ||
PKG_TAR_URL = https://api.github.com/repos/JuliaLang/Pkg.jl/tarball/$1 | ||
|
||
MBEDTLS_GIT_URL := git://github.com/JuliaWeb/MbedTLS.jl.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move this to JuliaLang?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes good idea.
base/sysimg.jl
Outdated
@@ -28,6 +28,7 @@ let | |||
:Serialization, | |||
:Libdl, | |||
:Markdown, | |||
:MbedTLS, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fredrikekre, if I just remove this, will MbedTLS still be accessible like using MbedTLS
, but it won't be precompiled? Does anyone think that's worth it? (i.e. smaller sysimg size since MbedTLS module doesn't really need to be precompiled)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct (I think). One advantage is that you can still load a (different) package named MbedTLS :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that seems to work as expected. I'll remove it from this list then.
I moved MbedTLS.jl to JuliaLang org and switched the url in this PR. |
I don't think the CI failures are related. |
I am guessing we don't need this anymore. If so, close? |
I'd still like to do this; I've just been waiting until 1.4 is released to update it. |
How does this relate to the 1.4 release timing? It seems like it's a feature freeze that should matter. It's too late to change this to get into the 1.4 release but it could be changed for 1.5 anytime. |
Ah, I didn't realize we had already branched 1.4. |
No description provided.