GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T19:02:45Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/3694Image link in User's Guide is broken2019-07-07T19:02:45ZjliImage link in User's Guide is brokenIn section 5.1.1 "Inserting cost centres by hand" of the user's guide, there's an image of a heap profile, but the image doesn't exist.
section 5.1.1: http://www.haskell.org/ghc/docs/latest/html/users_guide/profiling.html\#id514538
imag...In section 5.1.1 "Inserting cost centres by hand" of the user's guide, there's an image of a heap profile, but the image doesn't exist.
section 5.1.1: http://www.haskell.org/ghc/docs/latest/html/users_guide/profiling.html\#id514538
image link: http://www.haskell.org/ghc/docs/latest/html/users_guide/prof_scc
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------- |
| Version | 6.10.4 |
| 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":"Image link in User's Guide is broken","status":"New","operating_system":"","component":"Documentation","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.4","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"In section 5.1.1 \"Inserting cost centres by hand\" of the user's guide, there's an image of a heap profile, but the image doesn't exist.\r\n\r\nsection 5.1.1: http://www.haskell.org/ghc/docs/latest/html/users_guide/profiling.html#id514538\r\nimage link: http://www.haskell.org/ghc/docs/latest/html/users_guide/prof_scc","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://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/3662Don't know how to install documentation2019-07-07T19:02:54ZbosDon't know how to install documentationFollowing the changes to the build system that got merged in earlier this year, it's no longer obvious (or documented, as far as I can tell) how to either build or install documentation.
The procedure that used to work for 6.10 was `mak...Following the changes to the build system that got merged in earlier this year, it's no longer obvious (or documented, as far as I can tell) how to either build or install documentation.
The procedure that used to work for 6.10 was `make install-docs`, but the `Makefile`s in the `docs` and `docs/man` directories have bit-rotted, and the `install-docs` target has vanished from the top-level `Makefile` too.
If I knew how to build the documentation, I'd send in a patch, as I think it's important that this be fixed before 6.12.1 goes final, so that platform packagers like myself can figure out how to easily build and install the documentation. Unfortunately, I'm not even sure what needs fixing in the new build world.
<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":"Don't know how to install documentation","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":"Following the changes to the build system that got merged in earlier this year, it's no longer obvious (or documented, as far as I can tell) how to either build or install documentation.\r\n\r\nThe procedure that used to work for 6.10 was {{{make install-docs}}}, but the {{{Makefile}}}s in the {{{docs}}} and {{{docs/man}}} directories have bit-rotted, and the {{{install-docs}}} target has vanished from the top-level {{{Makefile}}} too.\r\n\r\nIf I knew how to build the documentation, I'd send in a patch, as I think it's important that this be fixed before 6.12.1 goes final, so that platform packagers like myself can figure out how to easily build and install the documentation. Unfortunately, I'm not even sure what needs fixing in the new build world.","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Simon MarlowSimon Marlowhttps://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/3609ar.exe: Bad file number2019-07-07T19:03:08ZSimon Peyton Jonesar.exe: Bad file numberJohn Earle writes:
- Hardware. Operating System: 32-Bit Edition of Windows Vista with Service Pack 2 applied. CPU: Intel Pentium 4
- Software. MinGW 5.1.6 which is the current stable release. MinGW 5.1.6 does not install the latest vers...John Earle writes:
- Hardware. Operating System: 32-Bit Edition of Windows Vista with Service Pack 2 applied. CPU: Intel Pentium 4
- Software. MinGW 5.1.6 which is the current stable release. MinGW 5.1.6 does not install the latest version of gcc, however. It installs gcc 3.4.5.
- MSYS 1.0.11 which is the current version of MSYS. It installs GNU Make 3.81 among other things. The version of MSYS available at http://hackage.haskell.org/trac/ghc/wiki/Building/Preparation/Windows is 1.0.10.
- msysDTK-1.0.1 which is the current stable release and is the same version available at http://hackage.haskell.org/trac/ghc/wiki/Building/Preparation/Windows.
- Preexisting version of GHC is 6.10.4 which is the current stable release of GHC which was used to build GHC 6.10.4 from source.
- Those additional Haskell tools that were needed were downloaded from http://hackage.haskell.org/trac/ghc/wiki/Building/Preparation/Windows.
- !ActiveState Python 2.6.3.7 (current is 3.1.1.2, but is not appropriate).
A build script along with a build procedure was prepared. These results do not reflect what was needed to reach this point. Many hours of work were required to achieve these results. These results were not the results that were achieved initially. The directions provided for how to build GHC from source proved insufficient. A workaround which was not described is needed.
The build script runs make, the fast test suite, and make install. The documentation is not built. In order for the test suite to complete Windows Firewall had to be turned off which was something that was also not specified in the directions. Where the test suite needed to be unpacked to or should be named was furthermore not specified. These issues among others make the build process very expensive. Once you have all your ducks in the row, it is easier going, but that is how it usually is in life.
Before proceeding remove the xargs shell script from the path. The xargs shell script is the workaround described above.
Wait 1 hour and 1 minute.
```
make -C libraries all
make[2]: Entering directory `/Z/dev/ghc-6.10.4/src/libraries/ghc-prim'
(echo dist/build/cbits/longlong.o `find dist/build -name "*_stub.o" -print`; find dist/build/GHC/Bool_split dist/build/GHC/Generics_split dist/build/GHC/Ordering_split dist/build/GHC/PrimopWrappers_split dist/build/GHC/IntWord32_split dist/build/GHC/IntWord64_split dist/build/GHC/Tuple_split dist/build/GHC/Types_split dist/build/GHC/Unit_split -name '*.o' -print) | xargs c:/MinGW/bin/ar.exe q dist/build/libHSghc-prim-0.1.0.0.a
xargs: c:/MinGW/bin/ar.exe: Bad file number
make[2]: *** [dist/build/libHSghc-prim-0.1.0.0.a] Error 126
```
In prior attempts I did not receive this error so early. Notice that the version of ar is c:/MinGW/bin/ar.exe. In http://hackage.haskell.org/trac/ghc/wiki/Building/Preparation/Windows c:/MinGW/bin/ occurs in the path before the preexisting instance of GHC just as is the case here. On a previous attempts I have gotten "xargs: c:/ghc/ghc-6.10.4/bin/ar.exe: Argument list too long" and "xargs: c:/ghc/ghc-6.10.4/bin/ar.exe: Bad file number". The path to ar appeared hard coded which is confusing.
I moved the xargs shell script so that it appeared front most in the path once more and resumed the build process from where it left off.
Wait 3 hours and 5 minutes. The build process completed successfully.
At 2 hours and 42 minutes later after the build process was resumed an empty null file is created in the "Z:\\dev" parent directory which an immediate child of the root directory. Regardless of how deeply nested the project directory is, it always appears in the dev directory.
If all goes well the build process has consistently taken 4 hours and 6 minutes.
The day before the build was completed with the workaround applied prior to carrying out the procedure. Today, when the workaround was applied only once an error was encountered and this resulted in additional unexpected test suite failure, namely: conc049(normal). These were yesterdays results:
```
OVERALL SUMMARY for test run started at The current date is: 2009.10.22
Enter the new date: (yy-mm-dd)
2403 total tests, which gave rise to
12815 test cases, of which
0 caused framework failures
10766 were skipped
1955 expected passes
76 expected failures
1 unexpected passes
17 unexpected failures
Unexpected passes:
system001(normal)
Unexpected failures:
2816(ghci)
DoParamM(normal)
cabal01(normal)
drvfail006(normal)
drvfail008(normal)
getPermissions001(normal,normal)
ghci028(ghci)
mod133(normal)
net001(normal)
signals004(normal)
tc183(normal)
tc217(normal)
tc220(normal)
tc223(normal)
tc232(normal)
tcfail126(normal)
```
<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":"ar.exe: Bad file number","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":"John Earle writes:\r\n\r\n * Hardware. Operating System: 32-Bit Edition of Windows Vista with Service Pack 2 applied. CPU: Intel Pentium 4\r\n \r\n * Software. MinGW 5.1.6 which is the current stable release. MinGW 5.1.6 does not install the latest version of gcc, however. It installs gcc 3.4.5.\r\n \r\n * MSYS 1.0.11 which is the current version of MSYS. It installs GNU Make 3.81 among other things. The version of MSYS available at http://hackage.haskell.org/trac/ghc/wiki/Building/Preparation/Windows is 1.0.10.\r\n \r\n * msysDTK-1.0.1 which is the current stable release and is the same version available at http://hackage.haskell.org/trac/ghc/wiki/Building/Preparation/Windows.\r\n\r\n * Preexisting version of GHC is 6.10.4 which is the current stable release of GHC which was used to build GHC 6.10.4 from source.\r\n \r\n * Those additional Haskell tools that were needed were downloaded from http://hackage.haskell.org/trac/ghc/wiki/Building/Preparation/Windows.\r\n \r\n * !ActiveState Python 2.6.3.7 (current is 3.1.1.2, but is not appropriate).\r\n \r\nA build script along with a build procedure was prepared. These results do not reflect what was needed to reach this point. Many hours of work were required to achieve these results. These results were not the results that were achieved initially. The directions provided for how to build GHC from source proved insufficient. A workaround which was not described is needed.\r\n \r\nThe build script runs make, the fast test suite, and make install. The documentation is not built. In order for the test suite to complete Windows Firewall had to be turned off which was something that was also not specified in the directions. Where the test suite needed to be unpacked to or should be named was furthermore not specified. These issues among others make the build process very expensive. Once you have all your ducks in the row, it is easier going, but that is how it usually is in life.\r\n \r\nBefore proceeding remove the xargs shell script from the path. The xargs shell script is the workaround described above.\r\n\r\nWait 1 hour and 1 minute.\r\n{{{\r\nmake -C libraries all\r\n \r\nmake[2]: Entering directory `/Z/dev/ghc-6.10.4/src/libraries/ghc-prim'\r\n \r\n(echo dist/build/cbits/longlong.o `find dist/build -name \"*_stub.o\" -print`; find dist/build/GHC/Bool_split dist/build/GHC/Generics_split dist/build/GHC/Ordering_split dist/build/GHC/PrimopWrappers_split dist/build/GHC/IntWord32_split dist/build/GHC/IntWord64_split dist/build/GHC/Tuple_split dist/build/GHC/Types_split dist/build/GHC/Unit_split -name '*.o' -print) | xargs c:/MinGW/bin/ar.exe q dist/build/libHSghc-prim-0.1.0.0.a\r\nxargs: c:/MinGW/bin/ar.exe: Bad file number\r\nmake[2]: *** [dist/build/libHSghc-prim-0.1.0.0.a] Error 126\r\n}}}\r\nIn prior attempts I did not receive this error so early. Notice that the version of ar is c:/MinGW/bin/ar.exe. In http://hackage.haskell.org/trac/ghc/wiki/Building/Preparation/Windows c:/MinGW/bin/ occurs in the path before the preexisting instance of GHC just as is the case here. On a previous attempts I have gotten \"xargs: c:/ghc/ghc-6.10.4/bin/ar.exe: Argument list too long\" and \"xargs: c:/ghc/ghc-6.10.4/bin/ar.exe: Bad file number\". The path to ar appeared hard coded which is confusing.\r\n \r\nI moved the xargs shell script so that it appeared front most in the path once more and resumed the build process from where it left off. \r\n \r\nWait 3 hours and 5 minutes. The build process completed successfully. \r\n \r\nAt 2 hours and 42 minutes later after the build process was resumed an empty null file is created in the \"Z:\\dev\" parent directory which an immediate child of the root directory. Regardless of how deeply nested the project directory is, it always appears in the dev directory.\r\n \r\nIf all goes well the build process has consistently taken 4 hours and 6 minutes.\r\n \r\nThe day before the build was completed with the workaround applied prior to carrying out the procedure. Today, when the workaround was applied only once an error was encountered and this resulted in additional unexpected test suite failure, namely: conc049(normal). These were yesterdays results:\r\n{{{\r\nOVERALL SUMMARY for test run started at The current date is: 2009.10.22 \r\nEnter the new date: (yy-mm-dd) \r\n 2403 total tests, which gave rise to\r\n 12815 test cases, of which\r\n 0 caused framework failures\r\n 10766 were skipped\r\n \r\n 1955 expected passes\r\n 76 expected failures\r\n 1 unexpected passes\r\n 17 unexpected failures\r\n \r\nUnexpected passes:\r\n system001(normal)\r\n \r\nUnexpected failures:\r\n 2816(ghci)\r\n DoParamM(normal)\r\n cabal01(normal)\r\n drvfail006(normal)\r\n drvfail008(normal)\r\n getPermissions001(normal,normal)\r\n ghci028(ghci)\r\n mod133(normal)\r\n net001(normal)\r\n signals004(normal)\r\n tc183(normal)\r\n tc217(normal)\r\n tc220(normal)\r\n tc223(normal)\r\n tc232(normal)\r\n tcfail126(normal)\r\n}}}","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/3600Template Haskell mis-coverting empty list to empty string2021-11-02T09:27:33ZSimon Peyton JonesTemplate Haskell mis-coverting empty list to empty stringAntoine Latter aslatter\@gmail.com writes: the program Demo.hs compiles on 6.10, but not on 6.12rc1. The output --ddump-splices for 6.10:
```
Demo.hs:1:0:
Demo.hs:1:0: Splicing declarations
test
======>
Demo.hs:6:2...Antoine Latter aslatter\@gmail.com writes: the program Demo.hs compiles on 6.10, but not on 6.12rc1. The output --ddump-splices for 6.10:
```
Demo.hs:1:0:
Demo.hs:1:0: Splicing declarations
test
======>
Demo.hs:6:2-5
myFunction[aLQ] = Demo2.testFun []
Ok, modules loaded: Demo2, Main.
```
In 6.12rc1:
```
Demo.hs:1:0:
Demo.hs:1:0: Splicing declarations
test
======>
Demo.hs:6:2-5
myFunction[aNX] = testFun ""
Demo.hs:6:2:
Couldn't match expected type `[Char]' against inferred type `Char'
Expected type: [String]
Inferred type: [Char]
In the first argument of `testFun', namely `""'
In the expression: testFun ""
Failed, modules loaded: Demo2.
```
The code is short:
```
---------- Demo.hs ---------------
{-# LANGUAGE TemplateHaskell #-}
module Demo where
import Demo2
$(test)
---------- Demo2.hs ---------------
{-# LANGUAGE TemplateHaskell #-}
module Demo2 where
import Language.Haskell.TH
test :: Q [Dec]
test = do
let args = [] :: [String]
body = [| testFun args |]
decNm <- newName "myFunction"
(:[]) `fmap` funD decNm [clause [] (normalB body) []]
testFun :: [String] -> String
testFun _ = "hello"
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------- |
| Version | 6.10.4 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Template Haskell |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Template Haskell mis-coverting empty list to empty string","status":"New","operating_system":"","component":"Template Haskell","related":[],"milestone":"6.12.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.4","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Antoine Latter aslatter@gmail.com writes: the program Demo.hs compiles on 6.10, but not on 6.12rc1. The output --ddump-splices for 6.10:\r\n{{{\r\nDemo.hs:1:0:\r\n Demo.hs:1:0: Splicing declarations\r\n test\r\n ======>\r\n Demo.hs:6:2-5\r\n myFunction[aLQ] = Demo2.testFun []\r\nOk, modules loaded: Demo2, Main.\r\n}}}\r\nIn 6.12rc1:\r\n{{{\r\nDemo.hs:1:0:\r\n Demo.hs:1:0: Splicing declarations\r\n test\r\n ======>\r\n Demo.hs:6:2-5\r\n myFunction[aNX] = testFun \"\"\r\n\r\nDemo.hs:6:2:\r\n Couldn't match expected type `[Char]' against inferred type `Char'\r\n Expected type: [String]\r\n Inferred type: [Char]\r\n In the first argument of `testFun', namely `\"\"'\r\n In the expression: testFun \"\"\r\nFailed, modules loaded: Demo2.\r\n}}}\r\nThe code is short:\r\n{{{\r\n---------- Demo.hs ---------------\r\n{-# LANGUAGE TemplateHaskell #-}\r\nmodule Demo where\r\nimport Demo2\r\n$(test)\r\n\r\n---------- Demo2.hs ---------------\r\n{-# LANGUAGE TemplateHaskell #-}\r\nmodule Demo2 where\r\n\r\nimport Language.Haskell.TH\r\n\r\ntest :: Q [Dec]\r\ntest = do\r\n let args = [] :: [String]\r\n body = [| testFun args |]\r\n decNm <- newName \"myFunction\"\r\n (:[]) `fmap` funD decNm [clause [] (normalB body) []]\r\n\r\ntestFun :: [String] -> String\r\ntestFun _ = \"hello\"\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/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/3591A working program reports <<loop>> when compiled with -O2021-04-07T16:37:52ZGhost UserA working program reports <<loop>> when compiled with -OIf the attached module Trampoline.hs is compiled with no optimizations it works:
```
$ ghc --make Trampoline.hs
[1 of 1] Compiling Main ( Trampoline.hs, Trampoline.o )
Linking Trampoline ...
$ ./Trampoline
...
((5,2),(1,...If the attached module Trampoline.hs is compiled with no optimizations it works:
```
$ ghc --make Trampoline.hs
[1 of 1] Compiling Main ( Trampoline.hs, Trampoline.o )
Linking Trampoline ...
$ ./Trampoline
...
((5,2),(1,2,6))
$
```
With optimizations on, it hangs:
```
$ ghc --make Trampoline.hs -O
[1 of 1] Compiling Main ( Trampoline.hs, Trampoline.o )
Linking Trampoline ...
$ ./Trampoline
bounce start
bounce end
liftOut
inject suspend
Trampoline: <<loop>>
```
That doesn't seem right. Oh, GHCi runs it with no problem as well.
<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":"A working program reports <<loop>> when compiled with -O","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":"If the attached module Trampoline.hs is compiled with no optimizations it works:\r\n\r\n{{{\r\n$ ghc --make Trampoline.hs \r\n[1 of 1] Compiling Main ( Trampoline.hs, Trampoline.o )\r\nLinking Trampoline ...\r\n$ ./Trampoline \r\n...\r\n((5,2),(1,2,6))\r\n$ \r\n}}}\r\n\r\nWith optimizations on, it hangs:\r\n\r\n{{{\r\n$ ghc --make Trampoline.hs -O\r\n[1 of 1] Compiling Main ( Trampoline.hs, Trampoline.o )\r\nLinking Trampoline ...\r\n$ ./Trampoline \r\nbounce start\r\nbounce end\r\nliftOut\r\ninject suspend\r\nTrampoline: <<loop>>\r\n}}}\r\n\r\nThat doesn't seem right. Oh, GHCi runs it with no problem as well.\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/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>