Re: Debugging cross-compilation dependencies

2022-07-28 Thread Philip McGrath
On Sat, Jul 23, 2022, at 7:30 AM, Philip McGrath wrote:
> Hi Guix,
>
> For the upcoming Racket 8.6 release, I've been trying to get the 
> Chez-Scheme–based implementation working for architectures without 
> native code-generation backends [1] and initial support for 
> cross-compilation. (Full support for cross-compilation will come after 
> there is a `racket-build-system`, since it involved building a 
> cross-compilation plugin for the compiler, and tooling for doing so 
> lives in a different package, but I had a problem during the 
> bootstrapping process with QEMU [2].)
>
> I thought I had things working at least up through 
> `chez-scheme-for-racket`, but, when I later removed the QEMU 
> binfmt_misc package from my (foreign) system, I discovered that a 
> dependency was incorrectly being cross-compiled when it needed to be 
> run on the build machine. Specifically, the problem was with Zuo (a 
> tiny Racket-like language for build scripts, [3] which replaces complex 
> makefiles in 8.6), which was particularly surprising, since it is only 
> ever used in `native-inputs`.
>
> I've put my work in progress at [4]. 

Much to my surprise, I discovered I can avoid the problem by changing code for 
#:make-flags like this:

```
#~(string-append "ZUO="
  #$(this-package-native-input "zuo")
  "/bin/zuo"))
```

to instead use `%build-inputs`, like this:

```
#~(string-append "ZUO="
  (search-input-file %build-inputs
 "/bin/zuo"))
```

Is this expected behavior? Maybe `this-package-native-input` is supposed to 
only be used under `ungexp-native`, rather than `ungexp`?

-Philip



Re: "user with UID not found" error

2022-07-28 Thread Chris Marusich
FYI: https://lists.gnu.org/archive/html/guix-devel/2022-02/msg00263.html

Sorry for the top post; I'm not on my usual computer.

On Wed, Jul 27, 2022 at 12:51 PM Christopher Batten 
wrote:

>
> Hmmm ... this made me think that running both was not a great idea?
>
>
> https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system-level_authentication_guide/usingnscd-sssd
>
> But I am not an expert on any of this :) I guess the key is to just make
> sure you only enable caching for hosts in /etc/nscd.conf?
>
> Best,
> Chris
>
> > On Jul 27, 2022, at 8:44 AM, Ricardo Wurmus  wrote:
> >
> >
> > Hi Christopher,
> >
> >> Turns out we are using SSSD not NCSD on our Linux systems. It seems to
> be working fine:
> >
> > You will need to run NSCD if you want Guix software to be able to talk
> > to the system’s SSSD.  The reason is that SSSD works by having
> > applications load a library whereas NSCD implements a network protocol.
> > Software built with Guix cannot load the system libary due to ABI
> > conflict, but it *can* talk to NSCD over the network.
> >
> > The system NSCD talks to the system SSSD, so there’s no problem there.
> >
> > --
> > Ricardo
>
>


Re: Guix "issues" bug tracker viewer site down

2022-07-28 Thread Tobias Geerinckx-Rice

Hi Andy,

Andy Tai 写道:

502 Bad Gateway


Thanks!  Sadly, it's been like that for about a week now.  You can 
use https://bugs.gnu.org/ until it returns.


We are unable to SSH into berlin to fix this.  Luckily, the other 
vital berlin services (Web site, CI, …) are still up and running.


The bad news is that we have to wait for a physical human to plug 
in a physical cable, and no such humans are physically available 
(summer etc.).


The good news is that this cable will connect to a management 
network that will allow us to remotely recover from machine 
lock-ups and lock-outs in future, without needing trips down to 
the data centre.


Kind regards,

T G-R


signature.asc
Description: PGP signature


Re: boiler plate generation with hygenic macros in guile

2022-07-28 Thread Blake Shaw
Hi Maxime & Liliana,

I just want to pop in and say thanks for your advice, its been helpful. I
almost have the implementation down, but a few tricky bits I still havent
got right... (what I'm attempting is a little more tricky than the example
I gave here, which I shortened for the sake of transmissibility -- the goal
is to be able to generate classes from dictionaries in an ad-hoc manner).

