FS#63536 - [julia] Unable to update packages

Attached to Project: Community Packages
Opened by Alex Seiler (aexl) - Friday, 23 August 2019, 07:14 GMT
Last edited by Alexander F. Rødseth (xyproto) - Monday, 26 August 2019, 11:31 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Alexander F. Rødseth (xyproto)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 8
Private No

Details

Description: I have first deleted my julia directory ($HOME/.julia). After starting Julia 1.2.0, moving into "pkg"-mode (by typing "]") and using the "update" command, I get this error:

(v1.2) pkg> update
Cloning default registries into `~/.julia`
Cloning registry from "https://github.com/JuliaRegistries/General.git"
ERROR: could not load library "libgit2"
libcurl.so.4: ELF load command address/offset not properly aligned
Stacktrace:
[1] #up#43(::Pkg.Types.UpgradeLevel, ::Pkg.Types.PackageMode, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Pkg.API.up), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /build/julia/src/julia-1.2.0/usr/share/julia/stdlib/v1.2/Pkg/src/API.jl:149
[2] up at /build/julia/src/julia-1.2.0/usr/share/julia/stdlib/v1.2/Pkg/src/API.jl:143 [inlined]
[3] do_up!(::Dict{Symbol,Any}, ::Array{Pkg.Types.PackageSpec,1}, ::Dict{Symbol,Any}) at /build/julia/src/julia-1.2.0/usr/share/julia/stdlib/v1.2/Pkg/src/REPLMode.jl:483
[4] invokelatest(::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:789

This issue has also been reported upstream: https://github.com/JuliaLang/julia/issues/33038


Additional info:
* package version(s): julia-2:1.2.0-1

Steps to reproduce:
* Remove $HOME/.julia
* Open julia
* Type ]
* Type update
This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Monday, 26 August 2019, 11:31 GMT
Reason for closing:  Fixed
Comment by CR (g33kscientist) - Friday, 23 August 2019, 09:39 GMT
Also reported here with the tag julia https://bugs.archlinux.org/task/63537?project=5&string=julia

I also came across this problem. I tried the original binaries as per in the ticket https://github.com/JuliaLang/julia/issues/33038 (the user also uses Arch) and it does work fine, so it's an Arch issue.

I downloaded the PKGBUILD + additional files, and I found that line 11 of Maker.user is:

override USE_SYSTEM_LIBGIT2 = 0

I set it to 1 (so, override USE_SYSTEM_LIBGIT2 = 1), recompiled, and it works fine.
Comment by Marcel Dijkstra (MDykstra) - Friday, 23 August 2019, 11:10 GMT
Also have this issue, but first I have to remove "General" registry.

pkg> update
Updating registry at `~/.julia/registries/General`
ERROR: UndefVarError: repo not defined

pkg> registry rm General
pkg> registry add General
Cloning registry from "https://github.com/JuliaRegistries/General.git"
ERROR: could not load library "libgit2"
libcurl.so.4: ELF load command address/offset not properly aligned

Using "USE_SYSTEM_LIBGIT2 = 1" override gave an error in some unit test.
Comment by CR (g33kscientist) - Friday, 23 August 2019, 11:16 GMT
Yes it does, there is only one error reported and it's the test for libgit2 that fails for some reason (the compilation of julia reported no errors whatsoever).

I commented the check() function in the PKGBUILD and re-made the package. Installs fine, and works as expected including updating the repositories.
Comment by Eli Schwartz (eschwartz) - Sunday, 25 August 2019, 03:24 GMT
So using the Julia fork of libgit2 passes the testsuite but produces unworking code, and using the system version of libgit2 fails the testsuite but produces working code?

Beautiful.
Comment by Marcel Dijkstra (MDykstra) - Sunday, 25 August 2019, 09:29 GMT
Correct, I have working Julia now commenting check() in PKGBUILD, setting "USE_SYSTEM_LIBGIT2 = 1" in "Make.user" file, suggested by g33kscientist.
Comment by Alexander F. Rødseth (xyproto) - Monday, 26 August 2019, 10:21 GMT
Thanks for reporting.

I am reluctantly setting USE_SYSTEM_LIBGIT2 to 1. I wish Julia could use the libraries that are already installed on the system.

The updated julia package should appear in [community] shortly.

Loading...