GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T19:03:42Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/3473System.Posix.Semaphore shouldn't create finalizers with Foreign.newForeignPtr2019-07-07T19:03:42ZKari PahulaSystem.Posix.Semaphore shouldn't create finalizers with Foreign.newForeignPtrRunning this program
```
import System.Posix.Semaphore
main = do
s <- semOpen "c" (OpenSemFlags True False) 0666 1
semThreadWait s
v <- semGetValue s
putStrLn "Type!"
a <- getLine
putStrL...Running this program
```
import System.Posix.Semaphore
main = do
s <- semOpen "c" (OpenSemFlags True False) 0666 1
semThreadWait s
v <- semGetValue s
putStrLn "Type!"
a <- getLine
putStrLn $ "OK, " ++ a
semPost s
```
fails like this:
```
Type!
abc
OK, abc
sem: error: a C finalizer called back into Haskell.
This was previously allowed, but is disallowed in GHC 6.10.2 and later.
To create finalizers that may call back into Haskll, use
Foreign.Concurrent.newForeignPtr instead of Foreign.newForeignPtr.
```
The attached patch for libraries/unix/System/Posix/Semaphore.hsc should fix this.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 6.10.4 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/unix |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"System.Posix.Semaphore shouldn't create finalizers with Foreign.newForeignPtr","status":"New","operating_system":"","component":"libraries/unix","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.4","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Running this program \r\n\r\n{{{\r\nimport System.Posix.Semaphore\r\n\r\nmain = do\r\n s <- semOpen \"c\" (OpenSemFlags True False) 0666 1\r\n semThreadWait s\r\n v <- semGetValue s\r\n putStrLn \"Type!\"\r\n a <- getLine\r\n putStrLn $ \"OK, \" ++ a\r\n semPost s\r\n}}}\r\n\r\nfails like this:\r\n\r\n{{{\r\nType!\r\nabc\r\nOK, abc\r\nsem: error: a C finalizer called back into Haskell.\r\nThis was previously allowed, but is disallowed in GHC 6.10.2 and later.\r\nTo create finalizers that may call back into Haskll, use\r\nForeign.Concurrent.newForeignPtr instead of Foreign.newForeignPtr.\r\n}}}\r\n\r\nThe attached patch for libraries/unix/System/Posix/Semaphore.hsc should fix this.\r\n","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Simon MarlowSimon Marlowhttps://gitlab.haskell.org/ghc/ghc/-/issues/3179Linking unix package fails2019-07-07T19:05:00ZeelcoLinking unix package failsI just built GHC 6.10.2 from scratch on a Debian 4.0 machine. Everything seems to go well. But, when 'cabal-install'ing happstack-data, I'll get the following error:
```
Loading package unix-2.3.2.0 ... <command line>: can't load .so/.D...I just built GHC 6.10.2 from scratch on a Debian 4.0 machine. Everything seems to go well. But, when 'cabal-install'ing happstack-data, I'll get the following error:
```
Loading package unix-2.3.2.0 ... <command line>: can't load .so/.DLL for:
rt (/usr/lib/librt.so: symbol __librt_multiple_threads, version GLIBC_PRIVATE
not defined in file libc.so.6 with link time reference)
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 6.10.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/unix |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Linking unix package fails","status":"New","operating_system":"","component":"libraries/unix","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"I just built GHC 6.10.2 from scratch on a Debian 4.0 machine. Everything seems to go well. But, when 'cabal-install'ing happstack-data, I'll get the following error:\r\n\r\n{{{\r\nLoading package unix-2.3.2.0 ... <command line>: can't load .so/.DLL for: \r\nrt (/usr/lib/librt.so: symbol __librt_multiple_threads, version GLIBC_PRIVATE \r\nnot defined in file libc.so.6 with link time reference)\r\n\r\n}}}\r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1https://gitlab.haskell.org/ghc/ghc/-/issues/3142unix-2.3.2.0 needs base >= 4.1 in .cabal file2019-07-07T19:05:10Zguestunix-2.3.2.0 needs base >= 4.1 in .cabal fileFrom the hackage log\[1\] we can see that unix-2.3.2.0 lacks the appropriate lower bound on the version of base (\>= 4.1) in build-depends.
\[1\]http://hackage.haskell.org/packages/archive/unix/2.3.2.0/logs/failure/ghc-6.10
<details><s...From the hackage log\[1\] we can see that unix-2.3.2.0 lacks the appropriate lower bound on the version of base (\>= 4.1) in build-depends.
\[1\]http://hackage.haskell.org/packages/archive/unix/2.3.2.0/logs/failure/ghc-6.10
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/unix |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"unix-2.3.2.0 needs base >= 4.x in .cabal file","status":"New","operating_system":"","component":"libraries/unix","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"From the hackage log[1] we can see that unix-2.3.2.0 lacks the appropriate lower bound on the version of base (>= 4.1) in build-depends.\r\n\r\n[1]http://hackage.haskell.org/packages/archive/unix/2.3.2.0/logs/failure/ghc-6.10","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1https://gitlab.haskell.org/ghc/ghc/-/issues/592signal handlers should be able to access siginfo_t information2019-07-07T19:17:44ZSimon Marlowsignal handlers should be able to access siginfo_t informationCurrently a Haskell signal handler doesn't get much information at all. There ought to be a way to access all the information that the C signal handler gets (siginfo_t).
There might be some implementation trickiness: we have to stash aw...Currently a Haskell signal handler doesn't get much information at all. There ought to be a way to access all the information that the C signal handler gets (siginfo_t).
There might be some implementation trickiness: we have to stash away the siginfo_t somewhere in the signal handler, and we have to do that without using malloc().
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 6.4.1 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/base |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"signal handlers should be able to access siginfo_t information","status":"New","operating_system":"","component":"libraries/base","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.4.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"Currently a Haskell signal handler doesn't get much information at all. There ought to be a way to access all the information that the C signal handler gets (siginfo_t).\r\n\r\nThere might be some implementation trickiness: we have to stash away the siginfo_t somewhere in the signal handler, and we have to do that without using malloc().","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Simon MarlowSimon Marlow