Feel like I'm almost there, just a few bits to work out, but I won't be
able to return to it for another week or so. As soon as I have it down I'll
report back in detail in case it could help others.

Happy hacking!
b


On Mon, Jul 25, 2022 at 12:35 PM Liliana Marie Prikler <
liliana.prik...@ist.tugraz.at> wrote:
>
> Hi Blake,
>
> Am Mittwoch, dem 20.07.2022 um 23:57 + schrieb Blake Shaw:
> > Ah! sorry, let me begin again:
> >
> > Right now I am working on a window manager extension system in Guile
> > and GOOPs, and I want to eliminate the boilerplate for generating class
> > slots, with a syntax-case macro like:
> >
> > #+begin_example scheme
> > (define-syntax slot-machine
> > (λ (form)
> >   (syntax-case form ()
> > ((_ category quality value)
> >#'(let* ((sym  (symbol-append category '- quality))
> > (set-sym! (symbol-append 'set- sym '!))
> > (get-sym  (symbol-append 'get- sym))
> > (acc-sym  (symbol-append 'acc- sym)))
> > (if (or (symbol? value) (string? value) (number? value))
> > (quasiquote (,sym #:init-value value
> >   #:setter   ,set-sym!
> >   #:getter   ,get-sym
> >   #:accessor   ,acc-sym))
> > (quasiquote (,sym #:init-form  value
> >   #:setter   ,set-sym!
> >   #:getter   ,get-sym
> >   #:accessor   ,acc-sym
> > #+end_example

> whenever debugging your syntax-rules or syntax-cases.  In this example,
> > (macroexpand (slot-machine 'inner 'quality #t))
> yields
> > # > (const #:setter) (toplevel set-inner-quality!) (const #:getter)
> > (toplevel get-inner-quality) (const #:accessor) (toplevel acc-inner-
> > quality))>
> but with an additional quote that's
> >  > append) (const inner) (const -) (const quality))) (let (set-sym!) (set-
> > sym!-1dff1b83541ce327-b6) ((call (toplevel symbol-append) (const set-)
> > (lexical sym sym-1dff1b83541ce327-b4) (const !))) (let (get-sym) (get-
> > sym-1dff1b83541ce327-b8) ((call (toplevel symbol-append) (const get-)
> > (lexical sym sym-1dff1b83541ce327-b4))) (let (acc-sym) (acc-sym-
> > 1dff1b83541ce327-ba) ((call (toplevel symbol-append) (const acc-)
> > (lexical sym sym-1dff1b83541ce327-b4))) (if (let (t) (t-
> > 1dff1b83541ce327-bd) ((call (toplevel symbol?) (const #t))) (if
> > (lexical t t-1dff1b83541ce327-bd) (lexical t t-1dff1b83541ce327-bd)
> > (let (t) (t-1dff1b83541ce327-c0) ((call (toplevel string?) (const #t)))
> > (if (lexical t t-1dff1b83541ce327-c0) (lexical t t-1dff1b83541ce327-c0)
> > (call (toplevel number?) (const #t)) (call (@@ (guile) list)
> > (lexical sym sym-1dff1b83541ce327-b4) (const #:init-value) (const #t)
> > (const #:setter) (lexical set-sym! set-sym!-1dff1b83541ce327-b6) (const
> > #:getter) (lexical get-sym get-sym-1dff1b83541ce327-b8) (const
> > #:accessor) (lexical acc-sym acc-sym-1dff1b83541ce327-ba)) (call (@@
> > (guile) list) (lexical sym sym-1dff1b83541ce327-b4) (const #:init-form)
> > (const #t) (const #:setter) (lexical set-sym! set-sym!-
> > 1dff1b83541ce327-b6) (const #:getter) (lexical get-sym get-sym-
> > 1dff1b83541ce327-b8) (const #:accessor) (lexical acc-sym acc-sym-
> > 1dff1b83541ce327-ba)))>
> Ouch.
>
> > With this I can call (slot-machine 'inner 'color "green") to produce
> > what looks like an acceptable slot definition:
> > => (inner-color #:init-value "#BF3D52" #:setter set-inner-color!
> > #:getter get-inner-color #:accessor acc-inner-color)
> Note that you're confusing symbols and syntax here.  A common mistake
> for the novice macro expander, but in Scheme, symbols and syntax are
> distinct.
>
> > Indeed, if I define a class with this slot definition in place, it
> > works fine:
> >
> > #+begin_example scheme
> >
> > (define-class  ()
> > (inner-color #:init-value "#BF3D52" #:setter set-inner-color!
> > #:getter
> > get-inner-color #:accessor acc-inner-color))
> >
> > (describe )
> > =>  is a class. It's an instance of 
> > Superclasses are:
> > 
> > Directs slots are:
> > inner-color
> > (No direct subclass)
> > Class Precedence List is:
> > 
> > 
> > 
> > Class direct methods are:
> > Method #< ( ) 7f7b27e10ac0>
> >  Generic: setter:acc-inner-color
> > Specializers:  
> > Method #< () 7f7b27e10b00>
> >  Generic: acc-inner-color
> > Specializers: 
> > Method #< ( ) 7f7b27e10b40>
> >  Generic: set-inner-color!
> > Specializers:  
> > Method #< () 7f7b27e10b80>
> >  Generic: get-inner-color
> > Specializers: 
> >
> > #+en

Kernel module build error with system image cross-build

2022-07-28 Thread Frank Terbeck
Good day, good people!

I've  been playing  around with  building guix  images for  a beaglebone
black board that's been catching dust in  my flat. I've been giving it a
go with the template from guix's git repository, like this:

  guix system image --target=arm-linux-gnueabihf 
~/src/guix/gnu/system/examples/beaglebone-black.tmpl

After a while, this breaks like this:

  […]
  building /gnu/store/nv461zd7rs6mhns9s3jx4v65ln3jsrv7-linux-modules.drv...
  builder for `/gnu/store/nv461zd7rs6mhns9s3jx4v65ln3jsrv7-linux-modules.drv' 
failed with exit code 1
  build of /gnu/store/nv461zd7rs6mhns9s3jx4v65ln3jsrv7-linux-modules.drv failed
  View build log at 
'/var/log/guix/drvs/nv/461zd7rs6mhns9s3jx4v65ln3jsrv7-linux-modules.drv.gz'.
  […]
  guix system: error: build of 
`/gnu/store/lqwjj7fjf235psw2br5i8y10cm22pq4l-disk-image.drv' failed


The build log looks like this:

  Backtrace:
 5 (primitive-load "/gnu/store/axmhy07daha215gwbqghh39k7ja?")
  In ice-9/eval.scm:
  619:8  4 (_ #f)
 626:19  3 (_ #)
 293:34  2 (_ #(# #))
  In srfi/srfi-1.scm:
 586:17  1 (map1 ("omap_hsmmc" "ahci" "usb-storage" "uas" "usbh?" ?))
  In gnu/build/linux-modules.scm:
  257:5  0 (_)

  gnu/build/linux-modules.scm:257:5: kernel module not found "omap_hsmmc" 
"/gnu/store/rslz7zlq11wjnvixzfasyvr4b6rv2m7j-linux-libre-5.18.14/lib/modules"


I am not at all familiar with how the kernel (and its modules) build au-
tomation in guix works, so I am  not sure how to approach this.

FWIW, the host system in this case is x86_64, so this is a cross-build.


Any ideas would be appreciated.


Regards, Frank



Guix "issues" bug tracker viewer site down

2022-07-28 Thread Andy Tai
https://issues.guix.gnu.org/

is showing

502 Bad Gateway



Re: Garbage Collector

2022-07-28 Thread Gottfried

Hi again,

in my config.scm if I add this part

(guix-service-type
>config => (guix-configuration
>  (inherit config)
>  (extra-options (list "--gc-keep-derivations=yes" 
"--gc-keep-outputs=yes"))


at the end of my guix-service-types,
it seems to me there I have to make 4 brackets:
Or am I wrong?



My config.scm:

;; This is an operating system configuration generated
;; by the graphical installer.

(use-modules (gnu))
(use-package-modules cups scanner)
(use-service-modules cups desktop networking ssh xorg)

(operating-system
  (locale "de_DE.utf8")
  (timezone "Europe/Berlin")
  (keyboard-layout (keyboard-layout "de"))
  (host-name "Tuxedo")
  (users (cons* (user-account
  (name "gfp")
  (comment "Gfp")
  (group "users")
  (home-directory "/home/gfp")
  (supplementary-groups
'("wheel" "netdev" "audio" "video")))
%base-user-accounts))
  (packages
(append
  (list (specification->package "nss-certs"))  
  %base-packages))
  (services
(append
  (list (service mate-desktop-service-type)
(service enlightenment-desktop-service-type)
(service cups-service-type
(cups-configuration
(web-interface? #t)
(extensions (list cups-filters 
hplip
(service openssh-service-type)
(service tor-service-type)
(set-xorg-configuration
  (xorg-configuration
(keyboard-layout keyboard-layout
  (modify-services %desktop-services
(sane-service-type _ => sane-backends
  (guix-service-type
config => (guix-configuration
  (inherit config)
  (extra-options (list "--gc-keep-derivations=yes" 
"--gc-keep-outputs=yes"))


  (bootloader
(bootloader-configuration
  (bootloader grub-efi-bootloader)
  (target "/boot/efi")
  (keyboard-layout keyboard-layout)))
  (swap-devices
(list (uuid "51d5cd20-4513-4a02-9e35-df4338eccaa0")))
  (file-systems
(cons* (file-system
 (mount-point "/boot/efi")
 (device (uuid "BB77-FE3B" 'fat32))
 (type "vfat"))
   (file-system
 (mount-point "/")
 (device
   (uuid "4fb0ed7c-61ab-45eb-be0b-ff527b320e6d"
 'ext4))
 (type "ext4"))
   %base-file-systems)))


Gottfried


Am 25.07.22 um 17:20 schrieb Felix Lechner:

Hi,

On Mon, Jul 25, 2022 at 2:52 AM Gottfried  wrote:


The manual says that it is dangerous to use: "guix gc"
because it can delete too much.


I agree that 'guix gc' deletes too much, but it's probably not
dangerous. You will just see some downloads and builds repeated when
reconfiguring later.

I believe 'guix gc' deletes items that are not garbage to me (but I am
new to Guix). Based on friendly advice I received, I currently use
these settings:

(guix-service-type
   config => (guix-configuration
 (inherit config)
 (extra-options (list "--gc-keep-derivations=yes" "--gc-keep-outputs=yes"))
...

Kind regards
Felix Lechner




OpenPGP_0x61FAF349C9FB7F94.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: Garbage Collector

2022-07-28 Thread Gottfried

Hi,
when I look at your:

(guix-service-type
  config => (guix-configuration
(inherit config)
(extra-options (list "--gc-keep-derivations=yes" 
"--gc-keep-outputs=yes"))


Isn't there at the end one bracket too little, to close up the whole thing?

Because when I add that to my config.scm file the first bracket before 
guix-service-type appears violett in Emacs,

but there is no violet bracket at the end which closes it.

Gottfried


Am 25.07.22 um 17:20 schrieb Felix Lechner:

Hi,

On Mon, Jul 25, 2022 at 2:52 AM Gottfried  wrote:


The manual says that it is dangerous to use: "guix gc"
because it can delete too much.


I agree that 'guix gc' deletes too much, but it's probably not
dangerous. You will just see some downloads and builds repeated when
reconfiguring later.

I believe 'guix gc' deletes items that are not garbage to me (but I am
new to Guix). Based on friendly advice I received, I currently use
these settings:

 > (guix-service-type
  config => (guix-configuration
(inherit config)
(extra-options (list "--gc-keep-derivations=yes" "--gc-keep-outputs=yes"))




...

Kind regards
Felix Lechner




OpenPGP_0x61FAF349C9FB7F94.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Dual booting

2022-07-28 Thread Paul Jewell via

Good afternoon,

Could anyone please share a working configuration for dual booting 
windows and guix? I have to use windows for work, but use Linux for 
everything else. I want to put guix on my work laptop so I can stick 
with Linux when travelling (I am self employed, so there are no IT 
restrictions on my system). I have the necessary skills to put another 
Linux distribution on, but I want to use my spare time in the evenings 
when travelling to work on guix. Looking at the bootloader information 
in the documentation, it seems that chainloader is not available as an 
option.


Many thanks!





Re: Old packages in GUIX under Debian stable

2022-07-28 Thread (
On Thu Jul 28, 2022 at 12:50 PM BST, Alexander Asteroth wrote:
> One thing I noticed during this process is that the location of the
> users profile seems to have changed at some point from .guix-profile to
> .config/guix/current and that my shell init files referred to the wrong
> location maybe that caused the issues in the first place?
Having a ~/.config/guix/current is entirely normal:

* /run/current-system/profile - `guix system` profile
* ~/.guix-profile - `guix package` profile
* ~/.guix-home/profile - `guix home` profile
* ~/.config/guix/current - `guix pull` profile

-- (



Re: Old packages in GUIX under Debian stable

2022-07-28 Thread Alexander Asteroth
Hi Tobias,

On Thu, Jul 28 2022, 11:04:21, Tobias Geerinckx-Rice wrote:

> Hi Alexander,
>
>>$ type guix
>>guix is hashed ($HOME/.guix-profile/bin/guix)
>
> You ran 'guix install guix' or the equivalent.

Yes, I did that because the guix version installed by Debian at some
point started to refused to install anything because it was complaining
about wrong manifest all the time.

> The solution is simple:
>
> 1. Don't :-)  Update Guix only with 'guix pull'.
> 2. Run 'guix remove guix; hash guix' and verify that type now points to 
> ~/.config/guix/current.

If did that now (guix remove guix) and guix now points to
/usr/local/bin/guix (as installed by the guix install script).

Still `guix search icecat` shows version 78 as current

```
$ guix describe
  guix a0178d3
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: a0178d34f582b50e9bdbb0403943129ae5b560ff
```

Now I ran a 'guix pull' anbd sourced the profile

```
$guix describe
Generation 3Jul 28 2022 13:26:16(current)
  guix bdb2e26
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: bdb2e262fcbea76de807cd829c2d2270661546a5
``` 

```
$type guix
guix is hashed ($HOME/.config/guix/current/bin/guix)
```
and now software seems to be recent. Finally.

One thing I noticed during this process is that the location of the
users profile seems to have changed at some point from .guix-profile to
.config/guix/current and that my shell init files referred to the wrong
location maybe that caused the issues in the first place?

Thanks a lot!

-- Alex

>
>
> Kind regards,
>
> T G-R
>
> Sent on the go.  Excuse or enjoy my brevity.



signature.asc
Description: PGP signature


Re: Old packages in GUIX under Debian stable

2022-07-28 Thread Tobias Geerinckx-Rice
Hi Alexander,

>$ type guix
>guix is hashed ($HOME/.guix-profile/bin/guix)

You ran 'guix install guix' or the equivalent.  The solution is simple:

1. Don't :-)  Update Guix only with 'guix pull'.
2. Run 'guix remove guix; hash guix' and verify that type now points to 
~/.config/guix/current.


Kind regards,

T G-R

Sent on the go.  Excuse or enjoy my brevity.



Re: Old packages in GUIX under Debian stable

2022-07-28 Thread Alexander Asteroth
Dear Ricardo,

On Wed, Jul 27 2022, 16:21:22, Ricardo Wurmus wrote:

> Alexander Asteroth  writes:
>
>> I verified that the version of the guix binary is from my current
>> profile, the environment variables are freshly set from current
>> profile as well.
>
> Do you mean the ~/.config/guix/current profile or some other profile?

yes.

> What does “type guix” say?

$ type guix
guix is hashed ($HOME/.guix-profile/bin/guix)

> And what does “guix describe” say?

$ guix describe
Generation 1Jul 26 2022 15:19:43(current)

I reinstalled just recently again. Now based on Debian testing and using
the guix-installer script. Interestingly now package isync is newer
(1.4.1 instead of 1.3.3) so I can at least read email again. But for
icecat it still has the old version

$ guix search icecat
name: icecat
version: 78.10.0-guix0-preview1

Cheers,
Alex


signature.asc
Description: PGP signature