Hi, nomike and guix, Despite my lack of experience with Mono, I tried to look into this problem. I did not find the cause of it, but I've found some stuff that I'd like to share and hope it'll be useful.
First I modified your recipe to use the "/verbosity:diagnostic" flag,
as shown below, to get a lot more information in the log.
```scheme
(invoke "xbuild" "/target:KeePass" "/property:Configuration=Debug"
"/verbosity:diagnostic")
```
An example of this verbose log is attached.
It shows that the first failed task is called Csc, which is the C# compiler
task.
And it fails without any error prompt...
Then I looked into `/gnu/store/xyz-mono-6.12.0.206/` and found the `bin/csc`
script, which is very short:
```{bash}
$ cat /gnu/store/0cfrzh6gwzmkz4q9j064rb6db3pmmk37-mono-6.12.0.206/bin/csc
#!/gnu/store/3jhfhxdf6v5ms10x5zmnl166dh3yhbr1-bash-minimal-5.1.16/bin/sh
exec /gnu/store/0cfrzh6gwzmkz4q9j064rb6db3pmmk37-mono-6.12.0.206/bin/mono
--gc-params=nursery-size=64m $MONO_OPTIONS
/gnu/store/0cfrzh6gwzmkz4q9j064rb6db3pmmk37-mono-6.12.0.206/lib/mono/4.5/csc.exe
"$@"
```
As you can see, it calls `lib/mono/4.5/csc.exe`, which does not exist!
And I don't know if this is a bug in Guix's mono package.
```{bash}
$ /gnu/store/0cfrzh6gwzmkz4q9j064rb6db3pmmk37-mono-6.12.0.206/bin/csc
Cannot open assembly
'/gnu/store/0cfrzh6gwzmkz4q9j064rb6db3pmmk37-mono-6.12.0.206/lib/mono/4.5/csc.exe':
No such file or directory.
```
The Arch package [0] contains `lib/mono/4.5/csc.exe`,
I don't know about NixOS nor Gentoo though.
I tried 3 things to confirm if `csc.exe` is the cause of the problem:
* Add an echo in the csc script;
* Make the script write a file `csc.log`;
* Sleep for 2 seconds.
A patch with the second and last modifications is attached.
The first attempt didn't change anything in the log;
I didn't find the `csc.log` file after building keepass with the option
`--keep-failed`;
The idea of the last patch was that if Csc fails after ~2000ms (instead of the
usual <10ms) we know it calls the script.
But it didn't affect anything..
I also tried to debug the `script/mcs` which also is a C# compiler and nothing
happened.
And now I'm out of ideas now :(
I hope this helps you somehow.
Best regards,
Arthur
[0] https://archlinux.org/packages/extra/x86_64/mono/
av5d2hh8jyyx6yf4z93087bp7s2fvr-keepass-2.57.1.drv.gz
Description: application/gzip
From e2117fd98047981dfa160b580d19f57c0b73b4b0 Mon Sep 17 00:00:00 2001 Message-ID: <e2117fd98047981dfa160b580d19f57c0b73b4b0.1748542591.git.arthurhdrodrig...@proton.me> From: Arthur Rodrigues <[email protected]> Date: Thu, 29 May 2025 15:16:26 -0300 Subject: [PATCH] add some debug in mono Change-Id: I4cf80ea164e14e1831fef960bde4414777fac617 --- gnu/packages/dotnet.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index cf59ae7a64..b1c7d50dfe 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm @@ -1726,13 +1726,13 @@ (define mono-6.12.0-external-repo-specs (define-public mono-6.12.0 (package (inherit mono-5.10.0) - (version "6.12.0.206") + (version "6.12.0.206-test") (name "mono") (source (origin (method git-fetch) (uri (git-reference (url "https://gitlab.winehq.org/mono/mono.git") - (commit (string-append "mono-" version)))) + (commit (string-append "mono-6.12.0.206")))) (file-name (git-file-name name version)) (sha256 (base32 @@ -1803,7 +1803,11 @@ (define-public mono-6.12.0 (lambda _ (substitute* "mcs/tools/Makefile" (("mono-helix-client") - "")))) + "")) + (substitute* "scripts/mcs.in" + (("sh") "sh\nsleep 2\necho \"mcs is used > mcs.log\"")) + (substitute* "scripts/csc.in" + (("sh") "sh\nsleep 2\necho \"csc is used > csc.log\"")))) (replace 'build-reference-assemblies (lambda* (#:key make-flags #:allow-other-keys) (let ((top (getcwd))) base-commit: c2cee267e8aa939a9d19d30eb6e9c28757cab8ab -- 2.49.0
