GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T18:38:11Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/9963GHCi panic with --print-libdir flag2019-07-07T18:38:11ZJan Stolarekjan.stolarek@ed.ac.ukGHCi panic with --print-libdir flagReported on GHC devs:
```
$ ghc-stage2 --print-libdir
/dane/projekty/ghc/build/inplace/lib
$ ghc-stage2 --interactive --print-libdir
ghc-stage2: panic! (the 'impossible' happened)
(GHC version 7.9.20141222 for x86_64-unknown-linux):
...Reported on GHC devs:
```
$ ghc-stage2 --print-libdir
/dane/projekty/ghc/build/inplace/lib
$ ghc-stage2 --interactive --print-libdir
ghc-stage2: panic! (the 'impossible' happened)
(GHC version 7.9.20141222 for x86_64-unknown-linux):
ghc-stage2: panic! (the 'impossible' happened)
(GHC version 7.9.20141222 for x86_64-unknown-linux):
v_unsafeGlobalDynFlags: not initialised
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
```
Does not happen with GHC 7.8.x.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 7.9 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | Unresolved |
| Component | Driver |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"GHCi panic with --print-libdir flag","status":"New","operating_system":"","component":"Driver","related":[],"milestone":"7.10.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.9","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Reported on GHC devs:\r\n\r\n{{{\r\n$ ghc-stage2 --print-libdir\r\n/dane/projekty/ghc/build/inplace/lib\r\n$ ghc-stage2 --interactive --print-libdir\r\nghc-stage2: panic! (the 'impossible' happened)\r\n (GHC version 7.9.20141222 for x86_64-unknown-linux):\r\n ghc-stage2: panic! (the 'impossible' happened)\r\n (GHC version 7.9.20141222 for x86_64-unknown-linux):\r\n v_unsafeGlobalDynFlags: not initialised\r\n\r\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n\r\n\r\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n}}}\r\n\r\nDoes not happen with GHC 7.8.x.","type_of_failure":"OtherFailure","blocking":[]} -->7.10.1Thomas MiedemaThomas Miedemahttps://gitlab.haskell.org/ghc/ghc/-/issues/9828genprimopcode: parse error2019-07-07T18:38:54Zerikdgenprimopcode: parse errorBuilding git HEAD on powerpc-linux I get:
```
"inplace/bin/genprimopcode" --data-decl < compiler/stage1/build/primops.txt
> compiler/stage1/build/primop-data-decl.hs-incl
genprimopcode: parse error at "Parse error at li...Building git HEAD on powerpc-linux I get:
```
"inplace/bin/genprimopcode" --data-decl < compiler/stage1/build/primops.txt
> compiler/stage1/build/primop-data-decl.hs-incl
genprimopcode: parse error at "Parse error at line 42, column 8"
```
If I look at line 42 of `compiler/stage1/build/primops.txt` I see:
```
-- SCALAR_TYPE is the scalar type used to inject to/project from
vector
```
The word "vector" from the comment got wrapped onto the next line for no good reason.
I've checked the file `compiler/prelude/primops.txt.pp` which is processed to generate the file I'm having problems with and that file is fine.
I've cloned a new copy of the repo and done the usual `perl boot && ./configure && make` only to see exactly the same result.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 7.9 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"genprimopcode: parse error","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.9","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Building git HEAD on powerpc-linux I get:\r\n\r\n{{{\r\n\"inplace/bin/genprimopcode\" --data-decl < compiler/stage1/build/primops.txt \r\n > compiler/stage1/build/primop-data-decl.hs-incl\r\ngenprimopcode: parse error at \"Parse error at line 42, column 8\"\r\n}}}\r\n\r\nIf I look at line 42 of `compiler/stage1/build/primops.txt` I see:\r\n\r\n{{{\r\n-- SCALAR_TYPE is the scalar type used to inject to/project from\r\n vector\r\n}}}\r\n\r\nThe word \"vector\" from the comment got wrapped onto the next line for no good reason.\r\n\r\nI've checked the file `compiler/prelude/primops.txt.pp` which is processed to generate the file I'm having problems with and that file is fine.\r\n\r\nI've cloned a new copy of the repo and done the usual `perl boot && ./configure && make` only to see exactly the same result.\r\n","type_of_failure":"OtherFailure","blocking":[]} -->7.10.1Thomas MiedemaThomas Miedema