Re: D compiler installation ldc failed

2022-05-09 Thread zimoun
Hi,

On Fri, 29 Apr 2022 at 11:54, Martin Michel  wrote:

> guix install: error: build of 
> `/gnu/store/gnc9jbwxwbplvpygb276p5fkp3q1l7v2-dub-1.7.2.drv' failed

Thanks for the report.

This web page [1] provides a clue.

1: 



Indeed, this first commit (6dffced0) failing is a merge.

--8<---cut here---start->8---
6dffced09ecda024e0884e352778c221ad066fd6
Author: Maxim Cournoyer 
AuthorDate: Mon Dec 13 16:29:21 2021 -0500
Commit: Maxim Cournoyer 
CommitDate: Mon Dec 13 16:29:21 2021 -0500

Parent: b603554ed0 gnu: emacs-geiser-guile: Update to 0.19.
Parent: e3196755e6 gnu: Further simplify package inputs.
Follows:v1.3.0 (12212)

Merge branch 'core-updates-frozen' into 'master'.

At last!

865 files changed, 88327 insertions(+), 84591 deletions(-)
--8<---cut here---end--->8---

This introduces a regression for the package ’dub’.

Find exactly which commit introduces the failure could be tricky using
regular bisect with good as b603554e and bad as e3196755e6 since the
history is quite complex and many substitutes are not available.

Moreover, even after burning some CPU, for many commits in this range,
Guix is simply not able to pull (or to ’guix time-machine --commit=’).
Well, ’git bisect’ says it could be any of 154 commits (see below) –
using this snippet:

--8<---cut here---start->8---
$ cat bisect.sh

ci=$(git log --format="%H" -1)
if guix time-machine --commit=$ci -- help ;then
guix time-machine --commit=$ci \
 -- build dub --no-grafts
exit $?
else
exit 125
fi

$ git bisect start
$ git bisect good 8d27e6a7
$ git bisect bad  e3196755e6
$ git bisect run ./bisect.sh
--8<---cut here---end--->8---


Well, the error message is:

--8<---cut here---start->8---
starting phase `build'
./build.sh: line 45: git: command not found
Could not determine a version with git.
Using existing version file.
Running ldmd2...
source/dub/semver.d(107): Deprecation: Usage of the `body` keyword is 
deprecated. Use `do` instead.
--8<---cut here---end--->8---

and I guess this ’ldmd2’ comes from the ’ldc’ package.  Therefore, let
consider,

--8<---cut here---start->8---
$ git log --grep=ldc --oneline -1
5a1ddd146b gnu: ldc: Update to 1.27.1.
--8<---cut here---end--->8---

and this commit is part of the “skipped” commits (see below).


BTW, note that ’rdmd’ is also broken.  Well, both ’dub’ and ’rdmd’ would
deserve an update.  But it implies to unknot some D packages bootstrap.



Note that the parent b603554ed0 builds fine.  So, waiting a complete
fix, you can still use:

guix time-machine --commit=b603554ed0 -- install dub ldc


Cheers,
simon



The first bad commit could be any of:
7b5824f1a77f02016639aeee72538b5d39d397e3
2e2c6482c9d02fe456df8a0d3d35612f6f61ba64
a248421cbdd27730f436c76aefe322b3091d88b6
68ce9c38848982b53b41d1c6bb44eafb78d981b9
e976789754c0af63aef4acea18971c9f41ed2826
df20439d442759473579323d62fd2eb566d849e6
fa3878f0606818a2108a2f16fa155308044995b8
175018f162b5d24d1e0530ed5d8812a123c9cccd
8f78f61c029bb45c39fa782f8ac2c6962e44cdab
4a43e64b41e51f906258e0a2f238adbd6dcaed7e
b8324050ada78a6da96717aee972ceddaa77e528
33c7e1834739da8905aecd09fa44c8744bf7d773
fdae245a753d77a8266764fdcc8e11434a57d046
12b9810ede8795ff633145ccec4dd99482865cd8
86528cab04b16a4fbc3e81368b4cd405e85a4c8e
a0bf66ab9432675f86095d9a2533d7b80f58a668
a4ad0187d38325531b02062b46c552d1a52511bd
c60449434bf64d42ba5c2de456823448088d3573
daf54a3953e807d46c4c21bbc709879c6e8d31e8
000291fd4325d2afd1f9f93125986275f6e7ab7a
33b28e9553435a58f8e34c785ff3fd451165b634
222b461878179dbe3b5fdce8cb59cf6841579df7
feab09f72abc6d6eec16a1b8d27c231c747c0e00
831c08d8f263f476e0293f8a5422e7314a159c91
b9595a7659e5695faf4b0948ee48beb2aa913cf3
20e3dd052d7e4f59273e3646d3533d43c87c30b0
2fc08ccde4e134ccbbf7c1182165015d92712bbd
5a1ddd146bfd6cd874d0617872fe45148832113b
e0d9c3798229b041072e39dde1048bb02f1bfbcc
00bd5d3e4f05b73dfe0f5838823483349ae4ff3f
7541598fe28b93453814e19e52a778779717dc1b
00c78f8dbcfeee1bbfdace72f0cc73e8b2035929
35b91ada739e08d7ef3be130a5af5955195055b4
5f818705b4527f8aaae411d25b6f0cd55021614d
daa46cd151657ac4df991bf6651d46aae739fcef
06d2227e7eb2c45709a23a5b81f43dd6249f2399
879252e234f501bd18a63eb3c23a0bb370d72244
7137befc4388031a57eb52b338b049c0a66eed0f
d2fffa79863745e8be7c6ce8a720ba0839aa3a25
a46b8bbfabc0ebf4a476fbeae4066c8c94b6a45f
bc4f219ba472559b5d54e9262589fd9a83b4edaf
26457b40faa30d61a5cbe616ca355b5a0da41cf0
c6f3cb5f03e74c54e6dda527045aec91d70feb4e
4621cd7b8db00fd8230c8c5e51929f926aaf3795
f7d88cd4707eeaf02f9b854f05803d8d0428f670
698e6f17bb448c36fa7efdb2d24175078716c339
bcfff754ff4e7a9084868a0910540eb6a82f881f
22ebc35efd97b7745b0afbbe10ded80c52ca7dcb
3dd2ad6aeee91c

