Hi, Thanks a lot, that helps me to make one more step :) I set : ┌──── │ (arguments │ `(#:phases │ (modify-phases %standard-phases │ (add-before 'configure 'set-source │ (lambda _ │ (setenv "V8_FROM_SOURCE" "1") │ (setenv "RUST_BACKTRACE" "1") │ (setenv "CLANG_BASE_PATH" (getenv "CMAKE_PREFIX_PATH")) │ #t))) └──── I also try C_INCLUDE_PATH and native input : ┌──── │ (native-inputs (list ninja gn clang-toolchain ccache clang)) └──── I have now another problem during compilation of v8, i don’t understand why “clang” path is not well recognized by the buildscript, test is defined here : The backtrace : 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 using Chromiums clang clang_base_path /tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/clang — 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:537:6 stack backtrace: 0: rust_begin_unwind 1: core::panicking::panic_fmt 2: core::result::unwrap_failed 3: core::result::Result::unwrap 4: build_script_build::clang_download 5: build_script_build::build_v8 6: build_script_build::main 7: core::ops::function::FnOnce::call_once note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. Best, Wojtek Kosior writes: >> Hi, >> >> You’re both right, seems there is a flag to skip binary downloading and >> compile the V8 lib. >> >> […] > > Good to see you found it :) > >> So, my packaging friend :), what’s the best way to push an “export >> V8_FROM_SOURCE=1” or something like that into my rust-deno.scm ? >> >> Best, >> >> SR > > When I first read your question, I did not know the exact function. But > I knew where to look. So I thought I’d better share my way of learning > rather than just the solution ;) > > I started with > > grep -R ’export’ ~/.config/guix/current/share/guile/site/3.0/gnu/packages/ | less > > That showed a lot of results. I noticed a line like this > >> /home/urz/.config/guix/current/share/guile/site/3.0/gnu/packages/engineering.scm: (setenv “HOME” (getcwd)) ;; cmake needs this to export modules > > Thought it might be the thing I was looking for, so I did > > less /home/urz/.config/guix/current/share/guile/site/3.0/gnu/packages/engineering.scm > > and navigated to this line. This seems to be it. The (setenv) function. > Can be used as from a modified packaging phase function (as you can see > in engineering.scm). > > Hope I helped. Good luck once again! > > W. > > P.S. Make sure you know some ’less’ shortcuts if you’re going to do > things this way. It cad speed things up ^^ > > – (sig_start) > website: > PGP: > 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 > > – (sig_end) > > > On Wed, 16 Nov 2022 21:38:47 +0100 > Sebastien Rey-Coyrehourcq wrote: > >> Hi, >> >> You’re both right, seems there is a flag to skip binary downloading and >> compile the V8 lib. >> >> From the githubpage () : “V8 is >> very large and takes a long time to compile. Many users will prefer to >> use a prebuilt version of V8. We publish static libs for every version >> of rusty v8 on Github . >> >> Binaries builds are turned on by default: |cargo build| will initiate a >> download from github to get the static lib. To disable this build using >> the |V8_FROM_SOURCE| environmental variable. >> >> When making changes to rusty_v8 itself, it should be tested by build >> from source. The CI always builds from source” >> >> So, my packaging friend :), what’s the best way to push an “export >> V8_FROM_SOURCE=1” or something like that into my rust-deno.scm ? >> >> Best, >> >> SR >> >> Le 15/11/2022 à 08:58, Efraim Flashner a écrit : >> > On Mon, Nov 14, 2022 at 11:30:47PM +0100, Sébastien Rey-Coyrehourcq wrote: >> >> 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* : >> >> The *rust-deno.scm* file to build : >> >> 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: >> >> cargo:rustc-link-search=/tmp/guix-build-rust-deno-1.25.2.drv-0/deno-1.25.2/target/release/gn_out/obj >> >> Downloading >> >> Python downloader failed, trying with curl. >> > Looks like you need to patch rust-v8-0.49 to not try to download >> > librusty_v8_release… but instead you’ll have to build it from source >> > and let it know where to find it. >> > >> >> — 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 >> > > >