help-guix
[Top][All Lists]
Advanced

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

Re: Help packaging R Quarto Cli


From: Sébastien Rey-Coyrehourcq
Subject: Re: Help packaging R Quarto Cli
Date: Mon, 14 Nov 2022 23:30:47 +0100
User-agent: mu4e 1.8.11; emacs 28.2

Hi,

After some day of packaging rust crate, i progress and deno start to compile … 
but after 1min i have this error when cargo start compiling *rust-v8-0.49* . 
Any rust + guix help appreciated.

I push the channel to reproduce the problem here :

The rust scm repo : git.sr.ht:~reyman/rust-channel
Channel info to put into *channels.scm* : <https://paste.debian.net/1260722>
The *rust-deno.scm* file to build : <https://paste.debian.net/1260723>
The command : guix time-machine -C channels.scm – build -f rust-deno.scm

And the rust error :

—

error: failed to run custom build command for `v8 v0.49.0`

Caused by:
  process didn’t exit successfully: 
`/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/build/v8-bbb68ec56db1d802/build-script-build`
 (exit status: 101)
  — stdout
  cargo:rerun-if-changed=.gn
  cargo:rerun-if-changed=BUILD.gn
  cargo:rerun-if-changed=src/binding.cc
  cargo:rerun-if-env-changed=CCACHE
  cargo:rerun-if-env-changed=CLANG_BASE_PATH
  cargo:rerun-if-env-changed=DENO_TRYBUILD
  cargo:rerun-if-env-changed=DOCS_RS
  cargo:rerun-if-env-changed=GN
  cargo:rerun-if-env-changed=GN_ARGS
  cargo:rerun-if-env-changed=HOST
  cargo:rerun-if-env-changed=NINJA
  cargo:rerun-if-env-changed=OUT_DIR
  cargo:rerun-if-env-changed=RUSTY_V8_ARCHIVE
  cargo:rerun-if-env-changed=RUSTY_V8_MIRROR
  cargo:rerun-if-env-changed=SCCACHE
  cargo:rerun-if-env-changed=V8_FORCE_DEBUG
  cargo:rerun-if-env-changed=V8_FROM_SOURCE
  cargo:rustc-link-lib=static=rusty_v8
  download lockfile: 
“/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/build/lib_download.fslock”
  static lib URL: 
<https://github.com/denoland/rusty_v8/releases/download/v0.49.0/librusty_v8_release_x86_64-unknown-linux-gnu.a>
  
cargo:rustc-link-search=/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/gn_out/obj
  Downloading 
