Skip to content
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_jll started failing to load #229

Open
joa-quim opened this issue Nov 17, 2020 · 10 comments
Open

MbedTLS_jll started failing to load #229

joa-quim opened this issue Nov 17, 2020 · 10 comments

Comments

@joa-quim
Copy link

joa-quim commented Nov 17, 2020

I don't know what caused it. Some update maybe (it happened after I tried to install GDAM.jl) but now I have this error that prevents me, for example, to use Pluto

[ Info: Precompiling Pluto [c3e4b0f8-55cb-11ea-2926-15256bba5781]
ERROR: LoadError: InitError: could not load library "C:\Users\joaqu\.julia\artifacts\766d976def66e8367dd690d05cfe422f883d43ba\bin\libmbedtls.dll"
The specified procedure could not be found.
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl .\libdl.jl:114
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl .\libdl.jl:114
  [3] macro expansion
    @ ~\.julia\packages\JLLWrappers\KuIwt\src\products\library_generators.jl:61 [inlined]
  [4] __init__()
    @ MbedTLS_jll ~\.julia\packages\MbedTLS_jll\bmmwH\src\wrappers\x86_64-w64-mingw32.jl:16

I have experience with this type of errors and so tried to find out but the DependencyWalker was no help this time and I couldn't figure out what is wrong. In the mean time I found that libgcc_s_seh-1.dll is a dependency that is not shipped with the artifact. Right, there is one that comes with the Julia but if Julia/bin is not in the path that dependency wont be found.

I wish the artifacts for Windows were build with Visual Studio and only came with the strict necessary number of files.

EDIT: Seems this the same as #228

@detrin
Copy link

detrin commented Nov 17, 2020

The nightly built of Coverage fails therefore as well. I can't run Coverage on windows-latest with Julia nightly in GitHub Actions see https://github.com/detrin/OpenQuantumSystems.jl/runs/1412424632?check_suite_focus=true

@joa-quim
Copy link
Author

OK, I gave myself the trouble of building MbedTLS on Windows with Visual Studio. At the end it worked but I had to overcome several shits. First and most, the cmake solution fot the lib doesn't work at all on Windows to build shared libs because no symbols at all are exported. Next, found the -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS option but then several symbols are export whilst on Windows we need to __declspec(dllexport).

As said, at the end I managed to make it work but this is no general solution before the MbedTLS improves the build system to allow true shared libs building on Windows (building the exes now errors because it wants more of those changes).

@detrin
Copy link

detrin commented Nov 17, 2020

I am Linux user and I have no experience using cmake under Windows. I am curious, what could cause such an issue.

@joa-quim
Copy link
Author

Using cmake is exactly equal on Linux or Windows. The problem is if the internal cmake recipes are not working well, which the case for Windows but not necessarily for Linux. Current issue seems to be due to a missing symbol in one of the shared libs, but I wasn't able to find out which.

@detrin
Copy link

detrin commented Nov 17, 2020

So how could I possibly help to resolve this issue?

@joa-quim
Copy link
Author

Don't know, I'm just giving the most details I can to the person who builds the MbedTLS_jll artifact, which needs to be fixed.

stillyslalom referenced this issue in JuliaPackaging/Yggdrasil Nov 21, 2020
Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
@visr
Copy link
Sponsor Contributor

visr commented Nov 23, 2020

See JuliaLang/julia#38409 (comment). Should hopefully soon be resolved when the linked PR merges.

@lkapelevich
Copy link

Looks like this and #228 are fixed now (JuliaLang/julia#38409 (comment))

@joa-quim
Copy link
Author

joa-quim commented Dec 4, 2020

OK, feel free to close. Meanwhile I had solved the problem by building MberTLS myself with Visual Studio.

@greimel
Copy link

greimel commented Dec 21, 2020

I don't know if it's related but I cannot precompile Pluto on macOS Catalina on current 1.6-release due to MbedTLS not precompiling.

It's been working on the nightly build that I've been using since now: 1.6.0-DEV.1325 (2020-10-24).

EDIT: I updated to macOS Big Sur last night and now MbedTLS precompiles.

EDIT2: Fails again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants