CompilerInvocationException

guacs guacs at gmail.com
Sun Feb 26 02:33:21 UTC 2023


Hi,

I'm facing this error and I'm not sure why. For context, I'm 
trying to build a parser for simple mathematical expressions 
given as strings i.e. "1 + 2". My main experience is in Python 
and I wanted to explore the D language so I thought of doing this 
small project as an exercise. The source code is 
[here](https://github.com/VisakhChekur/meval/tree/error/source).

NOTE: The error is happening when I'm using the SumType and I 
suspect that I'm using it incorrectly.

The error can be seen below:
```
❯ dub run --vverbose --config=executable
Using dub registry url 'https://code.dlang.org/'
'git --git-dir=/home/guacs/projects/meval/.git describe --long 
--tags' failed with exit code 128: fatal: No names found, cannot 
describe anything.
Determined package version using GIT: meval ~main
Collecting dependencies for meval
Scanning local packages...
iterating dir /home/guacs/.dub/packages/
iterating dir /home/guacs/.dub/packages/ entry libddoc-0.8.0
iterating dir /home/guacs/.dub/packages/ entry 
emsi_containers-0.9.0
iterating dir /home/guacs/.dub/packages/ entry libdparse-0.22.0
iterating dir /home/guacs/.dub/packages/ entry inifiled-1.3.3
iterating dir /home/guacs/.dub/packages/ entry silly-1.1.1
iterating dir /home/guacs/.dub/packages/ entry dunit-1.0.16
iterating dir /home/guacs/.dub/packages/ entry dcd-0.15.2
iterating dir /home/guacs/.dub/packages/ entry dscanner-0.14.0
   Found dependency silly 1.1.1
   Collecting dependencies for silly
Add config silly library
Add config meval unittest
Including meval unittest -> silly library
Add config meval executable
Including meval executable -> silly library
NON-PRIMARY: meval executable
Eliminating config executable for meval
     meval unittest -> silly library
Using configuration 'library' for silly
Using configuration 'unittest' for meval
Generating using build
Creating build generator.
Add config meval executable
Add config silly library
Add config meval unittest
Including meval unittest -> silly library
Including meval executable -> silly library
NON-PRIMARY: meval unittest
Eliminating config unittest for meval
     meval executable -> silly library
Using configuration 'executable' for meval
Using configuration 'library' for silly
Configuring target meval (executable /home/guacs/projects/meval 
meval)
deps: meval -> "silly"
   Configuring target without output silly
deps: silly ->
Configure dependencies of meval, deps:
Configuring dependent meval, deps:
     Starting Performing "debug" build using 
/home/guacs/dlang/dmd-2.102.1/linux/bin64/dmd for x86_64.
Target 
'/home/guacs/.dub/cache/meval/~main/build/executable-debug-linux.posix-x86_64-dmd_v2.102.1-BA8BA57C46223F272147C400395CD614568C52989F3A410949BE6AC73D142207/meval' doesn't exist, need rebuild.
     Building meval ~main: building configuration [executable]
[cwd=/home/guacs/projects/meval] 
/home/guacs/dlang/dmd-2.102.1/linux/bin64/dmd -c 
-of../../.dub/cache/meval/~main/build/executable-debug-linux.posix-x86_64-dmd_v2.102.1-BA8BA57C46223F272147C400395CD614568C52989F3A410949BE6AC73D142207/meval.o -debug -g -w -version=Have_meval -version=Have_silly -Isource/ -I../../.dub/packages/silly-1.1.1/silly source/app.d source/enums.d source/evaluator.d source/exceptions.d source/expr.d source/parser.d source/tokenizer.d source/utils.d ../../.dub/packages/silly-1.1.1/silly/silly.d -vcolumns
Error: unknown, please file report on issues.dlang.org
FAIL 
../../.dub/cache/meval/~main/build/executable-debug-linux.posix-x86_64-dmd_v2.102.1-BA8BA57C46223F272147C400395CD614568C52989F3A410949BE6AC73D142207 meval executable
Error /home/guacs/dlang/dmd-2.102.1/linux/bin64/dmd failed with 
exit code 1.
Full exception: 
dub.compilers.compiler.CompilerInvocationException at source/dub/compilers/compiler.d(170): /home/guacs/dlang/dmd-2.102.1/linux/bin64/dmd failed with exit code 1.
----------------
??:? [0x5632bfdc21e6]
??:? [0x5632bfdc3cf6]
??:? [0x5632bfda4cef]
??:? [0x5632bfca798a]
??:? [0x5632bfc526ea]
??:? [0x5632bfc58b5a]
??:? [0x5632bfc2eefa]
??:? [0x5632bfc2cb79]
??:? [0x5632bfc2980f]
??:? [0x5632bfc28e41]
??:? [0x5632bfc27e05]
??:? [0x5632bfa5e1a4]
??:? [0x5632bfd3fcd2]
??:? [0x5632bfd40a3d]
??:? [0x5632bfd38b06]
??:? [0x5632bfda49db]
??:? [0x5632bfda48d5]
??:? [0x5632bfda472d]
??:? __libc_start_main [0x7f3bec33f082]
??:? [0x5632bfa25c49]
```

Compiler/DUB details:
```
❯ dub --version
DUB version 1.31.1, built on Feb 15 2023

❯ dmd --version
DMD64 D Compiler v2.102.1
Copyright (C) 1999-2023 by The D Language Foundation, All Rights 
Reserved written by Walter Bright
```

Also, I'm using WSL2 on Windows 10 and the Linux version is: 
`Ubuntu 20.04.5 LTS`


More information about the Digitalmars-d-learn mailing list