D compiler installation ldc failed

2022-04-29 Thread Martin Michel
Hello again,

today I wanted to install the LLVM-based compiler `ldc` for the D programming 
language (along with its package management system `dub`).
This failed grossly:

```
$ guix install ldc dub
The following packages will be installed:
   dub 1.7.2
   ldc 1.27.1

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/gnc9jbwxwbplvpygb276p5fkp3q1l7v2-dub-1.7.2.drv

8.2 MB will be downloaded
 ldc-1.27.1  7.8MiB   3.2MiB/s 00:02 
[##] 100.0%
building /gnu/store/gnc9jbwxwbplvpygb276p5fkp3q1l7v2-dub-1.7.2.drv...
/ 'build' phasebuilder for 
`/gnu/store/gnc9jbwxwbplvpygb276p5fkp3q1l7v2-dub-1.7.2.drv' failed with exit 
code 1
build of /gnu/store/gnc9jbwxwbplvpygb276p5fkp3q1l7v2-dub-1.7.2.drv failed
View build log at 
'/var/log/guix/drvs/gn/c9jbwxwbplvpygb276p5fkp3q1l7v2-dub-1.7.2.drv.gz'.
guix install: error: build of 
`/gnu/store/gnc9jbwxwbplvpygb276p5fkp3q1l7v2-dub-1.7.2.drv' failed
```

Unfortunately the tail of the log does not help me:

```
--- cut off many lines ---
starting phase `build'
./build.sh: line 45: git: command not found
Could not determine a version with git.
Using existing version file.
Running ldmd2...
source/dub/semver.d(107): Deprecation: Usage of the `body` keyword is 
deprecated. Use `do` instead.
source/dub/internal/sdlang/parser.d(121): Deprecation: module std.variant is 
not accessible here, perhaps add 'static import std.variant;'
source/dub/internal/sdlang/parser.d(121): Deprecation: module std.variant is 
not accessible here, perhaps add 'static import std.variant;'
Serializing composite type BuildRequirements which has no serializable fields
Serializing composite type BuildOptions which has no serializable fields
source/dub/internal/vibecompat/data/json.d(2111): Error: template instance 
`enforceEx!JSONException` template `enforceEx` is not defined, did you mean 
enforce(E : Throwable = Exception) if (is(typeof(new E("", string.init, 
size_t.init)) : Throwable) || is(typeof(new E(string.init, size_t.init)) : 
Throwable))?
source/dub/internal/vibecompat/data/json.d(838): Error: template instance 
`dub.internal.vibecompat.data.json.enforceJson!("source/dub/internal/vibecompat/data/json.d",
 838LU)` error instantiating
source/dub/internal/vibecompat/data/json.d(221):instantiated from here: 
`checkType!(Json[string])`
source/dub/dependency.d(309):instantiated from here: 
`opBinaryRight!"in"`
source/dub/internal/vibecompat/data/json.d(2111): Error: template instance 
`enforceEx!JSONException` template `enforceEx` is not defined, did you mean 
enforce(E : Throwable = Exception) if (is(typeof(new E("", string.init, 
size_t.init)) : Throwable) || is(typeof(new E(string.init, size_t.init)) : 
Throwable))?
source/dub/internal/vibecompat/data/json.d(839): Error: template instance 
`dub.internal.vibecompat.data.json.enforceJson!("source/dub/internal/vibecompat/data/json.d",
 839LU)` error instantiating
source/dub/internal/vibecompat/data/json.d(221):instantiated from here: 
`checkType!(Json[string])`
source/dub/dependency.d(309):instantiated from here: 
`opBinaryRight!"in"`
source/dub/internal/vibecompat/data/json.d(403): Error: template instance 
`dub.internal.vibecompat.data.json.Json.checkType!string` error instantiating
source/dub/dependency.d(314):instantiated from here: `get!string`
source/dub/internal/vibecompat/data/json.d(403): Error: template instance 
`dub.internal.vibecompat.data.json.Json.checkType!bool` error instantiating
source/dub/internal/vibecompat/data/json.d(399):instantiated from here: 
`get!bool`
source/dub/internal/vibecompat/data/json.d(1744):instantiated from 
here: `opCast!bool`
source/dub/recipe/io.d(158):instantiated from here: 
`writeJsonString!(LockingTextWriter, true)`
source/dub/dub.d(1102):instantiated from here: 
`serializePackageRecipe!(LockingTextWriter)`
source/dub/internal/vibecompat/data/json.d(403): Error: template instance 
`dub.internal.vibecompat.data.json.Json.checkType!long` error instantiating
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "./build.sh" arguments: () exit-status: 1 
term-signal: #f stop-signal: #f>
phase `build' failed after 16.0 seconds
command "./build.sh" failed with status 1
```

What to do in such cases? Any help is welcome!

Thanks in advance & kind regards,
Martin