FS#57387 - [julia] Requires a patched version of LLVM
Attached to Project:
Community Packages
Opened by Samuele Disegna (smldis) - Monday, 05 February 2018, 21:33 GMT
Last edited by Alexander F. Rødseth (xyproto) - Thursday, 01 March 2018, 11:56 GMT
Opened by Samuele Disegna (smldis) - Monday, 05 February 2018, 21:33 GMT
Last edited by Alexander F. Rødseth (xyproto) - Thursday, 01 March 2018, 11:56 GMT
|
Details
Description:
julia language is using several patches for ad hoc functionality in LLVM 3.9. This can cause unexpected behavior in users programs. Core developers suggest to use the official binary. We should keep very careful up to date with the development or it is better to remove this package from community and allow an AUR version with the official binary. For an example look at: https://github.com/JuliaNLSolvers/NLsolve.jl/issues/123 Additional info: * version 0.6.2 |
This task depends upon
Closed by Alexander F. Rødseth (xyproto)
Thursday, 01 March 2018, 11:56 GMT
Reason for closing: No response
Additional comments about closing: Using the files included with Julia instead of depending on packages available on the system, for now. This is because Julia requires dependencies to be patched.
Thursday, 01 March 2018, 11:56 GMT
Reason for closing: No response
Additional comments about closing: Using the files included with Julia instead of depending on packages available on the system, for now. This is because Julia requires dependencies to be patched.
Anyway, it is possible to apply a list of patches to llvm in order to make it work but given the very fast development of julia it can be difficult to follow.
As a user I would ask to drop official community support if this kind of packaging is discouraged. (Obviously these bugs are awful for both communities).
Also the wiki should report this somehow.
@arojas I will propose what you suggested if you really think it's a good choice.
When building Julia, the choices are between:
1) USE_SYSTEM_LLVM=1 and then depend on the llvm39 package in [extra]
and
2) USE_SYSTEM_LLVM=0 and use the specially crafted LLVM sources that comes with Julia.
I think 2 is a horrible idea and that Julia should be moved to AUR before we set USE_SYSTEM_LLVM=0.
I think 1 is sub-optimal too, and that Julia should use the latest version of LLVM that is installed on the system.
Any other options? Thoughts? Ideas?
- (1) is not fine since extra's LLVM will get the patches merged later than the julia release. Also building julia with a different LLVM version than what is officially shipped now would usually cause a big performance impact. Since the development is not focusing on the performance of upstream LLVM (for now).
The model Arch Linux is built around is to let package depend on each other, and always use the latest release of every package while also avoiding patches, whenever possible; to let upstream develop and packagers package. If this approach is "good" or "bad" is up for discussion, but I believe the current model of including modified LLVM sources in the Julia source code repository is not a good fit for the packaging model that Arch Linux uses.
* Julia is not currently a depenceny of other packages, only cantor has it listed as an optional dependency.
* Moving Julia to AUR would not solve the technical issues that the Julia project are facing, but it changes the status of the package and what users can expect in terms of support.
I agree that there is no need to rush a move to AUR, but I do think it's one valid option (among many).
I think that moving to AUR (shipping the official binary) is still a good temporary option. Julia development will focus more on LLVM after 1.0 (that is coming this early year).
For future reference for building julia and patching LLVM, here you can find the patches: https://github.com/JuliaLang/julia/tree/master/deps/patches and probably you can follow the offical buildscripts until someone get to follow the community and get all the information it is needed to take care of users.
@smldis nothing prevents anybody from pushing a julia-bin package to AUR which bundles the upstream binary, there are many examples of that. And certainly there's nothing wrong with upstream Julia recommending Arch users to install the julia-bin package. But ideally we should collaborate to have a package in our repos that solves these issues in a way that is satisfactory for both parties.
@smldis It's not just LLVM. Julia also includes sources that are currently used for: OPENLIBM, OPENSPECFUN, BLAS, LAPACK, LIBUV, UTF8PROC and DSFMT.
@xyproto AFAIK Julia does not need any patches for these libraries, except libuv which is a fork (but it's also a small dependency). At least in Fedora I just use the standard packages.
FWIW, if you want to see the LLVM patches we use in Fedora (some are needed by other projects than Julia):
https://src.fedoraproject.org/cgit/rpms/llvm3.9.git/tree/
When it comes to llvm39 in Arch Linux, Julia is the **only** dependency, amongst the official packages: https://www.archlinux.org/packages/extra/x86_64/llvm39/
To be fair, Blender depends on llvm35 (as the only official package), so Julia is not the only exception.
If llvm39 could be removed entirely (from the official package collection, and moved to the unofficial one at AUR), I think that would be advantageous.
Both patching the llvm39 package specifically for for Julia, or using a custom version of LLVM that comes with Julia, is, IMO, not compatible with The Arch Way.
Please report this problem upstream and ask Julia developers to support an unpatched version of LLVM; be it LLVM 3.5, 3.9, 5.0 or the latest version at any time.
There are many other constraints and priorities to take care of before reaching that goal. The ETA is not clear and that's why a temporary solution can be helpful for users.
Thank you everybody for being so committed on the topic :)
The updated julia package will appear in [community] shortly.
Did you run the testsuite?