Re: How to share profile among machines ?
Le 25/04/2024 à 21:35, Felix Lechner a écrit : Hi Emmanuel, On Wed, Apr 24 2024, Emmanuel Medernach wrote: How do you share profiles among machines ? Do you mean users? The original problem was to copy a profile from another machine and use it, guix copy does not add the profile to the list of profiles. But it is the same problem when sharing profile with another user on the same machine. For instance 2 users wants to have the same profile, user A shares the directory /gnu/store/...-profile to user B, user B either get access to it directly or from a remote machine My users manage their profiles via Guix Home. Those configuration files can be exchanged. All my equipment also publishes the local store, so built files are never far away. Good to know, I would prefer guix copy to handle adding the symlinks. Or to have a subcommand for that to avoid fiddling with "internal Guix scheming". Thanks to both of you for your help ! Cheers, Emmanuel Kind regards Felix
Re: How to share profile among machines ?
Le 24/04/2024 à 19:37, Tomas Volf a écrit : On 2024-04-24 16:54:19 +0200, Emmanuel Medernach wrote: Hello Guix ! How do you share profiles among machines ? For instance 2 users wants to have the same profile, user A shares the directory /gnu/store/...-profile to user B, user B either get access to it directly or from a remote machine with a "guix copy ", user B could now use this profile like this: export GUIX_PROFILE="/gnu/store/...-profile" source "$GUIX_PROFILE/etc/profile" But there is a problem: this profile is not listed with guix package --list-profiles guix gc --list-roots The problem is that if user A deletes this profile it gets garbage collected even if user B still needs to use it. So the question is: How user B could add an existing /gnu/store/...-profile (either existing directory or obtained from a guix copy) to the profile and root list ? I think you can just create a symlinks in the /var/guix/profiles/per-user/B for the profile and in the /var/guix/gcroots/profiles/per-user/B for the gc roots. I *think* this should work? Awesome ! This works. Would it be a good idea to add a guix subcommand to do that ? Cheers, Emmanuel Tomas -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.
How to share profile among machines ?
Hello Guix ! How do you share profiles among machines ? For instance 2 users wants to have the same profile, user A shares the directory /gnu/store/...-profile to user B, user B either get access to it directly or from a remote machine with a "guix copy ", user B could now use this profile like this: export GUIX_PROFILE="/gnu/store/...-profile" source "$GUIX_PROFILE/etc/profile" But there is a problem: this profile is not listed with guix package --list-profiles guix gc --list-roots The problem is that if user A deletes this profile it gets garbage collected even if user B still needs to use it. So the question is: How user B could add an existing /gnu/store/...-profile (either existing directory or obtained from a guix copy) to the profile and root list ? Cheers, Emmanuel
Re: Error: cannot close compressed log file
Le 08/02/2023 à 15:57, Emmanuel Medernach a écrit : Le 08/02/2023 à 14:48, Simon Tournier a écrit : Hi, On mer., 08 févr. 2023 at 10:58, Emmanuel Medernach wrote: $ guix pack -RR -C bzip2 -f tarball --manifest=manifest.scm substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0% The following derivation will be built: /gnu/store/5v24idd80hl29cwxijmj4dd13v6vdqa1-tar.bz2.drv building /gnu/store/5v24idd80hl29cwxijmj4dd13v6vdqa1-...tar.bz2.drv... -guix pack: error: cannot close compressed log file (gzip error = -1) None of my filesystem is empty and guix gc does not solve the problem this time By empty, do you mean full? It is not an issue about free space, right? Hi Simon, Yes sorry I meant no filesystem is full I think this is because /tmp partition is filled during the copying store items phase. Is it possible to configure Guix to use another partition than /tmp ? Problem solved ! By adding TMPDIR in the environment of guix daemon service definition one could use another partition instead of /tmp : https://guix.gnu.org/manual/en/html_node/Build-Environment-Setup.html Cheers, Emmanuel
Re: Error: cannot close compressed log file
Le 08/02/2023 à 14:48, Simon Tournier a écrit : Hi, On mer., 08 févr. 2023 at 10:58, Emmanuel Medernach wrote: $ guix pack -RR -C bzip2 -f tarball --manifest=manifest.scm substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0% The following derivation will be built: /gnu/store/5v24idd80hl29cwxijmj4dd13v6vdqa1-tar.bz2.drv building /gnu/store/5v24idd80hl29cwxijmj4dd13v6vdqa1-...tar.bz2.drv... -guix pack: error: cannot close compressed log file (gzip error = -1) None of my filesystem is empty and guix gc does not solve the problem this time :( By empty, do you mean full? It is not an issue about free space, right? Hi Simon, Yes sorry I meant no filesystem is full I think this is because /tmp partition is filled during the copying store items phase. Is it possible to configure Guix to use another partition than /tmp ? Could you share the Guix revision (guix describe), guix-daemon version and the manifest.scm file? I am using a custom channel: https://gitlab.in2p3.fr/reprovip/reprovip-guix/-/blob/master/GUIX/FSL/compilation/v0.1/channels.scm $ guix describe Generation 11 Nov 07 2022 14:39:35 (current) guix 348f70b repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 348f70b9f429b19df6251a2c177291f4c606a495 nonguix d4f3c4b repository URL: https://gitlab.com/nonguix/nonguix branch: master commit: d4f3c4b57e05fd3286722ed44b6500093c632258 guix-hpc 1a6af9f repository URL: https://gitlab.inria.fr/guix-hpc/guix-hpc.git branch: master commit: 1a6af9f0154f57dc5a31bf535bb09db63e3a8d03 guix-hpc-non-free 85a4cf1 repository URL: https://gitlab.inria.fr/guix-hpc/guix-hpc-non-free.git branch: master commit: 85a4cf183c1d3f5232ace249a770df506cd722cf $ guix-daemon --version guix-daemon (GNU Guix) 1.3.0-32.682639c Here is the manifest: https://gitlab.in2p3.fr/reprovip/reprovip-guix/-/blob/master/GUIX/FSL/compilation/v0.1/manifest.scm Thanks for your help Cheers, Emmanuel Cheers, simon
Re: Error: cannot close compressed log file
Hello, The problem reappeared: $ guix pack -RR -C bzip2 -f tarball --manifest=manifest.scm substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0% The following derivation will be built: /gnu/store/5v24idd80hl29cwxijmj4dd13v6vdqa1-tar.bz2.drv building /gnu/store/5v24idd80hl29cwxijmj4dd13v6vdqa1-...tar.bz2.drv... -guix pack: error: cannot close compressed log file (gzip error = -1) None of my filesystem is empty and guix gc does not solve the problem this time :( What could be done about it ? Cheers, Emmanuel Le 13/05/2022 à 10:30, zimoun a écrit : Hi, On jeu., 12 mai 2022 at 11:34, Emmanuel Medernach wrote: --8<---cut here---start->8--- void DerivationGoal::closeLogFile() { if (gzLogFile) { int err; err = gzclose(gzLogFile); gzLogFile = NULL; if (err != Z_OK) throw Error(format("cannot close compressed log file (gzip error = %1%)") % err); } --8<---cut here---end--->8--- [...] After a guix gc it works again, I don't understand what was the problem as there was no logs :/ I do not know either. Maybe something wrong with a log file and this log file had been removed by GC. Yes, now it is impossible to understand why that happened. Feel free to report similar errors if they appear again. Cheers, simon
Re: Error using gcc with trivial-build-system
Le 08/11/2022 à 22:16, zimoun a écrit : Hi, On Tue, 08 Nov 2022 at 15:48, Emmanuel Medernach wrote: About customizing I have another question, at the end of the build I have messages like: warning: collision encountered: ... This collision is about? What do you as inputs for your package definition? It is about header files or binaries with the same name coming from my local package sources, I want to be sure either to only copy the one needed to the profile or not to copy it if it is only helper binaries. I would prefer to manage myself what is copied to the profile or what is not and where, is it possible ? You mean skip the automatic references, right? I would like to copy only what has been compiled/installed in some directories and not other for instance. Cheers, Emmanuel Cheers, simon
Re: Error using gcc with trivial-build-system
Le 08/11/2022 à 15:10, Tobias Geerinckx-Rice a écrit : Hi Emmanuel! On 2022-11-08 11:23, Emmanuel Medernach wrote: I have a local package with a compile script that I need to add to our local GUIX packages. (Nitpick: Guix isn't a acronym. Never has been.) I tried to use trivial-build-system with gcc-toolchain input, all works well when I compile it manually in a 'guix shell' Because ‘guix shell’ sets up a proper profile; quite unlike the trivial-build-system. Using trivial-build-system here *is* the bug. It's not a starter kit for building better things; it's for trivial packages that don't need building. Rather than waste your time fighting that fact, use the gnu-build-system. It is that starter kit. If your tarball doesn't provide some standard GNU things like ./configure or ‘make check’, that's quite common. You can simply (delete 'configure), set #:tests? #f, etc. Thanks for your help, I will use the gnu-build-system and customize it as you suggest. About customizing I have another question, at the end of the build I have messages like: warning: collision encountered: ... I would prefer to manage myself what is copied to the profile or what is not and where, is it possible ? Emmanuel Happy building, T G-R Sent from a Web browser. Excuse or enjoy my brevity.
Re: Error using gcc with trivial-build-system
Le 08/11/2022 à 12:39, Wojtek Kosior a écrit : Hi, I have little experience with Guix packages, but I ran into a similar issue using guix shell --pure recently, and I believe that you need to add glibc to your dependencies. I suppose that guix shell works for you because you already have glibc available in the active profile. I'd expect guix shell --pure to fail with the same error. Thanks for your idea but no luck, still the same error with glibc added :-/ Emmanuel Perhaps `find /gnu/store/ -name "crt1.o"` will give further hints? Yes, it is already part of gcc-toolchain (gcc-toolchain-9.4.0/lib/crt1.o) Adding "-L" flags to gcc does not help Emmanuel 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! #10: blessed Hilary Januszewski Poznaj świętych krakowskich! #10: błogosławiony Hilary Januszewski https://pl.wikipedia.org/wiki/Hilary_Januszewski -- (sig_end) On Tue, 8 Nov 2022 11:58:41 +0100 Emmanuel Medernach wrote: Le 08/11/2022 à 11:45, Sergiu Ivanov a écrit : Hi, I have little experience with Guix packages, but I ran into a similar issue using guix shell --pure recently, and I believe that you need to add glibc to your dependencies. I suppose that guix shell works for you because you already have glibc available in the active profile. I'd expect guix shell --pure to fail with the same error. Thanks for your idea but no luck, still the same error with glibc added :-/ Emmanuel - HTH, Sergiu Emmanuel Medernach [2022-11-08T11:23:16+0100]: Hello Guix, I have a local package with a compile script that I need to add to our local GUIX packages. I tried to use trivial-build-system with gcc-toolchain input, all works well when I compile it manually in a 'guix shell' but when I try to define a package I ran into this error: ld: cannot find crt1.o: No such file or directory ld: cannot find crti.o: No such file or directory collect2: error: ld returned 1 exit status I cannot produce correct binaries with gcc-toolchain, here is a minimal package definition with the above problem. Could you please tell me how to solve this problem ? (define-public SimpleTest (package (name "SimpleTest") (version "0.0.0") (source (origin (method url-fetch) (uri ".../simpletest.tgz") (sha256 (base32 "0nx8dgs5n4s1alp8lnp7a96czdll8bb7ljbg152yk7m0mr07728d" (inputs `(("gcc-toolchain" ,gcc-toolchain-9) ("gzip" ,gzip) ("tar" ,tar))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) #:builder (begin (use-modules (guix build utils)) (let* ((source (assoc-ref %build-inputs "source")) (out (assoc-ref %outputs "out")) (gzip (assoc-ref %build-inputs "gzip")) (gunzip-bin (string-append gzip "/bin/gunzip")) (tar (assoc-ref %build-inputs "tar")) (tar-bin (string-append tar "/bin/tar")) (gcc-dir (assoc-ref %build-inputs "gcc-toolchain")) (gcc-bin (string-append gcc-dir "/bin/gcc"))) (let* ((packages (alist-delete "source" %build-inputs)) (packages-path (map cdr packages))) (setenv "PATH" (apply string-append (getenv "PATH") ":" (map (lambda (p) (string-append p "/bin:")) packages-path ;; (setenv "GCC_EXEC_PREFIX" gcc-dir) ;; gcc: fatal error: cannot execute 'cc1': execvp: No such file or directory (display (list "gcc-bin" gcc-bin)) (newline) (mkdir-p out) (chdir out) (copy-file source "simpletest.tar.gz") (invoke gunzip-bin "simpletest.tar.gz") (invoke tar-bin "xvf" "simpletest.tar") (delete-file "simpletest.tar") (chdir "simpletest") (invoke gcc-bin "simpletest.c" "-o" "simpletest") #t (synopsis "Simple Test") (description "Simple Test") (home-page "None") (license license:gpl3+))) Best regards, Emmanuel Medernach
Re: Trying to replicate guix packages list on another machine
Le 27/06/2022 à 17:39, zimoun a écrit : Hi, On Mon, 27 Jun 2022 at 16:51, Emmanuel Medernach wrote: Thanks, here is the resulting manifest: (specifications->manifest (list "gsl" "pcre" "icu4c" "zlib" "cmake" "make" "gcc-toolchain@4.9" "glibc")) [Machine B]$ guix time-machine -C ~/.config/guix/channels.scm -- package -m manifest.scm -p profile-A Here you are installing in the profile ’profile-A’… [Machine B]$ guix package --list-installed | sort | awk '//{ print $1 "@" $2; }' …and here, you are listing the packages in the default profile ~/.guix-profile. Instead you should run, machine-B$ guix package -p profile-A -I Thanks, here is the result: $ guix package -p profile-A -I glibc 2.31 out /gnu/store/ksy2b6fwfmz40gjajvspl87ia4vsfzj7-glibc-2.31 gcc-toolchain 4.9.4 out /gnu/store/frmwyxb8zl8vwd7840gb7j526c4dzxh0-gcc-toolchain-4.9.4 make 4.3 out /gnu/store/4k33n2nhsnnaxk2ip75gj7xiqdjns5hq-make-4.3 cmake 3.19.2 out /gnu/store/4axd987cf0bpkshybl1w7g5hp9yqm660-cmake-3.19.2 zlib 1.2.11 out /gnu/store/rykm237xkmq7rl1p0nwass01p090p88x-zlib-1.2.11 icu4c 68.2 out /gnu/store/hjggah4g7vb4db3c62lmmpqplv5g4drh-icu4c-68.2 pcre 8.44 out /gnu/store/k0aqiy7yx8n28dvm3f0a04ka5sd8y950-pcre-8.44 gsl 2.6 out /gnu/store/xq64iaxx2gmlcgnipj31wjxlf1yd2g2p-gsl-2.6 But glibc is 2.31 instead of 2.33 Last, as Julien pointed out, it might be possible that on ’Machine-A’ the packages are from various states. You can give a look at: machine-A$ guix package --list-generations and so, it is possible that the packages you installed do not match the current state of Guix. For instance, you could compare: machine-A$ guix package --export-channels machine-A$ guix pull -f channels Well, if you did: guix pull guix install gsl guix pull guix install pcre guix pull guix zlib etc. the profile is not composed by only one state therefore it cannot be replicated. Only a rough approximation can be made. Or if you did: guix install gsl pcre icu4c etc. guix pull then “guix describe” does not provide the Guix state of the installed packages. Thank you, yes packages installed are always evolving. I will now promote to use manifests. Best regards, Emmanuel Cheers, simon
Re: Trying to replicate guix packages list on another machine
Le 27/06/2022 à 16:42, Julien Lepiller a écrit : It's possible your packages on machine A are from various guix revisions, if you didn't run "guix update" or didn't use a manifest to install them. Yes you are right, that is certainly the case Eg you run "guix install glibc" at revision A, pull revision B where glibc was updated to 2.34. When you list your packages, it still mentions glibc@2.33 because you didn't update it. Then you try to replicate it on another machine by pulling revision B, but that old glibc is no longer available. Manifests ensure that all packages are from the same revision, although if you pull a new guix without reinstalling the manifest, you'll have the same issue because you're confusing the guix version from which the package was installed, and the current guix version. Then how to install this previous glibc with other packages on machine B ? Emmanuel On June 27, 2022 3:49:58 PM GMT+02:00, Emmanuel Medernach wrote: Hello, We are trying to replicate guix packages list on another machine. We are using GUIX on a foreign distro. Here what we have on machine A: [Machine A]$ guix describe --format=channels (list (channel (name 'guix) (url"https://git.savannah.gnu.org/git/guix.git;) (commit "a0178d34f582b50e9bdbb0403943129ae5b560ff") (introduction (make-channel-introduction "9edb3f66fd807b096b48283debdcddccfea34bad" (openpgp-fingerprint "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA") [Machine A]$ guix package --list-installed | sort | awk '//{ print $1 "@" $2; }' cmake@3.19.2 gcc-toolchain@4.9.4 glibc@2.33 gsl@2.6 icu4c@68.2 make@4.3 pcre@8.44 zlib@1.2.11 But on machine B: [Machine B]$ cat ~/.config/guix/channels.scm (list (channel (name 'guix) (url"https://git.savannah.gnu.org/git/guix.git;) (commit "a0178d34f582b50e9bdbb0403943129ae5b560ff") (introduction (make-channel-introduction "9edb3f66fd807b096b48283debdcddccfea34bad" (openpgp-fingerprint "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA") [Machine B]$ guix installcmake@3.19.2 gcc-toolchain@4.9.4 glibc@2.33 gsl@2.6 icu4c@68.2 make@4.3 pcre@8.44 zlib@1.2.11 guix install: error: glibc: package not found for version 2.33 What are we doing wrong ? Please tell us what steps are missing to correctly replicate guix packages to another machine ? Best regards, Emmanuel Medernach
Re: Trying to replicate guix packages list on another machine
Le 27/06/2022 à 16:32, zimoun a écrit : I guess “guix describe” on ’Machine B’ is not the state specified by ’Machine A’. From my understanding, the easiest workflow is: machine-A$ guix describe -f channels > state-A.scm machine-A$ guix package --export-manifest > pkgs-A.scm exchange these 2 files (even, it is better that these 2 files are versioned with the project itsefl ;-)) machine-B$ guix time-machine -C state-A.scm \ package -m pkg-A.scm\ -p profile-A This way, the global state of ’Machine B’ is unchanged; in case you are working on several projects at various states in the same time. Thanks, here is the resulting manifest: (specifications->manifest (list "gsl" "pcre" "icu4c" "zlib" "cmake" "make" "gcc-toolchain@4.9" "glibc")) [Machine B]$ guix time-machine -C ~/.config/guix/channels.scm -- package -m manifest.scm -p profile-A ... building profile with 8 packages... hint: Consider setting the necessary environment variables by running: GUIX_PROFILE="/iphc/home/emederna/profile-A" . "$GUIX_PROFILE/etc/profile" ... [Machine B]$ guix package --list-installed | sort | awk '//{ print $1 "@" $2; }' cmake@3.19.2 gcc-toolchain@4.9.4 gsl@2.6 icu4c@68.2 make@4.3 pcre@8.44 zlib@1.2.11 Why is glibc missing ? Emmanuel Hope that helps, simon
Trying to replicate guix packages list on another machine
Hello, We are trying to replicate guix packages list on another machine. We are using GUIX on a foreign distro. Here what we have on machine A: [Machine A]$ guix describe --format=channels (list (channel (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git;) (commit "a0178d34f582b50e9bdbb0403943129ae5b560ff") (introduction (make-channel-introduction "9edb3f66fd807b096b48283debdcddccfea34bad" (openpgp-fingerprint "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA") [Machine A]$ guix package --list-installed | sort | awk '//{ print $1 "@" $2; }' cmake@3.19.2 gcc-toolchain@4.9.4 glibc@2.33 gsl@2.6 icu4c@68.2 make@4.3 pcre@8.44 zlib@1.2.11 But on machine B: [Machine B]$ cat ~/.config/guix/channels.scm (list (channel (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git;) (commit "a0178d34f582b50e9bdbb0403943129ae5b560ff") (introduction (make-channel-introduction "9edb3f66fd807b096b48283debdcddccfea34bad" (openpgp-fingerprint "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA") [Machine B]$ guix install cmake@3.19.2 gcc-toolchain@4.9.4 glibc@2.33 gsl@2.6 icu4c@68.2 make@4.3 pcre@8.44 zlib@1.2.11 guix install: error: glibc: package not found for version 2.33 What are we doing wrong ? Please tell us what steps are missing to correctly replicate guix packages to another machine ? Best regards, Emmanuel Medernach
Re: Error: cannot close compressed log file
Le 10/05/2022 à 19:52, zimoun a écrit : Hi, On Mon, 09 May 2022 at 12:50, Emmanuel Medernach wrote: When trying to install a custom package the build stop after downloading the source code with this error: guix install: error: cannot close compressed log file (gzip error = -1) Well, I guess this message comes from ’nix/libstore/build.cc’: --8<---cut here---start->8--- void DerivationGoal::closeLogFile() { if (gzLogFile) { int err; err = gzclose(gzLogFile); gzLogFile = NULL; if (err != Z_OK) throw Error(format("cannot close compressed log file (gzip error = %1%)") % err); } --8<---cut here---end--->8--- which seems very unexpected. :-) Yes, none of my partitions were full. I don't know. After a guix gc it works again, I don't understand what was the problem as there was no logs :/ Best regards, Emmanuel Medernach
Error: cannot close compressed log file
Hello, When trying to install a custom package the build stop after downloading the source code with this error: guix install: error: cannot close compressed log file (gzip error = -1) I verified the archive file downloaded is fine, please help me how to debug this ? Thanks in advance, Best regards, Emmanuel Medernach
Re: Local definitions and Virtual machine image
> I pulled the same commit on the VM that the one obtained > with "guix describe" but it still recompiles my local > packages with "guix build". Did I forget something ? > I mean it does not download from my substitute server. I have another question: How to query the output paths given an installed package name ? guix build does it but I would like to avoid recompiling. Best regards, Emmanuel
Re: Local definitions and Virtual machine image
On Wed, Jun 3, 2020 at 5:23 PM Marius Bakke wrote: > > 'guix package -I' only lists packages that are installed to the user > profile. Use 'guix package -p /run/current-system/profile -I' to see > system-installed packages. > > Thanks it works > The reason 'guix build foo' gives a different result is because you have > not run 'guix pull', so you are using the "guix snapshot" from > gnu/packages/package-management.scm, which is on a fixed commit. > > Whereas when you built the VM, you were likely using a newer version of > Guix. > > I pulled the same commit on the VM that the one obtained with "guix describe" but it still recompiles my local packages with "guix build". Did I forget something ? > There are a couple of ways around this. One is to run 'make > update-guix-package' in the Guix source tree to update the Guix > snapshot, and use './pre-inst-env' when generating the VM. It requires > a Guix development setup though. > > Another is to look at the commit that was used to generate the VM in > /run/current-system/provenance and run 'guix pull --commit=that-commit'. > > Perhaps 'guix system vm-image' could learn a '--update-guix-snapshot' to > automatically update the "system guix". Someone would have to implement > it first though. :-) > > Ok, Thanks for your help Best regards, Emmanuel
Local definitions and Virtual machine image
Hello Guixers ! I created an image with 'guix system vm-image' which contains local defined packages. These packages are present on the Virtual Machine however they are not listed with 'guix package --list-installed'.As I need to customize LD_LIBRARY_PATH, I use "guix build" to list store directories from package names but it tries instead to recompile them even though they are already installed. How to properly export local definitions in the virtual machine image ? Best regards, Emmanuel Medernach
Re: Few questions
Hello, I believe you, but here it is in my shell history: sudo rm -Rf /gnu/store/rj2ir3hmaanvwwvyy6d1a1qv0f0xp537-ROOT-6.20.02 Surely because I am using a foreign distro Regards, Emmanuel On Thu, May 14, 2020 at 1:34 PM Tobias Geerinckx-Rice wrote: > Tobias Geerinckx-Rice 写道: > > λ findmnt /gnu/store TARGET SOURCEFSTYPE > > OPTIONS > > /gnu/store /dev/sda1[/gnu/store] bcachefs ro,relatime,… > > And just to show I'm not bluffing: > > λ sudo rm -rf /gnu/store > … > … > > rm: cannot remove '/gnu/store/…': Read-only file system > rm: cannot remove '/gnu/store/…': Read-only file system > rm: cannot remove '/gnu/store/…': Read-only file system > ^C > λ > > Kind regards, > > T G-R >
Problem compiling boost for mysql
Hello Guixers, I have an error when trying to build a package, the following gnu packages derivation does not compile: # guix build -e '(@ (gnu packages boost) boost-for-mysql)' phase `more-bin-sh-patching' succeeded after 0.0 seconds starting phase `configure' Backtrace: 10 (primitive-load "/gnu/store/bsfksp6c63zj3ynx46ck87sip7a…") In ice-9/eval.scm: 191:35 9 (_ _) In guix/build/gnu-build-system.scm: 838:2 8 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #) In ice-9/boot-9.scm: 1736:10 7 (with-exception-handler _ _ #:unwind? _ # _) In srfi/srfi-1.scm: 857:16 6 (every1 # …) In guix/build/gnu-build-system.scm: 847:30 5 (_ _) In ice-9/eval.scm: 619:8 4 (_ #(#(#(#) # #) …)) In srfi/srfi-1.scm: 634:9 3 (for-each # _) In guix/build/utils.scm: 736:30 2 (with-atomic-file-replacement "tools/build/src/engine/…" …) In unknown file: 1 (stat "tools/build/src/engine/execunix.cpp" #) In ice-9/boot-9.scm: 1669:16 0 (raise-exception _ #:continuable? _) Any help is appreciated Best regards, Emmanuel
Re: Few questions
On Tue, May 12, 2020 at 2:04 PM zimoun wrote: > On Tue, 12 May 2020 at 13:55, Emmanuel Medernach > wrote: > > > It is the name of a locally defined package, my partition was full and I > deleted the /gnu/store/rj2ir3hmaanvwwvyy6d1a1qv0f0xp537-ROOT-6.20.02 > directory by error. Now I would like to rebuild it but the "guix build" > command only returns the path which does not exist anymore. > > How did you delete it? > I deleted it with the very wrong method of "rm -Rf" of this local package in the store, now I learned. > Does it still belong in a profile? > Well, "guix gc" should help in this case; see the option --list-dead, > --delete or --verify. > > > Yes Thanks, I succeeded to remove it by rolling back to an old profile. Emmanuel > Hope that helps, > simon >
Re: Few questions
On Tue, May 12, 2020 at 1:40 PM zimoun wrote: > On Tue, 12 May 2020 at 11:30, Emmanuel Medernach > wrote: > > >> guix build $(guix gc --derivers > >> /gnu/store/rj2ir3hmaanvwwvyy6d1a1qv0f0xp537-ROOT-6.20.02) > > > > Nothing happens, it does not recompile with 'guix build' and the > directory does not exist: > > Could you be more precise about this package ROOT-6.20.02? I am not > aware about such UPPERCASE path in the store. > Could you be more precise about how you deleted it? "guix gc" or other? > It is the name of a locally defined package, my partition was full and I deleted the /gnu/store/rj2ir3hmaanvwwvyy6d1a1qv0f0xp537-ROOT-6.20.02 directory by error. Now I would like to rebuild it but the "guix build" command only returns the path which does not exist anymore. Emmanuel
Re: Few questions
Thanks, It works ! I had to add the TMPDIR to the guix daemon environment variables and not to the user. Emmanuel On Tue, May 12, 2020 at 11:41 AM pelzflorian (Florian Pelz) < pelzflor...@pelzflorian.de> wrote: > On Tue, May 12, 2020 at 09:22:13AM +0200, Emmanuel Medernach wrote: > > Hello Guixers ! > > > > I have few practical questions: > > > > - How to replace /tmp during build with another partition to avoid > filling > > it ? > > This is what the TMPDIR environment variable is for. You can search > the manual <https://guix.gnu.org/manual/en/guix.html> for > tmpdir/TMPDIR. > > Hope it helps. > > Regards, > Florian >
Few questions
Hello Guixers ! I have few practical questions: - How to replace /tmp during build with another partition to avoid filling it ? - How to compile with fewer parallel processus to avoid compilation errors due to filled memory/swap ? - I accidently deleted one directory under /gnu/store, how to rebuild it ? # guix build ... ROOT ;;; note: source file /ROOT.scm ;;; newer than compiled /ROOT.scm.go /gnu/store/rj2ir3hmaanvwwvyy6d1a1qv0f0xp537-ROOT-6.20.02 # ls /gnu/store/rj2ir3hmaanvwwvyy6d1a1qv0f0xp537-ROOT-6.20.02 ls: cannot access /gnu/store/rj2ir3hmaanvwwvyy6d1a1qv0f0xp537-ROOT-6.20.02: No such file or directory Best regards, Emmanuel Medernach
Re: Help on writing package definitions
On Thu, Apr 23, 2020 at 12:00 PM zimoun wrote: > Dear, > > > On Thu, 23 Apr 2020 at 10:29, Emmanuel Medernach > wrote: > > > - Why not export the license record type from license.scm ? Some project > > has its own license and I cannot create it. > > You mean the project's license is not part of this list [1], right? > > [1] https://www.gnu.org/licenses/license-list.html > > > Otherwise, I do not have the answer for your question. :-) > > Yes, it is not listed in this list because it is specific to the project. I would like to be able to create one new license but the license function is not exported. > > - I have errors when I try to build with guix that I don't have when I > > build manually. I have a package (asiofi) which depends on another one > > (libfabric) but the build does not find it. Here is my current file > > attached and the command I use: > > > > # guix build -K --load-path=/home/emederna/src/packages -e '(@ (CBM) > > asiofi)' > > Does the '#' at the beginning mean that your are running as root? > > Well, I find easier 1/ to log in as 'emederna' user and 2/ to run > > guix build -L ~/src/packages asiofi > > No, I am not root, this is my prompt :) Ok, this command is much shorter. > > CMake Error at test/CMakeLists.txt:9 (add_executable): > > Target "afi_msg_bw" links to target "OFI::libfabric" but the target was > > not > > found. Perhaps a find_package() call is missing for an IMPORTED > target, > > or > > an ALIAS target is missing? > > From my understanding, there are 3 "issues": > > a) instead of create a full new package for libfabric, you could > update the Guix one or use 'inherit', e.g., (not tested) > > (define-public my-libfabric > (inherit libfabric > (version "X.Y") > (source blablabla))) > > b) missing '#t' to the phase 'add-before' > > c) missing the package 'pkg-config', i.e., >#:use-module (gnu packages pkg-config) > and > ("pkgconfig" ,pkg-config) > in the list of inputs. > > > Now, it seems compiling on my machine. :-) > > Wonderful ! It works now. Thanks for your help. How do you debugged this issue to find that we have to add pkgconfig ? Emmanuel > > Hope that helps. > simon >
Re: Help on writing package definitions
Hello Vincent, glad to read from you here ! Thanks for your hints, I didn't realize that it should return #t at the end. However I still have the same error. Emmanuel On Thu, Apr 23, 2020 at 11:41 AM Vincent Legoll wrote: > Hello Emmanuel, > > really nice to see you here ! > > A few smallish comments on your code (I'll try to build it later) > > You mixed tabs & spaces for indentation. > > Looks like the second lambda does not return #t, if I'm not mistaken > the return value will be setenv's which is unspecified. > > I'll try to be more helpful in my next reply ;-) > > And sorry if my answer broke the threading, I just subscribed... > > -- > Vincent Legoll >
Help on writing package definitions
Hello Guixers ! I am new to Guix and try to write package definitions to automate and make some installation reproducible. I have few questions: - Why not export the license record type from license.scm ? Some project has its own license and I cannot create it. - I have errors when I try to build with guix that I don't have when I build manually. I have a package (asiofi) which depends on another one (libfabric) but the build does not find it. Here is my current file attached and the command I use: # guix build -K --load-path=/home/emederna/src/packages -e '(@ (CBM) asiofi)' ... CMake Error at test/CMakeLists.txt:9 (add_executable): Target "afi_msg_bw" links to target "OFI::libfabric" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? Manually the compilation works fine, what am I missing ? Thanks in advance Best regards, Emmanuel Medernach (define-module (CBM) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (gnu packages autotools) #:use-module (gnu packages commencement) ;; gcc-toolchain #:use-module (gnu packages boost) #:use-module (gnu packages sqlite) #:use-module ((guix licenses) #:prefix license:)) (define-public libfabric (package (name "libfabric") (version "1.9.1") (source (origin (method url-fetch) (uri (string-append "https://github.com/ofiwg/libfabric/archive/v; version ".tar.gz")) (sha256 (base32 "0sic649kg9jhljqhffgyc5pihpysc8gjg0hc924rs5wxv5qxypvn" (build-system gnu-build-system) (inputs `(("autoconf" ,autoconf) ;; autogen autoreconf ("automake" ,automake) ;; aclocal ("libtool" ,libtool) )) (home-page "https://github.com/ofiwg/libfabric;) (synopsis "Open Fabrics Interfaces") (description "Framework focused on exporting fabric communication services to applications.") (license license:bsd-2))) (define-public asiofi (package (name "asiofi") (version "0.4.1") (source (origin (method url-fetch) (uri (string-append "https://github.com/FairRootGroup/asiofi/archive/v; version ".tar.gz")) (sha256 (base32 "0q88k7kffpa66327gnd7wwzrhqnhmqxpgyqa68aqs7l28f4iq9sn" (build-system cmake-build-system) (inputs `(("gcc-toolchain" ,gcc-toolchain) ("libfabric" ,libfabric) ("boost" ,boost))) (arguments `(;; #:configure-flags ;; (list ;; ;; find_package uses _ROOT variables. ;; ;; For compatibility, CMake is ignoring the variable. ;; (string-append "-DOFI_ROOT=" ;; (assoc-ref %build-inputs "libfabric") ;; )) #:phases (modify-phases %standard-phases (add-after 'unpack 'use-system-libraries (lambda _ (substitute* "cmake/asiofiLib.cmake" (("### PUBLIC") "cmake_policy(SET CMP0074 NEW)")) #t)) (add-before 'configure 'OFI (lambda _ (let ((libfabric-path (assoc-ref %build-inputs "libfabric"))) (let* ((var (getenv "PKG_CONFIG_PATH")) (result (string-append (if var (string-append var ":") "") libfabric-path "/lib/pkgconfig"))) (setenv "PKG_CONFIG_PATH" result (home-page "https://github.com/FairRootGroup/asiofi;) (synopsis "C++ Boost.Asio language bindings for OFI libfabric") (description "") (license license:lgpl2.1+)))