Hi everyone,
I'm trying to add a `clone` function to Guile to find a long-term fix for
https://codeberg.org/guix/guix/issues/7690.
So far I've got a Guile version which builds and supports the syscall.
Where I struggle is making it play nice with Guix. I built a tarball of Guile
and I use this command to develop Guix:
guix shell -CNW coreutils which nss-certs \
--with-source=guile=$(pwd)/../guile/guile-3.0.11.84-a2f22.tar.xz \
-D guix
This takes a while to build the Guile version. Afterwards, I ran `make clean`,
even `make distclean`, then recompiled Guix.
The issue is that in my patched Guix, `clone` doesn't seem to exist, *for the
Guile running Guix*.
In the eyes of the compiler, as well as the interpreter (when running after
`make clean-go`), compiler warnings look like it uses the new code:
ARNING: (gnu build linux-container): imported module (guix build syscalls)
overrides core binding `CLONE_NEWNET'
When I run `(help clone)` in the generated `./guile` executable, which is also
used by `scripts/guix`, it shows me my `clone` as expected. Same goes for `guix
repl`, including `(use-modules (gnu build linux-container))`.
Yet when I try to run Guix via `./pre-inst-env guix shell --container hello --
hello`, it crashes with:
In gnu/build/linux-container.scm:
482:16 5 (call-with-container (#<<file-system> device: "none…> …) …)
266:13 4 (run-container "/tmp/guix-directory.kpSYRe" (#<<fil…> …) …)
In ice-9/boot-9.scm:
1677:22 3 (raise-exception _ #:continuable? _)
In guix/store.scm:
519:30 2 (_ _)
In ice-9/boot-9.scm:
1677:22 1 (raise-exception _ #:continuable? _)
In guix/ui.scm:
1030:18 0 (_ _)
guix/ui.scm:1030:18: error: clone: unbound variable
A similar error appears when interpreting the modules, e.g. `make clean-go`
then running the command.
Does anyone have an idea what I'm doing wrong? A WIP is at
https://codeberg.org/jchrist/guix/pulls/2 in case someone wants to test it.
Thank you very much,
Johannes