emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#36856: closed (build: Add julia-build-system)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#36856: closed (build: Add julia-build-system)
Date: Wed, 04 Sep 2019 20:22:01 +0000

Your message dated Wed, 4 Sep 2019 22:21:16 +0200
with message-id <address@hidden>
and subject line Re: [bug#36856] build: Add julia-build-system
has caused the debbugs.gnu.org bug report #36856,
regarding build: Add julia-build-system
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden.)


-- 
36856: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=36856
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: build: Add julia-build-system Date: Tue, 30 Jul 2019 12:49:43 +0000
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ò!

Attachment: 0001-build-Add-julia-build-system.patch
Description: Text Data

Attachment: 0002-add-many-julia-packages.patch
Description: Text Data


--- End Message ---
--- Begin Message --- 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 <address@hidden> a écrit :

> Yeah I forgot to attach the patches. Here we go
> 
> Il giorno sab 3 ago 2019 alle ore 10:03 Nicolò Balzarotti <
> address@hidden> 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 <  
> > address@hidden> 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 <  
> >> address@hidden> ha scritto:  
> >>  
> >>>
> >>> Julien Lepiller <address@hidden> writes:
> >>>  
> >>> > Le 30 juillet 2019 16:11:19 GMT+02:00, Ricardo Wurmus <
> >>> address@hidden> a écrit :  
> >>> >>
> >>> >>Nicolò Balzarotti <address@hidden> 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
> >>>
> >>>  



--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]