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

Don't hard-code libmbedcrypto.so version #40198

Open
haozhangphd opened this issue Mar 26, 2021 · 8 comments
Open

Don't hard-code libmbedcrypto.so version #40198

haozhangphd opened this issue Mar 26, 2021 · 8 comments

Comments

@haozhangphd
Copy link

haozhangphd commented Mar 26, 2021

On Arch Linux, Julia is built with USE_SYSTEM_MBEDTLS=1, and the current version of Mbed TLS on Arch Linux is 2.25. In MbedTLS_jil.jl, the version number of libmbedcrypto is hard-coded to libmbedcrypto.so.5, while Arch Linux only provides libmbedcrypto.so.6.

For this reason MbedTLS cannot be pre-compiled or loaded on Arch Linux. Is it possible to avoid hard-coding of the version number, and change line 34 to const libmbedcrypto = "libmbedcrypto.so" instead?

@StefanKarpinski
Copy link
Sponsor Member

Have you tried editing the version and seeing if libmbedcrypto.so.5 works?

@haozhangphd
Copy link
Author

Have you tried editing the version and seeing if libmbedcrypto.so.5 works?

I think you meant libmbedcrypto.so.6, as Julia currently has libmbedcrypto.so.5?

I tried libmbedcrypto.so.6, and it works perfectly. Also Arch Linux has patched the the distro's Julia installation, and removed the hard-coding of library version numbers everywhere (https://github.com/archlinux/svntogit-community/blob/packages/julia/trunk/julia-hardcoded-libs.patch). So I think this change is quite well tested by everyone who use Julia built by Arch Linux.

non-Jedi added a commit to non-Jedi/void-packages that referenced this issue Apr 7, 2021
When julia 1.6.0 vendors in mbedtls, it uses v2.26.0 which provides a
different set of sonames than the version provided by Void. We need to
patch where the library sonames are hardcoded to allow julia to properly
call into libraries provided by mbedtls.

Closes void-linux#29964

See <JuliaLang/julia#40198> for the upstream
bug.
non-Jedi added a commit to non-Jedi/void-packages that referenced this issue Apr 15, 2021
When julia 1.6.0 vendors in mbedtls, it uses v2.26.0 which provides a
different set of sonames than the version provided by Void. We need to
patch where the library sonames are hardcoded to allow julia to properly
call into libraries provided by mbedtls.

Closes void-linux#29964

See <JuliaLang/julia#40198> for the upstream
bug.
non-Jedi added a commit to non-Jedi/void-packages that referenced this issue May 6, 2021
When julia 1.6.0 vendors in mbedtls, it uses v2.26.0 which provides a
different set of sonames than the version provided by Void. We need to
patch where the library sonames are hardcoded to allow julia to properly
call into libraries provided by mbedtls.

Closes void-linux#29964

See <JuliaLang/julia#40198> for the upstream
bug.
non-Jedi added a commit to non-Jedi/void-packages that referenced this issue May 6, 2021
When julia 1.6.0 vendors in mbedtls, it uses v2.26.0 which provides a
different set of sonames than the version provided by Void. We need to
patch where the library sonames are hardcoded to allow julia to properly
call into libraries provided by mbedtls.

Closes void-linux#29964

See <JuliaLang/julia#40198> for the upstream
bug.
non-Jedi added a commit to non-Jedi/void-packages that referenced this issue May 11, 2021
Also change to using vendored llvm to reduce maintenance burden from julia depending on
versions of llvm which are quickly obsoleted (closes void-linux#30490); this should also fix julia's
build being broken on i686.

When julia 1.6.0 vendors in mbedtls, it uses v2.26.0 which provides a different set of
sonames than the version provided by Void. We need to patch where the library sonames are
hardcoded to allow julia to properly call into libraries provided by mbedtls.

Closes void-linux#29964 and void-linux#30061

See <JuliaLang/julia#40198> for the upstream
bug.
ahesford pushed a commit to void-linux/void-packages that referenced this issue May 16, 2021
Also change to using vendored llvm to reduce maintenance burden from
julia depending on versions of llvm which are quickly obsoleted; this
should also fix julia's build being broken on i686.

When julia 1.6.0 vendors in mbedtls, it uses v2.26.0 which provides a
different set of sonames than the version provided by Void. We need to
patch where the library sonames are hardcoded to allow julia to properly
call into libraries provided by mbedtls.

[Ed.: internal references to unversioned shlibs in this patch appear to
refer to symlnks that the julia package creates in /usr/lib/julia rather
than symlinks in /usr/lib that would require -devel dependencies.]

Upstream issue: JuliaLang/julia#40198

Closes: #30703 [via git-merge-pr]
Closes: #30490
Closes: #30061
Closes: #29964
hazayan pushed a commit to hazayan/void-packages that referenced this issue May 21, 2021
Also change to using vendored llvm to reduce maintenance burden from
julia depending on versions of llvm which are quickly obsoleted; this
should also fix julia's build being broken on i686.

When julia 1.6.0 vendors in mbedtls, it uses v2.26.0 which provides a
different set of sonames than the version provided by Void. We need to
patch where the library sonames are hardcoded to allow julia to properly
call into libraries provided by mbedtls.

[Ed.: internal references to unversioned shlibs in this patch appear to
refer to symlnks that the julia package creates in /usr/lib/julia rather
than symlinks in /usr/lib that would require -devel dependencies.]

Upstream issue: JuliaLang/julia#40198

Closes: void-linux#30703 [via git-merge-pr]
Closes: void-linux#30490
Closes: void-linux#30061
Closes: void-linux#29964
gbrlsnchs pushed a commit to gbrlsnchs/void-packages that referenced this issue May 24, 2021
Also change to using vendored llvm to reduce maintenance burden from
julia depending on versions of llvm which are quickly obsoleted; this
should also fix julia's build being broken on i686.

When julia 1.6.0 vendors in mbedtls, it uses v2.26.0 which provides a
different set of sonames than the version provided by Void. We need to
patch where the library sonames are hardcoded to allow julia to properly
call into libraries provided by mbedtls.

[Ed.: internal references to unversioned shlibs in this patch appear to
refer to symlnks that the julia package creates in /usr/lib/julia rather
than symlinks in /usr/lib that would require -devel dependencies.]

Upstream issue: JuliaLang/julia#40198

Closes: void-linux#30703 [via git-merge-pr]
Closes: void-linux#30490
Closes: void-linux#30061
Closes: void-linux#29964
@Oblynx
Copy link
Contributor

Oblynx commented Nov 24, 2021

I had the same issue on Fedora with the latest upgrade of the COPR package nalimilan/julia.

Making the change referenced above solved it (L9-14 here)

@vchuravy
Copy link
Sponsor Member

cc: @nalimilan ^^

@nalimilan
Copy link
Member

Ah, good catch, the patch wasn't actually applied due to a buggy condition. I've triggered a new build which seems to have fixed it.

@Oblynx
Copy link
Contributor

Oblynx commented Nov 25, 2021

Grazie!

@ViralBShah
Copy link
Member

ViralBShah commented Feb 8, 2022

I think that #43223 addresses the issue more generally - and thus closing this. Please reopen if not the case.

@nalimilan
Copy link
Member

Usually we don't close issues until a PR that fixes them has been merged.

@ViralBShah ViralBShah reopened this Feb 9, 2022
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

Successfully merging a pull request may close this issue.

6 participants