GNU bug report logs - #36856
build: Add julia-build-system

Previous Next

Package: guix-patches;

Reported by: Nicolò Balzarotti <anothersms <at> gmail.com>

Date: Tue, 30 Jul 2019 12:51:01 UTC

Severity: normal

Done: Julien Lepiller <julien <at> lepiller.eu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Nicolò Balzarotti <anothersms <at> gmail.com>
Subject: bug#36856: closed (Re: [bug#36856] build: Add julia-build-system)
Date: Wed, 04 Sep 2019 20:22:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#36856: build: Add julia-build-system

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 36856 <at> debbugs.gnu.org.

-- 
36856: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=36856
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Julien Lepiller <julien <at> lepiller.eu>
To: Nicolò Balzarotti <anothersms <at> gmail.com>
Cc: Ricardo Wurmus <rekado <at> elephly.net>, 36856-done <at> debbugs.gnu.org
Subject: Re: [bug#36856] build: Add julia-build-system
Date: Wed, 4 Sep 2019 22:21:16 +0200
Hi Nicolò,

I've just pushed your patches as
a44a535ebecd40c52514623a44d31d927ecca9da and
11d73fb412d8728cf916eff9d9750be0bb593076. Sorry for the delay!

I took the liberty to remove some whitespace errors and transform tabs
into spaces, as well as changing the changelog from your second patch.

I'm closing this thread now, so please send your julia packages to a
new bug when they are ready (don't forget to fill in the description,
synopsis, and run guix lint :))

Julien

Le Sat, 3 Aug 2019 10:04:20 +0000,
Nicolò Balzarotti <anothersms <at> gmail.com> a écrit :

> Yeah I forgot to attach the patches. Here we go
> 
> Il giorno sab 3 ago 2019 alle ore 10:03 Nicolò Balzarotti <
> anothersms <at> gmail.com> ha scritto:  
> 
> > Hi, I'm back.
> >
> > I fixed the problem I had (I forgot the ./pre-inst-env -.-")
> >
> > Following this discussion, I'm adding ``native-search-paths'' to
> > the julia package. Now, without any other hack (like the setup.jl
> > one), it can find the packages but only when installed with guix
> > package -i . It cannot find them when in an environment (guix
> > environment --ad-hoc julia-package). Can you help?
> >
> > Except from this, I cleaned everything a bit, and added a draft of
> > the documentation. I'm attaching the new patches here (without the
> > julia-xyz part one, to which I'll add all package synopsis and
> > description, and I'll split in multiple patches before
> > re-submitting).
> >
> > Thanks, Nicolò
> >
> > Il giorno mar 30 lug 2019 alle ore 16:02 Nicolò Balzarotti <  
> > anothersms <at> gmail.com> ha scritto:  
> >  
> >> Thanks for the quick response!
> >>
> >> Well, the environment variable JULIA_LOAD_PATH (that inside julia
> >> is just LOAD_PATH) works exactly like that (is a
> >> column-concatenated path list). It just needs the special
> >> ":@stdlib" path to let julia find its standard libraries.
> >> Example:  
> >> > JULIA_LOAD_PATH=/my/new/path/:/profile/path/:@stdlib julia
> >> > --startup=no  
> >> -E 'LOAD_PATH'
> >> ["/my/new/path/", "/profile/path/", "@stdlib"]
> >>
> >> Is setting this variable from guix fine, or we need a special
> >> GUIX_SOMETHING variable?
> >> Where exactly should I set this?
> >>
> >> Thanks
> >>
> >> Il giorno mar 30 lug 2019 alle ore 14:33 Ricardo Wurmus <  
> >> rekado <at> elephly.net> ha scritto:  
> >>  
> >>>
> >>> Julien Lepiller <julien <at> lepiller.eu> writes:
> >>>  
> >>> > Le 30 juillet 2019 16:11:19 GMT+02:00, Ricardo Wurmus <
> >>> rekado <at> elephly.net> a écrit :  
> >>> >>
> >>> >>Nicolò Balzarotti <anothersms <at> gmail.com> writes:
> >>> >>  
> >>> >>> 3. By adding a simple startup.jl script, inspired by what
> >>> >>> emacs does.  
> >>> >>This  
> >>> >>> is simplified so I'm not sure it works for every corner case.
> >>> >>> #+begin_src julia
> >>> >>> let paths = [expanduser("~/.guix-profile"),  
> >>> >>"/run/current-system/profile"]  
> >>> >>>     ("GUIX_ENVIRONMENT" in keys(ENV)) && push!(paths,
> >>> >>> ENV["GUIX_ENVIRONMENT"])
> >>> >>>     empty!(LOAD_PATH)
> >>> >>>     push!.(Ref(LOAD_PATH), joinpath.(paths,
> >>> >>> "share/julia/packages/")) push!(LOAD_PATH, "@stdlib")
> >>> >>>     push!.(Ref(DEPOT_PATH), joinpath.(paths, "share/julia/"))
> >>> >>>     nothing
> >>> >>> end
> >>> >>> #+end_src  
> >>> >>
> >>> >>Could this perhaps be handled by a profile hook that is
> >>> >>included only when the profile manifest contains a julia
> >>> >>package?  
> >>> >
> >>> > Or simply with an environment variable? GUIX_JULIA_PATH or
> >>> > something?  
> >>>
> >>> If this is the route you go down, please ensure that it can be
> >>> used as a search path with more than one directory.  This would
> >>> make it possible to extend a Julia environment with the contents
> >>> of more than one profile.
> >>>
> >>> --
> >>> Ricardo
> >>>
> >>>  