<https://github.com/denoland/rusty_v8/releases/download/v0.49.0/librusty_v8_release_x86_64-unknown-linux-gnu.a>
  Python downloader failed, trying with curl.

  — stderr
  thread ’main’ panicked at ’called `Result::unwrap()` on an `Err` value: Os { 
code: 2, kind: NotFound, message: “No such file or directory” }’, 
/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/guix-vendor/rust-v8-0.49.0.tar.gz/build.rs:405:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish…
error: build failed
error: in phase ’build’: uncaught exception:
%exception #<&invoke-error program: “cargo” arguments: (“build” “–release”) 
exit-status: 101 term-signal: #f stop-signal: #f>
phase `build’ failed after 105.5 seconds
command “cargo” “build” “–release” failed with status 101
builder for `/gnu/store/g4m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv’ 
failed with exit code 1
la compilation de 
/gnu/store/g4m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv a échoué
Vous trouverez le journal de compilation dans « 
/var/log/guix/drvs/g4/m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv.gz ».
guix build: erreur : build of 
`/gnu/store/g4m5c558l1q4g1kggzg2v9vkw352nnaj-rust-deno-1.25.2.drv’ failed


Wojtek Kosior <koszko@koszko.org> writes:


>> > I think I almost understand your approach. Just a quick question - what
>> > Guix command are you using to try building? With this setup I’d try
>> > something like
>> >
>> >     guix shell -L ./export/ rust-deno
>> >
>>
>> Actually, from export folder i try :
>> i try *guix build -L . -f rust-deno-1.scm*
>
> I see in your repo that rust-deno-1.scm is a module file (i.e. it has
> “define-module” at the top), so you’re not expected to use it with
> “-f”. Instead, you can rely on Guix loading it (because it is inside the
> directory passed via “-L”) and just do
>
>     guix build -L . rust-deno
>
> Where “rust-deno” is the same as in the package’s “name” property.
>
>> But the module are not loaded, i don’t understand well the way guix load 
>> module it seems.
>>
>> Into rust-deno-1.scm i put :
>>
>> (define-module (rust-deno-1 rust-deno-1)
>>  #:use-module (rust-cache-control-0.2 rust-cache-control-0.2)
>>
>> and into ./rust-cache-control-0.2/rust-cache-control-0.2.scm i put :
>>
>> (define-module (rust-cache-control-0.2 rust-cache-control-0.2)
>>
>> But any of this pass using the *guix build* command :
>>
>> `no code for module (rust-cache-control-0.2 rust-cache-control-0.2)’
>
> Perhaps modules can’t contain periods (’.’)? I’m not sure - too little
> experience with scheme. I’d try giving them names without version
>
>
> Wojtek
>
>
> – (sig_start)
> website: <https://koszko.org/koszko.html>
> PGP: <https://koszko.org/key.gpg>
> fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
>
> Meet Kraków saints!           #12: saint Jadwiga Andegaweńska
> Poznaj świętych krakowskich!  #12: święta Jadwiga Andegaweńska
> <https://pl.wikipedia.org/wiki/Jadwiga_Andegaweńska>
> – (sig_end)
>
>
> On Fri, 28 Oct 2022 23:32:10 +0200
> Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:
>
>> Wojtek Kosior <koszko@koszko.org> writes:
>>
>> > I think I almost understand your approach. Just a quick question - what
>> > Guix command are you using to try building? With this setup I’d try
>> > something like
>> >
>> >     guix shell -L ./export/ rust-deno
>> >
>>
>> Actually, from export folder i try :
>> i try *guix build -L . -f rust-deno-1.scm*
>>
>> But the module are not loaded, i don’t understand well the way guix load 
>> module it seems.
>>
>> Into rust-deno-1.scm i put :
>>
>> (define-module (rust-deno-1 rust-deno-1)
>>  #:use-module (rust-cache-control-0.2 rust-cache-control-0.2)
>>
>> and into ./rust-cache-control-0.2/rust-cache-control-0.2.scm i put :
>>
>> (define-module (rust-cache-control-0.2 rust-cache-control-0.2)
>>
>> But any of this pass using the *guix build* command :
>>
>> `no code for module (rust-cache-control-0.2 rust-cache-control-0.2)’
>>
>>
>> > and then I’d put
>> >
>> >     (define-module (rust-ecdsa-0.14 rust-ecdsa-0.14)
>> >       #:use-module (rust-serdect-0.1 rust-serdect-0.1))
>> >
>> > inside `./export/rust-ecdsa-0.14/rust-ecdsa-0.14.scm`. That’s how guile
>> > modules work - a module is identified by a list of symbols that match
>> > module file’s path (starting from a guile’s modules root directory, in
>> > this case the one passed via the `-L` option).
>> >
>> >> If that works locally i suppose i could sent a patch with all the
>> >> rust modules needed to build Deno ?
>> >
>> > A patch would then expect the module(s) to be put under gnu/packages in
>> > the Guix repo and then their `#:use-module` lines would need to be
>> > modified accordingly… So you’d need to make these small adaptations
>> > first.
>> >
>> > Honestly, I haven’t been submitting patches before and I don’t know
>> > exactly what module structure Guix devs expect. Perhaps someone else
>> > may help you here.
>> >
>> > Anyway, it seems right now you just have the result of running
>> > `guix import` and you have not yet built any of those recipes? I don’t
>> > want to be pessimistic but here’s a warning - there’ll surely be some
>> > fixes you’ll have to make. Be prepared to dive into scheme :)
>> >
>>
>> I first put all the things into deno.scm, with thousand of lines, that 
>> compile a little… and i changing my mind finally …
>> imho the module way is perhaps less discouraging : Resolving bug modules by 
>> modules…
>>
>> I push some corrections to my python script to generate good module name 
>> when i found.
>>
>> Yes, i probably need some guile diving …
>>
>> Best,
>> Sr-C.
>>
>> > Best,
>> > Wojtek
>> >
>> > – (sig_start)
>> > website: <https://koszko.org/koszko.html>
>> > PGP: <https://koszko.org/key.gpg>
>> > fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
>> >
>> > Meet Kraków saints!           #16: saint Jan z Dukli
>> > Poznaj świętych krakowskich!  #16: święty Jan z Dukli
>> > <https://pl.wikipedia.org/wiki/Jan_z_Dukli>
>> > – (sig_end)
>> >
>> >
>> > On Fri, 28 Oct 2022 18:19:32 +0200
>> > Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr> wrote:
>> >
>> >> Hi,
>> >>
>> >> Wojtek Kosior <koszko@koszko.org> writes:
>> >>
>> >> >> Hi,
>> >> >>
>> >> >> I continue the packaging using guix import crate, this is a slow 
>> >> >> process, but everything goes well at this time.
>> >> >>
>> >> >> My file deno.scm contain 6000 line, with all packages imported, this 
>> >> >> is a problem because i need to remove duplicate.
>> >> >> The best way was probably to export all `(define public method … )`  
>> >> >> into a folder with corresponding library.scm.
>> >> >
>> >> > Do you have wour work-in-progress in some public repo? This would make
>> >> > us easier to understand your setup and would also allow more ppl to
>> >> > cooperate (although unfortunately Idk if there’s anyone else who’s
>> >> > particularly interested in deno at this particular moment).
>> >> >
>> >>
>> >> Here we are : <https://git.sr.ht/~reyman/build-deno-script>
>> >>
>> >> This is a wip python script that build an `export/’ directory containing 
>> >> all rust module needed to compile deno (i suppose)
>> >>
>> >> The deno script is localized at the root of `export/’ folder
>> >>
>> >> I build the modules folders, but know i don’t know how to compile all 
>> >> this folders correctly using correct path …
>> >> Any guile help appreciated to do that !
>> >>
>> >> For example, the module *./export/rust-ecdsa-0.14/rust-ecdsa-0.14.scm* 
>> >> need a module localized to 
>> >> *./export/rust-serdect-0.1/rust-serdect-0.1.scm*
>> >>
>> >> I simply try *#:use-module (../rust-serdect-01)* in *rust-ecdsa-0.14* 
>> >> define-module but this probably not the good way.
>> >>
>> >> >> I need to create a module by package do you thing ? and after that 
>> >> >> import all the package using `use-modules` ?
>> >> >
>> >> > From what I’ve seen, Guix package definitions are usually grouped into
>> >> > modules thematically. Although until you actually try upstreaming your
>> >> > work, you’re not bound by any reqs and you can structure the
>> >> > definitions in a way that’s comfortable for you.
>> >> >
>> >> > Also, are you adding your package by modifying the actual Guix sources?
>> >> > Or by creating modules outsite of these? Perhaps this was already
>> >> > metioned but I don’t have previous emails on the top…
>> >> >
>> >>
>> >> If that works locally i suppose i could sent a patch with all the rust 
>> >> modules needed to build Deno ?
>> >>
>> >> Best !
>> >> SR.
>> >>
>> >> > Good luck :)
>> >> > Wojtek
>> >> >
>> >> > – (sig_start)
>> >> > website: <https://koszko.org/koszko.html>
>> >> > PGP: <https://koszko.org/key.gpg>
>> >> > fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
>> >> >
>> >> > Meet Kraków saints!           #33: blessed Antonin Bajewski
>> >> > Poznaj świętych krakowskich!  #33: błogosławiony Antonin Bajewski
>> >> > <https://pl.wikipedia.org/wiki/Antonin_Bajewski>
>> >> > – (sig_end)
>> >> >
>> >> >
>> >> > On Thu, 27 Oct 2022 09:05:52 +0200
>> >> > Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr> 
>> >> > wrote:
>> >> >
>> >> >> Hi,
>> >> >>
>> >> >> I continue the packaging using guix import crate, this is a slow 
>> >> >> process, but everything goes well at this time.
>> >> >>
>> >> >> My file deno.scm contain 6000 line, with all packages imported, this 
>> >> >> is a problem because i need to remove duplicate.
>> >> >> The best way was probably to export all `(define public method … )`  
>> >> >> into a folder with corresponding library.scm.
>> >> >>
>> >> >> I need to create a module by package do you thing ? and after that 
>> >> >> import all the package using `use-modules` ?
>> >> >>
>> >> >> Best
>> >> >>
>> >> >> Wojtek Kosior <koszko@koszko.org> writes:
>> >> >>
>> >> >>
>> >> >> >> > Out of curiosity - what are the problems between Guix and JS? 
>> >> >> >> > When I
>> >> >> >> > read this my first suspicion was that maybe TS is a self-hosted
>> >> >> >> > language and cannot be bootstrapped. However, when I ran `guix 
>> >> >> >> > search
>> >> >> >> > typescript`, it revealed the existence of some TS->JS compiler 
>> >> >> >> > called
>> >> >> >> > ’rust-swc’. So I guess problems lie somewhere else, right?
>> >> >> >>
>> >> >> >> Nothing per se.  Note that «TypeScript is a strongly typed 
>> >> >> >> programming
>> >> >> >> language that builds on JavaScript» and from my understanding 
>> >> >> >> (maybe I
>> >> >> >> am wrong?), it is hard to package Javascript for Guix because the
>> >> >> >> Javascript ecosystem is messy.  Janneke provides some explanations 
>> >> >> >> [1]
>> >> >> >> and I am not convinced the situation have changed since then.  
>> >> >> >> Maybe I
>> >> >> >> am wrong…
>> >> >> >>
>> >> >> >> 1: <https://yhetil.org/guix/87fudzndu7.fsf@gnu.org>
>> >> >> >
>> >> >> > A few months ago (I think) I did run some code to actually check what
>> >> >> > the dependency tree of the protocol buffers JS library (from npm) is.
>> >> >> > The tree of runtime deps wasn’t horribly big. The tree of
>> >> >> > recursively-computed dev deps was, on the other hand, as bad as
>> >> >> > described by Janneke or even worse… However, It seems in most cases
>> >> >> > many of those packages designated as dev deps are not strictly needed
>> >> >> > for actually building stuff. Some are just test dependencies. Others
>> >> >> > were perhaps put there because developers understood “dev 
>> >> >> > dependencies”
>> >> >> > differently from how packagers understand it…
>> >> >> >
>> >> >> > Anyway, it seems the only way to check what the situation really is 
>> >> >> > is
>> >> >> > to actually try packaging something. I’m confident it will be way
>> >> >> > easier than it seems :)
>> >> >> >
>> >> >> > Luckily for Sébastien, it seems quarto-cli - although written mostly 
>> >> >> > in
>> >> >> > JS/TS - has no NPM deps. Or at least I don’t see any…
>> >> >> >
>> >> >> > Wojtek
>> >> >> >
>> >> >> > – (sig_start)
>> >> >> > website: <https://koszko.org/koszko.html>
>> >> >> > PGP: <https://koszko.org/key.gpg>
>> >> >> > fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
>> >> >> >
>> >> >> > Meet Kraków saints!           #15: saint Jan Paweł II
>> >> >> > Poznaj świętych krakowskich!  #15: święty Jan Paweł II
>> >> >> > <https://pl.wikipedia.org/wiki/Jan_Paweł_II>
>> >> >> > – (sig_end)
>> >> >> >
>> >> >> >
>> >> >> > On Tue, 25 Oct 2022 12:08:59 +0200
>> >> >> > zimoun <zimon.toutoune@gmail.com> wrote:
>> >> >> >
>> >> >> >> Hi,
>> >> >> >>
>> >> >> >> On Mon, 24 Oct 2022 at 20:40, Wojtek Kosior via <help-guix@gnu.org> 
>> >> >> >> wrote:
>> >> >> >>
>> >> >> >> > Out of curiosity - what are the problems between Guix and JS? 
>> >> >> >> > When I
>> >> >> >> > read this my first suspicion was that maybe TS is a self-hosted
>> >> >> >> > language and cannot be bootstrapped. However, when I ran `guix 
>> >> >> >> > search
>> >> >> >> > typescript`, it revealed the existence of some TS->JS compiler 
>> >> >> >> > called
>> >> >> >> > ’rust-swc’. So I guess problems lie somewhere else, right?
>> >> >> >>
>> >> >> >> Nothing per se.  Note that «TypeScript is a strongly typed 
>> >> >> >> programming
>> >> >> >> language that builds on JavaScript» and from my understanding 
>> >> >> >> (maybe I
>> >> >> >> am wrong?), it is hard to package Javascript for Guix because the
>> >> >> >> Javascript ecosystem is messy.  Janneke provides some explanations 
>> >> >> >> [1]
>> >> >> >> and I am not convinced the situation have changed since then.  
>> >> >> >> Maybe I
>> >> >> >> am wrong…
>> >> >> >>
>> >> >> >> 1: <https://yhetil.org/guix/87fudzndu7.fsf@gnu.org>
>> >> >> >>
>> >> >> >> Cheers,
>> >> >> >> simon
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >
>> >> >
>> >
>> >
>
>

Attachment: signature.asc
Description: PGP signature


reply via email to

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