GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T19:02:48Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/3685"double free or corruption" error when running Setup.hs with other GHC in PATH2019-07-07T19:02:48Zajd"double free or corruption" error when running Setup.hs with other GHC in PATHInside network-2.2.1.5 source directory:
```
$ /home/alex/usr/bin/ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.12.0.20091121
$ /usr/bin/ghc --version
The Glorious Glasgow Haskell Compilation System, version 6...Inside network-2.2.1.5 source directory:
```
$ /home/alex/usr/bin/ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.12.0.20091121
$ /usr/bin/ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.10.4
$ echo $PATH
/home/alex/.cabal/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core
$ /home/alex/usr/bin/ghc --make Setup.hs
[1 of 1] Compiling Main ( Setup.hs, Setup.o )
Setup.hs:3:0:
Warning: In the use of `defaultUserHooks'
(imported from Distribution.Simple):
Deprecated: "Use simpleUserHooks or autoconfUserHooks, unless you need Cabal-1.2
compatibility in which case you must stick with defaultUserHooks"
Linking Setup ...
$ ./Setup configure
Warning: defaultUserHooks in Setup script is deprecated.
Configuring network-2.2.1.5...
Setup: fd:5: hGetContents: invalid argument (Invalid or incomplete multibyte or wide character)
*** glibc detected *** ./Setup: double free or corruption (!prev): 0x08e21050 ***
======= Backtrace: =========
/lib/libc.so.6(+0x6b6c1)[0xb76166c1]
/lib/libc.so.6(+0x6cf18)[0xb7617f18]
/lib/libc.so.6(cfree+0x6d)[0xb761af8d]
/lib/libc.so.6(+0x1829c)[0xb75c329c]
/lib/libc.so.6(iconv_close+0x1c)[0xb75c27ec]
./Setup[0x821f6b9]
======= Memory map: ========
08048000-082be000 r-xp 00000000 fe:00 1603797 /home/alex/src/network-2.2.1.5/Setup
082be000-082ed000 rwxp 00275000 fe:00 1603797 /home/alex/src/network-2.2.1.5/Setup
082ed000-082f0000 rwxp 00000000 00:00 0
08dbf000-08e4a000 rwxp 00000000 00:00 0 [heap]
b6f00000-b6f21000 rwxp 00000000 00:00 0
b6f21000-b7000000 ---p 00000000 00:00 0
b70c8000-b70e5000 r-xp 00000000 08:03 385336 /usr/lib/libgcc_s.so.1
b70e5000-b70e6000 rwxp 0001c000 08:03 385336 /usr/lib/libgcc_s.so.1
b7100000-b7300000 rwxp 00000000 00:00 0
b7391000-b7591000 r-xp 00000000 08:03 396531 /usr/lib/locale/locale-archive
b7591000-b7592000 rwxp 00000000 00:00 0
b7592000-b75a7000 r-xp 00000000 08:03 262160 /lib/libpthread-2.11.so
b75a7000-b75a8000 r-xp 00014000 08:03 262160 /lib/libpthread-2.11.so
b75a8000-b75a9000 rwxp 00015000 08:03 262160 /lib/libpthread-2.11.so
b75a9000-b75ab000 rwxp 00000000 00:00 0
b75ab000-b76eb000 r-xp 00000000 08:03 262169 /lib/libc-2.11.so
b76eb000-b76ed000 r-xp 00140000 08:03 262169 /lib/libc-2.11.so
b76ed000-b76ee000 rwxp 00142000 08:03 262169 /lib/libc-2.11.so
b76ee000-b76f1000 rwxp 00000000 00:00 0
b76f1000-b7715000 r-xp 00000000 08:03 262184 /lib/libm-2.11.so
b7715000-b7716000 r-xp 00023000 08:03 262184 /lib/libm-2.11.so
b7716000-b7717000 rwxp 00024000 08:03 262184 /lib/libm-2.11.so
b7717000-b7718000 rwxp 00000000 00:00 0
b7718000-b7762000 r-xp 00000000 08:03 388239 /usr/lib/libgmp.so.3.5.0
b7762000-b7765000 rwxp 00049000 08:03 388239 /usr/lib/libgmp.so.3.5.0
b7765000-b7767000 r-xp 00000000 08:03 262188 /lib/libdl-2.11.so
b7767000-b7768000 r-xp 00001000 08:03 262188 /lib/libdl-2.11.so
b7768000-b7769000 rwxp 00002000 08:03 262188 /lib/libdl-2.11.so
b7769000-b776b000 r-xp 00000000 08:03 262274 /lib/libutil-2.11.so
b776b000-b776c000 r-xp 00001000 08:03 262274 /lib/libutil-2.11.so
b776c000-b776d000 rwxp 00002000 08:03 262274 /lib/libutil-2.11.so
b776d000-b7774000 r-xp 00000000 08:03 262277 /lib/librt-2.11.so
b7774000-b7775000 r-xp 00006000 08:03 262277 /lib/librt-2.11.so
b7775000-b7776000 rwxp 00007000 08:03 262277 /lib/librt-2.11.so
b778c000-b778e000 r-xp 00000000 08:03 184559 /usr/lib/gconv/UTF-32.so
b778e000-b778f000 r-xp 00001000 08:03 184559 /usr/lib/gconv/UTF-32.so
b778f000-b7790000 rwxp 00002000 08:03 184559 /usr/lib/gconv/UTF-32.so
b7790000-b7791000 rwxp 00000000 00:00 0
b7791000-b7792000 r-xp 00000000 00:00 0 [vdso]
b7792000-b77ae000 r-xp 00000000 08:03 262276 /lib/ld-2.11.so
b77ae000-b77af000 r-xp 0001b000 08:03 262276 /lib/ld-2.11.so
b77af000-b77b0000 rwxp 0001c000 08:03 262276 /lib/ld-2.11.so
bffe2000-bfff7000 rwxp 00000000 00:00 0 [stack]
Aborted
```
Basically, a Setup script compiled with a different GHC than the one that Setup is using fails with a memory error.
See attached file for `/usr/bin/ghc-pkg dump` output.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.11 |
| 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":"\"double free or corruption\" error when running Setup.hs with other GHC in PATH","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.11","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Inside network-2.2.1.5 source directory:\r\n\r\n{{{\r\n$ /home/alex/usr/bin/ghc --version\r\nThe Glorious Glasgow Haskell Compilation System, version 6.12.0.20091121\r\n$ /usr/bin/ghc --version\r\nThe Glorious Glasgow Haskell Compilation System, version 6.10.4\r\n$ echo $PATH\r\n/home/alex/.cabal/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core\r\n$ /home/alex/usr/bin/ghc --make Setup.hs \r\n[1 of 1] Compiling Main ( Setup.hs, Setup.o )\r\n\r\nSetup.hs:3:0:\r\n Warning: In the use of `defaultUserHooks'\r\n (imported from Distribution.Simple):\r\n Deprecated: \"Use simpleUserHooks or autoconfUserHooks, unless you need Cabal-1.2\r\n compatibility in which case you must stick with defaultUserHooks\"\r\nLinking Setup ...\r\n$ ./Setup configure\r\nWarning: defaultUserHooks in Setup script is deprecated.\r\nConfiguring network-2.2.1.5...\r\nSetup: fd:5: hGetContents: invalid argument (Invalid or incomplete multibyte or wide character)\r\n*** glibc detected *** ./Setup: double free or corruption (!prev): 0x08e21050 ***\r\n======= Backtrace: =========\r\n/lib/libc.so.6(+0x6b6c1)[0xb76166c1]\r\n/lib/libc.so.6(+0x6cf18)[0xb7617f18]\r\n/lib/libc.so.6(cfree+0x6d)[0xb761af8d]\r\n/lib/libc.so.6(+0x1829c)[0xb75c329c]\r\n/lib/libc.so.6(iconv_close+0x1c)[0xb75c27ec]\r\n./Setup[0x821f6b9]\r\n======= Memory map: ========\r\n08048000-082be000 r-xp 00000000 fe:00 1603797 /home/alex/src/network-2.2.1.5/Setup\r\n082be000-082ed000 rwxp 00275000 fe:00 1603797 /home/alex/src/network-2.2.1.5/Setup\r\n082ed000-082f0000 rwxp 00000000 00:00 0 \r\n08dbf000-08e4a000 rwxp 00000000 00:00 0 [heap]\r\nb6f00000-b6f21000 rwxp 00000000 00:00 0 \r\nb6f21000-b7000000 ---p 00000000 00:00 0 \r\nb70c8000-b70e5000 r-xp 00000000 08:03 385336 /usr/lib/libgcc_s.so.1\r\nb70e5000-b70e6000 rwxp 0001c000 08:03 385336 /usr/lib/libgcc_s.so.1\r\nb7100000-b7300000 rwxp 00000000 00:00 0 \r\nb7391000-b7591000 r-xp 00000000 08:03 396531 /usr/lib/locale/locale-archive\r\nb7591000-b7592000 rwxp 00000000 00:00 0 \r\nb7592000-b75a7000 r-xp 00000000 08:03 262160 /lib/libpthread-2.11.so\r\nb75a7000-b75a8000 r-xp 00014000 08:03 262160 /lib/libpthread-2.11.so\r\nb75a8000-b75a9000 rwxp 00015000 08:03 262160 /lib/libpthread-2.11.so\r\nb75a9000-b75ab000 rwxp 00000000 00:00 0 \r\nb75ab000-b76eb000 r-xp 00000000 08:03 262169 /lib/libc-2.11.so\r\nb76eb000-b76ed000 r-xp 00140000 08:03 262169 /lib/libc-2.11.so\r\nb76ed000-b76ee000 rwxp 00142000 08:03 262169 /lib/libc-2.11.so\r\nb76ee000-b76f1000 rwxp 00000000 00:00 0 \r\nb76f1000-b7715000 r-xp 00000000 08:03 262184 /lib/libm-2.11.so\r\nb7715000-b7716000 r-xp 00023000 08:03 262184 /lib/libm-2.11.so\r\nb7716000-b7717000 rwxp 00024000 08:03 262184 /lib/libm-2.11.so\r\nb7717000-b7718000 rwxp 00000000 00:00 0 \r\nb7718000-b7762000 r-xp 00000000 08:03 388239 /usr/lib/libgmp.so.3.5.0\r\nb7762000-b7765000 rwxp 00049000 08:03 388239 /usr/lib/libgmp.so.3.5.0\r\nb7765000-b7767000 r-xp 00000000 08:03 262188 /lib/libdl-2.11.so\r\nb7767000-b7768000 r-xp 00001000 08:03 262188 /lib/libdl-2.11.so\r\nb7768000-b7769000 rwxp 00002000 08:03 262188 /lib/libdl-2.11.so\r\nb7769000-b776b000 r-xp 00000000 08:03 262274 /lib/libutil-2.11.so\r\nb776b000-b776c000 r-xp 00001000 08:03 262274 /lib/libutil-2.11.so\r\nb776c000-b776d000 rwxp 00002000 08:03 262274 /lib/libutil-2.11.so\r\nb776d000-b7774000 r-xp 00000000 08:03 262277 /lib/librt-2.11.so\r\nb7774000-b7775000 r-xp 00006000 08:03 262277 /lib/librt-2.11.so\r\nb7775000-b7776000 rwxp 00007000 08:03 262277 /lib/librt-2.11.so\r\nb778c000-b778e000 r-xp 00000000 08:03 184559 /usr/lib/gconv/UTF-32.so\r\nb778e000-b778f000 r-xp 00001000 08:03 184559 /usr/lib/gconv/UTF-32.so\r\nb778f000-b7790000 rwxp 00002000 08:03 184559 /usr/lib/gconv/UTF-32.so\r\nb7790000-b7791000 rwxp 00000000 00:00 0 \r\nb7791000-b7792000 r-xp 00000000 00:00 0 [vdso]\r\nb7792000-b77ae000 r-xp 00000000 08:03 262276 /lib/ld-2.11.so\r\nb77ae000-b77af000 r-xp 0001b000 08:03 262276 /lib/ld-2.11.so\r\nb77af000-b77b0000 rwxp 0001c000 08:03 262276 /lib/ld-2.11.so\r\nbffe2000-bfff7000 rwxp 00000000 00:00 0 [stack]\r\nAborted\r\n}}}\r\n\r\nBasically, a Setup script compiled with a different GHC than the one that Setup is using fails with a memory error.\r\n\r\nSee attached file for {{{/usr/bin/ghc-pkg dump}}} output.","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3669haddock: internal Haddock or GHC error: Win32-version:: openBinaryFile: inval...2019-07-07T19:02:51ZIan Lynagh <igloo@earth.li>haddock: internal Haddock or GHC error: Win32-version:: openBinaryFile: invalid argument (Invalid argument)This change to `gen_contents_index`:
```
VERSION=`grep -i '^version:' $LIBPATH/$NAME.cabal | sed 's/.*[ \t]//'`
```
looks like it has caused this problem for SPJ on MSYS:
```
cd libraries && sh gen_contents_index --inplace
haddock: in...This change to `gen_contents_index`:
```
VERSION=`grep -i '^version:' $LIBPATH/$NAME.cabal | sed 's/.*[ \t]//'`
```
looks like it has caused this problem for SPJ on MSYS:
```
cd libraries && sh gen_contents_index --inplace
haddock: internal Haddock or GHC error: Win32-version:: openBinaryFile: invalid argument (Invalid argument)
make[1]: *** [libraries/index.html] Error 1
make: *** [all] Error 2
sh-3.1$
```
Presumably the problem is that the sed didn't remove what it was meant to, presumably because the '\\t' didn't end up matching the tab character in the file.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.10.4 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"haddock: internal Haddock or GHC error: Win32-version:: openBinaryFile: invalid argument (Invalid argument)","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"6.12.1","resolution":"Unresolved","owner":{"tag":"OwnedBy","contents":"igloo"},"version":"6.10.4","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"This change to `gen_contents_index`:\r\n{{{\r\nVERSION=`grep -i '^version:' $LIBPATH/$NAME.cabal | sed 's/.*[ \\t]//'`\r\n}}}\r\nlooks like it has caused this problem for SPJ on MSYS:\r\n{{{\r\ncd libraries && sh gen_contents_index --inplace\r\nhaddock: internal Haddock or GHC error: Win32-version:: openBinaryFile: invalid argument (Invalid argument)\r\nmake[1]: *** [libraries/index.html] Error 1\r\nmake: *** [all] Error 2\r\nsh-3.1$\r\n}}}\r\nPresumably the problem is that the sed didn't remove what it was meant to, presumably because the '\\t' didn't end up matching the tab character in the file.\r\n","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3657ffi-1.0 causes panic in 6.12.200910102019-07-07T19:02:56Ztobsanffi-1.0 causes panic in 6.12.20091010After upgrading GHC to 6.12, any Haskell file I try to compile yields this result:\[\[BR\]\]
```
tobsan@magrathea ~/programming/HQmpd/src $ ghci Test.hs
GHCi, version 6.12.0.20091010: http://www.haskell.org/ghc/ :? for help
Loading pac...After upgrading GHC to 6.12, any Haskell file I try to compile yields this result:\[\[BR\]\]
```
tobsan@magrathea ~/programming/HQmpd/src $ ghci Test.hs
GHCi, version 6.12.0.20091010: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
ghc-stage2: This ELF file contains no symtab
Loading package ffi-1.0 ... ghc-stage2: panic! (the 'impossible' happened)
(GHC version 6.12.0.20091010 for x86_64-unknown-linux):
loadObj: failed
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
```
```
tobsan@magrathea ~/programming/HQmpd/src $ cat Test.hs
module Test where
hej = print "Hej"
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.12.1 RC1 |
| 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":"fff-1.0 causes panic in 6.12.20091010","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.12.1 RC1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"After upgrading GHC to 6.12, any Haskell file I try to compile yields this result:[[BR]]\r\n\r\n{{{\r\ntobsan@magrathea ~/programming/HQmpd/src $ ghci Test.hs\r\nGHCi, version 6.12.0.20091010: http://www.haskell.org/ghc/ :? for help\r\nLoading package ghc-prim ... linking ... done.\r\nLoading package integer-gmp ... linking ... done.\r\nLoading package base ... linking ... done.\r\nghc-stage2: This ELF file contains no symtab\r\nLoading package ffi-1.0 ... ghc-stage2: panic! (the 'impossible' happened)\r\n (GHC version 6.12.0.20091010 for x86_64-unknown-linux):\r\n\tloadObj: failed\r\n\r\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n}}}\r\n{{{\r\ntobsan@magrathea ~/programming/HQmpd/src $ cat Test.hs \r\nmodule Test where\r\n\r\nhej = print \"Hej\"\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1https://gitlab.haskell.org/ghc/ghc/-/issues/3653"Missing header file: HsDirectory.h" with old kernel/glibc2019-07-07T19:02:57Zroland"Missing header file: HsDirectory.h" with old kernel/glibcConfiguring ghc-6.12.1rc1 on a machine with linux kernel 2.6.9 and glibc 2.3.4 gives:
```
$ ./configure
[...]
Configuring directory-1.0.1.0...
[...]
configure: creating ./config.status
config.status: creating include/HsDirectoryConfig.h...Configuring ghc-6.12.1rc1 on a machine with linux kernel 2.6.9 and glibc 2.3.4 gives:
```
$ ./configure
[...]
Configuring directory-1.0.1.0...
[...]
configure: creating ./config.status
config.status: creating include/HsDirectoryConfig.h
ghc-cabal: Missing dependency on a foreign library:
* Missing header file: HsDirectory.h
[...]
```
The file `HsDirectory.h` is actually there, but it fails to compile.
```
$ cd libraries/directory
$ runhaskell Setup configure -v3
[...]
include/HsDirectory.h:58: error: syntax error before "__hscore_S_IRUSR"
include/HsDirectory.h:59: error: syntax error before "__hscore_S_IWUSR"
include/HsDirectory.h:60: error: syntax error before "__hscore_S_IXUSR"
include/HsDirectory.h:61: error: syntax error before "__hscore_S_IFDIR"
[...]
```
The problem can be fixed by adding `#include <sys/types.h>` at the beginning of `HsDirectory.h`.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------------- |
| Version | 6.12.1 RC1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/directory |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"\"Missing header file: HsDirectory.h\" with old kernel/glibc","status":"New","operating_system":"","component":"libraries/directory","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.12.1 RC1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Configuring ghc-6.12.1rc1 on a machine with linux kernel 2.6.9 and glibc 2.3.4 gives:\r\n{{{\r\n$ ./configure\r\n[...]\r\nConfiguring directory-1.0.1.0...\r\n[...]\r\nconfigure: creating ./config.status\r\nconfig.status: creating include/HsDirectoryConfig.h\r\nghc-cabal: Missing dependency on a foreign library:\r\n* Missing header file: HsDirectory.h\r\n[...]\r\n}}}\r\nThe file {{{HsDirectory.h}}} is actually there, but it fails to compile.\r\n{{{\r\n$ cd libraries/directory\r\n$ runhaskell Setup configure -v3\r\n[...]\r\ninclude/HsDirectory.h:58: error: syntax error before \"__hscore_S_IRUSR\"\r\ninclude/HsDirectory.h:59: error: syntax error before \"__hscore_S_IWUSR\"\r\ninclude/HsDirectory.h:60: error: syntax error before \"__hscore_S_IXUSR\"\r\ninclude/HsDirectory.h:61: error: syntax error before \"__hscore_S_IFDIR\"\r\n[...]\r\n}}}\r\nThe problem can be fixed by adding {{{#include <sys/types.h>}}} at the beginning of {{{HsDirectory.h}}}.\r\n","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1https://gitlab.haskell.org/ghc/ghc/-/issues/3648Release a new containers version2019-07-07T19:02:58ZIan Lynagh <igloo@earth.li>Release a new containers versionTo include:
```
Wed Oct 28 03:55:32 PDT 2009 Ross Paterson <ross@soi.city.ac.uk>
* doc bugfix: correct description of index argument
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| --------...To include:
```
Wed Oct 28 03:55:32 PDT 2009 Ross Paterson <ross@soi.city.ac.uk>
* doc bugfix: correct description of index argument
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.10.4 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Release a new containers version","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"6.12.1","resolution":"Unresolved","owner":{"tag":"OwnedBy","contents":"igloo"},"version":"6.10.4","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Task","description":"To include:\r\n{{{\r\nWed Oct 28 03:55:32 PDT 2009 Ross Paterson <ross@soi.city.ac.uk>\r\n * doc bugfix: correct description of index argument\r\n}}}\r\n","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3644./configure fails while gcc version checking2019-07-07T19:02:59Ztolysz./configure fails while gcc version checking1. /configure exits with an error 1
but commenting out lines 4115 - 4138 solves this problem i.e.
```
>gcc --version
gcc (Debian 4.3.4-6) 4.3.4
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for...1. /configure exits with an error 1
but commenting out lines 4115 - 4138 solves this problem i.e.
```
>gcc --version
gcc (Debian 4.3.4-6) 4.3.4
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```
```
>gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.4-6' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.4 (Debian 4.3.4-6)
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.13 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Build System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"./configure fails while gcc version checking","status":"New","operating_system":"","component":"Build System","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.13","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"./configure exits with an error 1\r\nbut commenting out lines 4115 - 4138 solves this problem i.e. \r\n\r\n{{{\r\n>gcc --version\r\ngcc (Debian 4.3.4-6) 4.3.4\r\nCopyright (C) 2008 Free Software Foundation, Inc.\r\nThis is free software; see the source for copying conditions. There is NO\r\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n}}}\r\n\r\n{{{\r\n>gcc -v\r\nUsing built-in specs.\r\nTarget: x86_64-linux-gnu\r\nConfigured with: ../src/configure -v --with-pkgversion='Debian 4.3.4-6' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu\r\nThread model: posix\r\ngcc version 4.3.4 (Debian 4.3.4-6) \r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1https://gitlab.haskell.org/ghc/ghc/-/issues/3635base-3-compat with 6.12 won't load in GHCi, Template Haskell on Windows2019-07-07T19:03:02Zguestbase-3-compat with 6.12 won't load in GHCi, Template Haskell on Windowsbase3-compat/GHC/Handle.hs needs:
```
#ifndef mingw32_HOST_OS
..
#endif
```
Wrapped around its export for and definition of unlockFile. This is because unlockFile is a RTS symbol that is only compiled on non-Windows OSes. This \#ifdef ...base3-compat/GHC/Handle.hs needs:
```
#ifndef mingw32_HOST_OS
..
#endif
```
Wrapped around its export for and definition of unlockFile. This is because unlockFile is a RTS symbol that is only compiled on non-Windows OSes. This \#ifdef exists in base4, it looks like it was just omitted from base3.
The result of this bug is that any package using base 3 doesn’t work with template-haskell or GHCi:
```
$ ghci -package base-3.0.3.2
WARNING: GHCi invoked via 'ghci.exe' in *nix-like shells (cygwin-bash, in particular)
doesn't handle Ctrl-C well; use the 'ghcii.sh' shell wrapper instead
GHCi, version 6.12.0.20091010: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package syb-0.1.0.2 ... linking ... done.
Loading package base-3.0.3.2 ... linking ... : unable to load package `base-3.0.3.2'
: C:\ghc\GHC-61~2.200\lib\base-3.0.3.2\HSbase-3.0.3.2.o: unknown symbol `_unlockFile'
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------------------------------------------ |
| Version | 6.12.1 RC1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/base |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | batterseapower@hotmail.com, ndmitchell@gmail.com |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"base-3-compat with 6.12 won't load in GHCi, Template Haskell on Windows","status":"New","operating_system":"","component":"libraries/base","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.12.1 RC1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["batterseapower@hotmail.com","ndmitchell@gmail.com"],"type":"Bug","description":"base3-compat/GHC/Handle.hs needs:\r\n\r\n{{{\r\n#ifndef mingw32_HOST_OS\r\n..\r\n#endif\r\n}}}\r\n\r\nWrapped around its export for and definition of unlockFile. This is because unlockFile is a RTS symbol that is only compiled on non-Windows OSes. This #ifdef exists in base4, it looks like it was just omitted from base3.\r\n\r\nThe result of this bug is that any package using base 3 doesn’t work with template-haskell or GHCi:\r\n\r\n{{{\r\n$ ghci -package base-3.0.3.2\r\nWARNING: GHCi invoked via 'ghci.exe' in *nix-like shells (cygwin-bash, in particular)\r\n doesn't handle Ctrl-C well; use the 'ghcii.sh' shell wrapper instead\r\nGHCi, version 6.12.0.20091010: http://www.haskell.org/ghc/ :? for help\r\nLoading package ghc-prim ... linking ... done.\r\nLoading package integer-gmp ... linking ... done.\r\nLoading package base ... linking ... done.\r\nLoading package syb-0.1.0.2 ... linking ... done.\r\nLoading package base-3.0.3.2 ... linking ... : unable to load package `base-3.0.3.2'\r\n: C:\\ghc\\GHC-61~2.200\\lib\\base-3.0.3.2\\HSbase-3.0.3.2.o: unknown symbol `_unlockFile'\r\n}}}\r\n","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1https://gitlab.haskell.org/ghc/ghc/-/issues/3624Parse fails when foreign import declarations contain path information (like t...2019-07-07T19:03:05ZtwadleighParse fails when foreign import declarations contain path information (like those generated by c2hs).An import declaration like:
```
foreign import ccall safe "path/to/test.h test" test :: IO ()
```
fails with:
```
test.hs:7:26: Malformed entity string
```
I've marked this as a major issue because it ought to affect, for instance, a...An import declaration like:
```
foreign import ccall safe "path/to/test.h test" test :: IO ()
```
fails with:
```
test.hs:7:26: Malformed entity string
```
I've marked this as a major issue because it ought to affect, for instance, any library that depends on c2hs (which generates bindings of this kind).
I'm not sure if this is a GHC regression or actually an improvement in fidelity to the FFI spec (although I didn't see anything in the spec that would preclude qualifying the header name with path info).
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------- |
| Version | 6.12.1 RC1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Parser) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Parse fails when foreign import declarations contain path information (like those generated by c2hs).","status":"New","operating_system":"","component":"Compiler (Parser)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.12.1 RC1","keywords":["FFI,","c2hs"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"An import declaration like:\r\n\r\n{{{\r\nforeign import ccall safe \"path/to/test.h test\" test :: IO ()\r\n}}}\r\n\r\nfails with:\r\n\r\n{{{\r\ntest.hs:7:26: Malformed entity string\r\n}}}\r\n\r\nI've marked this as a major issue because it ought to affect, for instance, any library that depends on c2hs (which generates bindings of this kind).\r\n\r\nI'm not sure if this is a GHC regression or actually an improvement in fidelity to the FFI spec (although I didn't see anything in the spec that would preclude qualifying the header name with path info).","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Simon MarlowSimon Marlowhttps://gitlab.haskell.org/ghc/ghc/-/issues/3617There is no -debug runtime in 6.12 RC12019-07-07T19:03:07ZguestThere is no -debug runtime in 6.12 RC1```
$ cat Hello.hs
module Main where
main = print "Hello world"
```
```
$ ghc -debug --make Hello.hs
[1 of 1] Compiling Main ( Hello.hs, Hello.o )
Linking Hello ...
/usr/bin/ld: cannot find -lHSrts_debug
collect2: ld return...```
$ cat Hello.hs
module Main where
main = print "Hello world"
```
```
$ ghc -debug --make Hello.hs
[1 of 1] Compiling Main ( Hello.hs, Hello.o )
Linking Hello ...
/usr/bin/ld: cannot find -lHSrts_debug
collect2: ld returned 1 exit status
```
Interestingly there is a debug runtime .so, but no .a. This seems like an oversight.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------------------------------------------ |
| Version | 6.12.1 RC1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | batterseapower@hotmail.com, ndmitchell@gmail.com |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"There is no -debug runtime in 6.12 RC1","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.12.1 RC1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["batterseapower@hotmail.com","ndmitchell@gmail.com"],"type":"Bug","description":"{{{\r\n$ cat Hello.hs\r\nmodule Main where\r\n\r\nmain = print \"Hello world\"\r\n}}}\r\n\r\n{{{\r\n$ ghc -debug --make Hello.hs\r\n[1 of 1] Compiling Main ( Hello.hs, Hello.o )\r\nLinking Hello ...\r\n/usr/bin/ld: cannot find -lHSrts_debug\r\ncollect2: ld returned 1 exit status\r\n}}}\r\n\r\nInterestingly there is a debug runtime .so, but no .a. This seems like an oversight.","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3614Cabal file parser can't handle colon in description2019-07-07T19:03:07ZdsfCabal file parser can't handle colon in descriptionThe description field of the cabal file in the haskell-mtl package currently in debian sid contains an url with a colon, which leads to this error:
```
ghc-pkg: 13: unrecognised field or section: "(<http://web.cecs.pdx.edu/~mpj/pubs/s...The description field of the cabal file in the haskell-mtl package currently in debian sid contains an url with a colon, which leads to this error:
```
ghc-pkg: 13: unrecognised field or section: "(<http://web.cecs.pdx.edu/~mpj/pubs/springschool.html>),"
```
This comes from `Cabal.Distribution.ParseUtils`.6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3610Installer has hard-coded path /usr/bin/strip2019-07-07T19:03:08ZYitzGaleInstaller has hard-coded path /usr/bin/stripOn some systems, strip may not be located in /usr/bin.
And even if it is, that might not be the version of strip
we need to use, e.g., in a virtual hosting environment.
See, for example,
[this blog post](http://substack.net/posts/ea85c2...On some systems, strip may not be located in /usr/bin.
And even if it is, that might not be the version of strip
we need to use, e.g., in a virtual hosting environment.
See, for example,
[this blog post](http://substack.net/posts/ea85c2/Happstack-on-Dreamhost-Notes)
about installing GHC on Dreamhost.
It seems that GHC ought to locate strip using $PATH,
or some other mechanism that can be configured.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.10.4 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Build System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Installer has hard-coded path /usr/bin/strip","status":"New","operating_system":"","component":"Build System","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.4","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"On some systems, strip may not be located in /usr/bin.\r\nAnd even if it is, that might not be the version of strip\r\nwe need to use, e.g., in a virtual hosting environment.\r\n\r\nSee, for example,\r\n[http://substack.net/posts/ea85c2/Happstack-on-Dreamhost-Notes this blog post]\r\nabout installing GHC on Dreamhost.\r\n\r\nIt seems that GHC ought to locate strip using $PATH,\r\nor some other mechanism that can be configured.","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1https://gitlab.haskell.org/ghc/ghc/-/issues/3604Use of template-haskell is broken with shared libraries2019-07-07T19:03:09ZguestUse of template-haskell is broken with shared librariesConsider the following program:
TH.hs:
```
{-# LANGUAGE TemplateHaskell #-}
module TH where
import Language.Haskell.TH
spliceMe = [| (\xs -> tail xs ++ init xs) |]
```
Library.hs
```
{-# LANGUAGE TemplateHaskell #-}
module Library ...Consider the following program:
TH.hs:
```
{-# LANGUAGE TemplateHaskell #-}
module TH where
import Language.Haskell.TH
spliceMe = [| (\xs -> tail xs ++ init xs) |]
```
Library.hs
```
{-# LANGUAGE TemplateHaskell #-}
module Library where
import TH
main = print ($(spliceMe) [1, 2])
```
Build it like so:
```
ghc --make -package-name foo-0.2.3 -hide-all-packages -fbuilding-cabal-package -no-user-package-conf -i -idist/build -i. -idist/build/autogen -Idist/build/a
utogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build -hidir dist/build -stubdir dist/build -package-id base-4.2.0.0-e0460a0a4effe0aca049da0e
12eab4d3 -package-id template-haskell-2.4.0.0-fa9ea4aecb54a2910620fe9afd9f40f1 -O Library -dynamic -hisuf dyn_hi -osuf dyn_o -fPIC
```
And observe the wonderful error:
```
Creating dist/build (and its parents)
Creating dist/build/autogen (and its parents)
Preprocessing library foo-0.2.3...
Building foo-0.2.3...
Building library...
Creating dist/build (and its parents)
/home/a1333478/bin/ghc --make -package-name foo-0.2.3 -hide-all-packages -fbuilding-cabal-package -no-user-package-conf -i -idist/build -i. -idist/build/autogen -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build -hidir dist/build -stubdir dist/build -package-id base-4.2.0.0-e0460a0a4effe0aca049da0e12eab4d3 -package-id template-haskell-2.4.0.0-fa9ea4aecb54a2910620fe9afd9f40f1 -O Library
/home/a1333478/bin/ghc --make -package-name foo-0.2.3 -hide-all-packages -fbuilding-cabal-package -no-user-package-conf -i -idist/build -i. -idist/build/autogen -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build -hidir dist/build -stubdir dist/build -package-id base-4.2.0.0-e0460a0a4effe0aca049da0e12eab4d3 -package-id template-haskell-2.4.0.0-fa9ea4aecb54a2910620fe9afd9f40f1 -O Library -dynamic -hisuf dyn_hi -osuf dyn_o -fPIC
[2 of 2] Compiling Library ( Library.hs, dist/build/Library.dyn_o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package array-0.3.0.0 ... linking ... done.
Loading package containers-0.3.0.0 ... linking ... done.
Loading package pretty-1.0.1.1 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
ghc-stage2: dist/build/TH.dyn_o: unknown symbol `__stginit_base_Prelude_dyn'
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------------------------------------------ |
| Version | 6.12.1 RC1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | batterseapower@hotmail.com, ndmitchell@gmail.com |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Use of template-haskell is broken with shared libraries","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.12.1 RC1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["batterseapower@hotmail.com","ndmitchell@gmail.com"],"type":"Bug","description":"Consider the following program:\r\n\r\nTH.hs:\r\n{{{\r\n{-# LANGUAGE TemplateHaskell #-}\r\nmodule TH where\r\n\r\nimport Language.Haskell.TH\r\n\r\nspliceMe = [| (\\xs -> tail xs ++ init xs) |]\r\n}}}\r\n\r\nLibrary.hs\r\n{{{\r\n{-# LANGUAGE TemplateHaskell #-}\r\nmodule Library where\r\n\r\nimport TH\r\n\r\nmain = print ($(spliceMe) [1, 2])\r\n}}}\r\n\r\nBuild it like so:\r\n\r\n{{{\r\nghc --make -package-name foo-0.2.3 -hide-all-packages -fbuilding-cabal-package -no-user-package-conf -i -idist/build -i. -idist/build/autogen -Idist/build/a\r\nutogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build -hidir dist/build -stubdir dist/build -package-id base-4.2.0.0-e0460a0a4effe0aca049da0e\r\n12eab4d3 -package-id template-haskell-2.4.0.0-fa9ea4aecb54a2910620fe9afd9f40f1 -O Library -dynamic -hisuf dyn_hi -osuf dyn_o -fPIC\r\n}}}\r\n\r\nAnd observe the wonderful error:\r\n\r\n{{{\r\nCreating dist/build (and its parents)\r\nCreating dist/build/autogen (and its parents)\r\nPreprocessing library foo-0.2.3...\r\nBuilding foo-0.2.3...\r\nBuilding library...\r\nCreating dist/build (and its parents)\r\n/home/a1333478/bin/ghc --make -package-name foo-0.2.3 -hide-all-packages -fbuilding-cabal-package -no-user-package-conf -i -idist/build -i. -idist/build/autogen -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build -hidir dist/build -stubdir dist/build -package-id base-4.2.0.0-e0460a0a4effe0aca049da0e12eab4d3 -package-id template-haskell-2.4.0.0-fa9ea4aecb54a2910620fe9afd9f40f1 -O Library\r\n/home/a1333478/bin/ghc --make -package-name foo-0.2.3 -hide-all-packages -fbuilding-cabal-package -no-user-package-conf -i -idist/build -i. -idist/build/autogen -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build -hidir dist/build -stubdir dist/build -package-id base-4.2.0.0-e0460a0a4effe0aca049da0e12eab4d3 -package-id template-haskell-2.4.0.0-fa9ea4aecb54a2910620fe9afd9f40f1 -O Library -dynamic -hisuf dyn_hi -osuf dyn_o -fPIC\r\n[2 of 2] Compiling Library ( Library.hs, dist/build/Library.dyn_o )\r\nLoading package ghc-prim ... linking ... done.\r\nLoading package integer-gmp ... linking ... done.\r\nLoading package base ... linking ... done.\r\nLoading package array-0.3.0.0 ... linking ... done.\r\nLoading package containers-0.3.0.0 ... linking ... done.\r\nLoading package pretty-1.0.1.1 ... linking ... done.\r\nLoading package template-haskell ... linking ... done.\r\nLoading package ffi-1.0 ... linking ... done.\r\nghc-stage2: dist/build/TH.dyn_o: unknown symbol `__stginit_base_Prelude_dyn'\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3599haddock assumes $libdir/ghc-6.12.0.20091010/html/haddock.css2019-07-07T19:03:10ZJens Petersenhaddock assumes $libdir/ghc-6.12.0.20091010/html/haddock.cssI build rc1 with docs living in /usr/share/doc/ghc/html
but haddock seems to assume $libdir/ghc-$version/html:
```
$ runghc Setup haddock
Running Haddock for zlib-0.5.0.0...
Preprocessing library zlib-0.5.0.0...
Warning: The documentati...I build rc1 with docs living in /usr/share/doc/ghc/html
but haddock seems to assume $libdir/ghc-$version/html:
```
$ runghc Setup haddock
Running Haddock for zlib-0.5.0.0...
Preprocessing library zlib-0.5.0.0...
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: ffi-1.0, rts-1.0
haddock: internal Haddock or GHC error: /usr/lib64/ghc-6.12.0.20091010/html/haddock.css: openFile: does not exist (No such file or directory)
$ rpm -ql ghc-doc | grep html/haddock.css
/usr/share/doc/ghc/html/html/haddock.css
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.12.1 RC1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Build System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"haddock assumes $libdir/ghc-6.12.0.20091010/html/haddock.css","status":"New","operating_system":"","component":"Build System","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.12.1 RC1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"I build rc1 with docs living in /usr/share/doc/ghc/html\r\nbut haddock seems to assume $libdir/ghc-$version/html:\r\n\r\n{{{\r\n$ runghc Setup haddock\r\nRunning Haddock for zlib-0.5.0.0...\r\nPreprocessing library zlib-0.5.0.0...\r\nWarning: The documentation for the following packages are not installed. No\r\nlinks will be generated to these packages: ffi-1.0, rts-1.0\r\nhaddock: internal Haddock or GHC error: /usr/lib64/ghc-6.12.0.20091010/html/haddock.css: openFile: does not exist (No such file or directory)\r\n$ rpm -ql ghc-doc | grep html/haddock.css\r\n/usr/share/doc/ghc/html/html/haddock.css\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1https://gitlab.haskell.org/ghc/ghc/-/issues/3598ghc-stage2 binary name confusing for users2019-07-07T19:03:11ZJens Petersenghc-stage2 binary name confusing for usersghc-6.12.0.20091010 create a binary called
$libdir/ghc-6.12.0.20091010/ghc-stage2 and then causing
the program name ghc-stage2 to appear in compiler output
and help etc which is confusing for users and a regression
compared to 6.10.x IMH...ghc-6.12.0.20091010 create a binary called
$libdir/ghc-6.12.0.20091010/ghc-stage2 and then causing
the program name ghc-stage2 to appear in compiler output
and help etc which is confusing for users and a regression
compared to 6.10.x IMHO.
eg
```
$ ghc
ghc-stage2: no input files
Usage: For basic information, try the `--help' option.
```
```
$ ghc --help
Usage:
ghc-stage2 [command-line-options-and-input-files]
To compile and link a complete Haskell program, run the compiler like
so:
ghc-stage2 --make Main
:
Alternatively, ghc-stage2 can be used to compile files individually. Each
input file is guided through (some of the) possible phases of a
compilation:
:
Given the above, here are some TYPICAL invocations of ghc-stage2:
# compile a Haskell module to a .o file, optimising:
% ghc-stage2 -c -O Foo.hs
# link three .o files into an executable called "test":
% ghc-stage2 -o test Foo.o Bar.o Baz.o
# compile a Haskell module to C (a .hc file), using a bigger heap:
% ghc-stage2 -C -H16m Foo.hs
# compile Haskell-produced C (.hc) to assembly language:
% ghc-stage2 -S Foo.hc
```
etc
I think either the output text should be changed
or ghc-stage2 renamed to ghc.6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3579Error: symbol `Bug_compose1_closure' is already defined2019-07-07T19:03:16ZIan Lynagh <igloo@earth.li>Error: symbol `Bug_compose1_closure' is already definedIn http://www.haskell.org/pipermail/glasgow-haskell-bugs/2009-October/020608.html Serge reports:
```
module Bug where
compose :: [a -> a] -> a -> a
compose = foldr (.) id
class Compose a where
compose1 :: a -> a -> a
```
```
$ g...In http://www.haskell.org/pipermail/glasgow-haskell-bugs/2009-October/020608.html Serge reports:
```
module Bug where
compose :: [a -> a] -> a -> a
compose = foldr (.) id
class Compose a where
compose1 :: a -> a -> a
```
```
$ ghc -c -O p.hs
/tmp/ghc12944_0/ghc12944_0.s: Assembler messages:
/tmp/ghc12944_0/ghc12944_0.s:22:0:
Error: symbol `Bug_compose1_closure' is already defined
/tmp/ghc12944_0/ghc12944_0.s:98:0:
Error: symbol `Bug_compose1_info' is already defined
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.13 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Error: symbol `Bug_compose1_closure' is already defined","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"6.12.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.13","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"In http://www.haskell.org/pipermail/glasgow-haskell-bugs/2009-October/020608.html Serge reports:\r\n\r\n{{{\r\nmodule Bug where\r\n\r\ncompose :: [a -> a] -> a -> a\r\ncompose = foldr (.) id\r\n\r\nclass Compose a where\r\n compose1 :: a -> a -> a\r\n}}}\r\n\r\n{{{\r\n$ ghc -c -O p.hs\r\n/tmp/ghc12944_0/ghc12944_0.s: Assembler messages:\r\n\r\n/tmp/ghc12944_0/ghc12944_0.s:22:0:\r\n Error: symbol `Bug_compose1_closure' is already defined\r\n\r\n/tmp/ghc12944_0/ghc12944_0.s:98:0:\r\n Error: symbol `Bug_compose1_info' is already defined\r\n}}}\r\n","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3578internal error: evacuate(static): strange closure type 422019-07-07T19:03:17Znccbinternal error: evacuate(static): strange closure type 42I have a concurrent program (using CHP, which sits on top of STM+forkIO), that is able to produce this error on GHC 6.12.1-rc1 (which doesn't appear on your version drop-down):
chp-boids: internal error: evacuate(static): strange closur...I have a concurrent program (using CHP, which sits on top of STM+forkIO), that is able to produce this error on GHC 6.12.1-rc1 (which doesn't appear on your version drop-down):
chp-boids: internal error: evacuate(static): strange closure type 42
(GHC version 6.12.0.20091010 for i386_unknown_linux)
> Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Aborted
It produces it much sooner with +RTS -N2 than +RTS -N1, but both settings can produce the error. The output doesn't look like it will be very useful to you -- what can I run to give a better output?
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 6.13 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"internal error: evacuate(static): strange closure type 42","status":"New","operating_system":"","component":"Runtime System","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.13","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"I have a concurrent program (using CHP, which sits on top of STM+forkIO), that is able to produce this error on GHC 6.12.1-rc1 (which doesn't appear on your version drop-down):\r\n\r\nchp-boids: internal error: evacuate(static): strange closure type 42\r\n (GHC version 6.12.0.20091010 for i386_unknown_linux)\r\n Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\nAborted\r\n\r\nIt produces it much sooner with +RTS -N2 than +RTS -N1, but both settings can produce the error. The output doesn't look like it will be very useful to you -- what can I run to give a better output?\r\n","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3576minor errors in docs/users_guide/6.12.1-notes.xml2019-07-07T19:03:17Zrwbartonminor errors in docs/users_guide/6.12.1-notes.xml- `listitem` is misspelled a total of 4 times as `listierm` (two open tags, two close tags).
- The `-fwarn-unused-do-bind` flag is documented in two items. Probably the second item should be removed. It would be nice to include a link to...- `listitem` is misspelled a total of 4 times as `listierm` (two open tags, two close tags).
- The `-fwarn-unused-do-bind` flag is documented in two items. Probably the second item should be removed. It would be nice to include a link to the relevant part of Section 4.7 in the first item.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------- |
| Version | 6.11 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Documentation |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"minor errors in docs/users_guide/6.12.1-notes.xml","status":"New","operating_system":"","component":"Documentation","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.11","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":" * `listitem` is misspelled a total of 4 times as `listierm` (two open tags, two close tags).\r\n\r\n * The `-fwarn-unused-do-bind` flag is documented in two items. Probably the second item should be removed. It would be nice to include a link to the relevant part of Section 4.7 in the first item.","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Simon MarlowSimon Marlowhttps://gitlab.haskell.org/ghc/ghc/-/issues/3565Wrong gcc being used2019-07-07T19:03:20ZSimon Peyton JonesWrong gcc being usedSimonM and I have just spent two hours tracking down a horrible gcc-related problem.
The current story is that we ship GHC complete with a Mingw `gcc`. Nowadays we go further, and put a Mingw installation into the GHC repo, so that some...SimonM and I have just spent two hours tracking down a horrible gcc-related problem.
The current story is that we ship GHC complete with a Mingw `gcc`. Nowadays we go further, and put a Mingw installation into the GHC repo, so that someone building GHC doesn't need to download Mingw. This is good.
The problem is this. The configure script includes
```
AC_CHECK_FUNCS(__mingw_vfprintf)
```
It turns out that this check
- Should say "no" with the Mingw stuff in the current GHC repo
- But actually says "yes"
Because of the wrong answer, compilation of `Linker.c` in the RTS fails with
```
rts\Linker.c:904:0:
error: `__mingw_vfprintf' undeclared here (not in a function)
```
Why is the answer wrong? Because:
- The test correctly invokes `c:/code/HEAD/inplace/mingw/bin/gcc.exe`; ie the one in the tree
- But, when linking, that `gcc` looks in `/mingw/lib`, where I just happen to have a (different) Mingw blob of files. That makes the link succeed when it should fail.
Here's an example. Here is `foo.c`:
```
char __mingw_vfprintf ();
char (*f) () = __mingw_vfprintf;
int main () { return 0; }
```
Now watch:
```
bash-3.1$ c:/code/HEAD/inplace/mingw/bin/gcc.exe foo.c
bash-3.1$ mv c:/mingw c:/mingw-save
bash-3.1$ c:/code/HEAD/inplace/mingw/bin/gcc.exe foo.c
C:/DOCUME~1/simonpj/LOCALS~1/Temp/ccuJ4q8y.o:foo.c:(.data+0x0): undefined reference to `__mingw_vfprintf'
collect2: ld returned 1 exit status
```
Moving `c:/mingw` out of the way changes the behaviour!!!
If you give a -B flag you can make it behave more predictably:
```
bash-3.1$ mv c:/mingw-save c:/mingw
bash-3.1$ c:/code/HEAD/inplace/mingw/bin/gcc.exe foo.c -Bc:/code/HEAD/inplace/mingw/lib
C:/DOCUME~1/simonpj/LOCALS~1/Temp/ccuJ4q8y.o:foo.c:(.data+0x0): undefined reference to `__mingw_vfprintf'
collect2: ld returned 1 exit status
```
That is, even with `c:/mingw` existing, the `-B` flag makes it do the right thing.
Mind you, if you add `-v` you'll see that there are *still* references to `/mingw`, so it's still not really right.
So far as we can see, the path "`/mingw`" is hard-wired into `gcc.exe`.
It's not clear how to fix this. Probably the easiest path is to build a shim for `gcc.exe`, which lives in the same directory as `ghc.exe`, and which simply invokes the real `gcc` adding the `-B` flag.
Fixing it is urgent for 6.12. If GHC 6.12 invokes `gcc` without passing a `-B` flag (and without a shim) we may link against libraries that happen randomly to be on the user's machine, rather than against the libraries that come with GHC.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.10.4 |
| 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":"Wrong gcc being used","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"6.12.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.4","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"SimonM and I have just spent two hours tracking down a horrible gcc-related problem.\r\n\r\nThe current story is that we ship GHC complete with a Mingw `gcc`. Nowadays we go further, and put a Mingw installation into the GHC repo, so that someone building GHC doesn't need to download Mingw. This is good. \r\n\r\nThe problem is this. The configure script includes\r\n{{{\r\nAC_CHECK_FUNCS(__mingw_vfprintf)\r\n}}}\r\nIt turns out that this check \r\n * Should say \"no\" with the Mingw stuff in the current GHC repo\r\n * But actually says \"yes\"\r\nBecause of the wrong answer, compilation of `Linker.c` in the RTS fails with\r\n{{{\r\nrts\\Linker.c:904:0:\r\n error: `__mingw_vfprintf' undeclared here (not in a function)\r\n}}}\r\nWhy is the answer wrong? Because:\r\n * The test correctly invokes `c:/code/HEAD/inplace/mingw/bin/gcc.exe`; ie the one in the tree\r\n * But, when linking, that `gcc` looks in `/mingw/lib`, where I just happen to have a (different) Mingw blob of files. That makes the link succeed when it should fail.\r\n\r\nHere's an example. Here is `foo.c`:\r\n{{{\r\nchar __mingw_vfprintf ();\r\n\r\nchar (*f) () = __mingw_vfprintf;\r\n\r\nint main () { return 0; }\r\n}}}\r\nNow watch:\r\n{{{\r\nbash-3.1$ c:/code/HEAD/inplace/mingw/bin/gcc.exe foo.c \r\nbash-3.1$ mv c:/mingw c:/mingw-save\r\nbash-3.1$ c:/code/HEAD/inplace/mingw/bin/gcc.exe foo.c \r\nC:/DOCUME~1/simonpj/LOCALS~1/Temp/ccuJ4q8y.o:foo.c:(.data+0x0): undefined reference to `__mingw_vfprintf'\r\ncollect2: ld returned 1 exit status\r\n}}}\r\nMoving `c:/mingw` out of the way changes the behaviour!!!\r\n\r\nIf you give a -B flag you can make it behave more predictably:\r\n{{{\r\nbash-3.1$ mv c:/mingw-save c:/mingw\r\nbash-3.1$ c:/code/HEAD/inplace/mingw/bin/gcc.exe foo.c -Bc:/code/HEAD/inplace/mingw/lib\r\nC:/DOCUME~1/simonpj/LOCALS~1/Temp/ccuJ4q8y.o:foo.c:(.data+0x0): undefined reference to `__mingw_vfprintf'\r\ncollect2: ld returned 1 exit status\r\n}}}\r\nThat is, even with `c:/mingw` existing, the `-B` flag makes it do the right thing.\r\n\r\nMind you, if you add `-v` you'll see that there are ''still'' references to `/mingw`, so it's still not really right.\r\n\r\nSo far as we can see, the path \"`/mingw`\" is hard-wired into `gcc.exe`. \r\n\r\nIt's not clear how to fix this. Probably the easiest path is to build a shim for `gcc.exe`, which lives in the same directory as `ghc.exe`, and which simply invokes the real `gcc` adding the `-B` flag.\r\n \r\nFixing it is urgent for 6.12. If GHC 6.12 invokes `gcc` without passing a `-B` flag (and without a shim) we may link against libraries that happen randomly to be on the user's machine, rather than against the libraries that come with GHC.\r\n","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1https://gitlab.haskell.org/ghc/ghc/-/issues/3562syb package on Hackage does not work with 6.122019-07-07T19:03:20ZSimon Marlowsyb package on Hackage does not work with 6.12The syb package on Hackage (0.1.0.1) has `-package-name syb`, which was needed for 6.10 but breaks with 6.12. The version in darcs lacks the flag, which works for 6.12 but will break with 6.10. We need to upload a version of syb that wor...The syb package on Hackage (0.1.0.1) has `-package-name syb`, which was needed for 6.10 but breaks with 6.12. The version in darcs lacks the flag, which works for 6.12 but will break with 6.10. We need to upload a version of syb that works with both 6.10 and 6.12 to Hackage before the 6.12.1 release.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.10.4 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"syb package on Hackage does not work with 6.12","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"6.12.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.4","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"The syb package on Hackage (0.1.0.1) has `-package-name syb`, which was needed for 6.10 but breaks with 6.12. The version in darcs lacks the flag, which works for 6.12 but will break with 6.10. We need to upload a version of syb that works with both 6.10 and 6.12 to Hackage before the 6.12.1 release.","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1dreixeldreixelhttps://gitlab.haskell.org/ghc/ghc/-/issues/3561Incorrect code generation on x862019-07-07T19:03:21ZalekseyIncorrect code generation on x86This program prints "0" on x86 with ghc-6.10.4 and "-O" optimization at least under Linux and FreeBSD:
```
main = print $ pqr' 0 1
pqr' :: Int -> Int -> Integer
pqr' a b | a == b - 1 = rab
| otherwise = ram * rmb
where m =...This program prints "0" on x86 with ghc-6.10.4 and "-O" optimization at least under Linux and FreeBSD:
```
main = print $ pqr' 0 1
pqr' :: Int -> Int -> Integer
pqr' a b | a == b - 1 = rab
| otherwise = ram * rmb
where m = (a + b) `div` 2
ram = pqr' a m
rmb = pqr' m b
rab = toInteger (6 * b - 5) * toInteger (2 * b - 1) *
toInteger (6 * b - 1)
```
It prints the correct value "5" with either "-O0", or "-fvia-C", or on x86_64.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.10.4 |
| 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":"Incorrect code generation on x86","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.4","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"This program prints \"0\" on x86 with ghc-6.10.4 and \"-O\" optimization at least under Linux and FreeBSD:\r\n{{{\r\nmain = print $ pqr' 0 1\r\n\r\npqr' :: Int -> Int -> Integer\r\npqr' a b | a == b - 1 = rab\r\n | otherwise = ram * rmb\r\n where m = (a + b) `div` 2\r\n ram = pqr' a m\r\n rmb = pqr' m b\r\n rab = toInteger (6 * b - 5) * toInteger (2 * b - 1) *\r\n toInteger (6 * b - 1)\r\n}}}\r\nIt prints the correct value \"5\" with either \"-O0\", or \"-fvia-C\", or on x86_64.","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Simon MarlowSimon Marlow