[Message part 3 (message/rfc822, inline)]
From: Nicolò Balzarotti <anothersms <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: build: Add julia-build-system
Date: Tue, 30 Jul 2019 12:49:43 +0000
[Message part 4 (text/plain, inline)]
Hello people! :)

Lately I've been working a bit on julia packages support in guix.

The good news first: I've been able to install dozen of them, including
those depending on binaryprovider with simple workarounds.
1. By writing manually the deps.jl file (the one that saves the path of
dynamic libraries in a julia const)
2. By "manually" writing required Package.toml files for old packages that
are not using it yet (else julia cannot find them)
3. By adding a simple startup.jl script, inspired by what emacs does. This
is simplified so I'm not sure it works for every corner case.
#+begin_src julia
let paths = [expanduser("~/.guix-profile"), "/run/current-system/profile"]
    ("GUIX_ENVIRONMENT" in keys(ENV)) && push!(paths,
ENV["GUIX_ENVIRONMENT"])
    empty!(LOAD_PATH)
    push!.(Ref(LOAD_PATH), joinpath.(paths, "share/julia/packages/"))
    push!(LOAD_PATH, "@stdlib")
    push!.(Ref(DEPOT_PATH), joinpath.(paths, "share/julia/"))
    nothing
end
#+end_src

With those, I've been able to install the following (with their
dependencies):
- Plots.jl (GR.jl backend)
- HTTP.jl
- Gtk.jl
- Gumbo.jl/Cascadia.jl
- FileIO.jl
- CSVFiles.jl ;; TODO: Fix warnings
- JSON.jl
- JSON2.jl
- MsgPack.jl
- DataFrames.jl
- Query.jl
- SQLite.jl
- Interact.jl

There is a phase called 'precompile' even if I could not get julia actually
use the precompiled packages. This is similar to what emacs does (.el ->
.elc). Even if currently this cache is not used, is useful to have this
phase to verify that package import works.

Now the bad news: this patch is really big (mostly because I wanted to be
sure that in principle installing every package is possible. Before
splitting the second patch into multiple small ones, I wanted to be sure
that what I'm doing is somewhat correct.

Also, even if I was able to install those by using a separate folder (with
guix environment -L .), I'm getting this error now, and I don't know what
is causing it (since I'm not touching those files):

#+begin_example
   626:19  2 (_ #<directory (gnu packages gnuzilla) 805fd20>)
   293:34  1 (_ #(#(#(#(#(#(#(#(#(#(#(#(#<directory (gnu packages gnuzilla)
805fd20> "60.8.0") "60") "8") "0") "60.8.0esr") #<origin "
https://ftp.mozilla.org/pub/firefox/releas?>) #) #) #) #) #) #))
    159:9  0 (_ #(#(#(#(#(#(#(#(#(#(#(#(#<directory (gnu packages gnuzilla)
805fd20> "60.8.0") "60") "8") "0") "60.8.0esr") #<origin "
https://ftp.mozilla.org/pub/firefox/releas?>) #) #) #) #) #) #))

ice-9/eval.scm:159:9: Throw to key `srfi-34' with args `(#<condition
&message [message: "icecat-makeicecat.patch: patch not found"] 8eeae0>)'.
#+end_example

I hope somebody is willed to help getting this in a good state :)
Thanks, Nicolò!
[Message part 5 (text/html, inline)]
[0001-build-Add-julia-build-system.patch (text/x-patch, attachment)]
[0002-add-many-julia-packages.patch (text/x-patch, attachment)]

This bug report was last modified 5 years and 258 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.