[GHC] #9904: ghc: out of memory, requested 1048576 bytes on openbsd

#9904: ghc: out of memory, requested 1048576 bytes on openbsd ------------------------------------+---------------------------------- Reporter: vu3rdd | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Keywords: cabal-install | Operating System: OpenBSD Architecture: Unknown/Multiple | Type of failure: Other Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: ------------------------------------+---------------------------------- Hi, I freshly installed OpenBSD 5.6 on an AMD64 system. I also installed ghc and cabal-install from the OpenBSD package system. The version in OpenBSD 5.6 package tree is: $ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.6.3 $ cabal --version cabal-install version 1.16.0.2 using version 1.16.0 of the Cabal library Now, I do a `cabal update' and `cabal install cabal-install'. I get this error: ghc: out of memory, requested 1048576 bytes I am not sure if it is a cabal-install bug or a ghc bug or an OpenBSD bug. So, if you think it is not a ghc bug, please go ahead and close this bug (and accept my apologies..), I will open it against cabal-install or openbsd instead. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9904 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9904: ghc: out of memory, requested 1048576 bytes on openbsd -----------------------------------+------------------------------------ Reporter: vu3rdd | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: cabal-install Operating System: OpenBSD | Architecture: Unknown/Multiple Type of failure: Other | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -----------------------------------+------------------------------------ Comment (by rwbarton): Is it possible that your system is actually running out of memory? ghc is rather RAM-hungry and it might fail to build cabal if you have less than around 1G free. In any case, the ghc 7.6 line is no longer being developed so if you do think it may be a bug in ghc, try ghc 7.8 first (you'll have to install cabal 1.18 or newer to work with ghc 7.8). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9904#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9904: ghc: out of memory, requested 1048576 bytes on openbsd -----------------------------------+------------------------------------ Reporter: vu3rdd | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: cabal-install Operating System: OpenBSD | Architecture: Unknown/Multiple Type of failure: Other | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -----------------------------------+------------------------------------ Comment (by carter): additionally, its worth configuring having a decent sized swap file or your systems equivalent. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9904#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9904: ghc: out of memory, requested 1048576 bytes on openbsd -----------------------------------+------------------------------------ Reporter: vu3rdd | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: cabal-install Operating System: OpenBSD | Architecture: Unknown/Multiple Type of failure: Other | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -----------------------------------+------------------------------------ Comment (by vu3rdd): Replying to [comment:1 rwbarton]:
Is it possible that your system is actually running out of memory? ghc is rather RAM-hungry and it might fail to build cabal if you have less than around 1G free.
In any case, the ghc 7.6 line is no longer being developed so if you do
Thanks. I tried increasing the swap by another 1 GB and still get this problem. think it may be
a bug in ghc, try ghc 7.8 first (you'll have to install cabal 1.18 or newer to work with ghc 7.8).
Thanks. I will try upgrading to cabal 1.18.x. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9904#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9904: ghc: out of memory, requested 1048576 bytes on openbsd -----------------------------+------------------------------------------- Reporter: vu3rdd | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: fixed | Keywords: cabal-install Operating System: OpenBSD | Architecture: Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -----------------------------+------------------------------------------- Changes (by vu3rdd): * status: new => closed * resolution: => fixed Comment: OK, I solved the problem by taking cue from what others porting programs to OpenBSD have written. OpenBSD defaults limits listed in /etc/login.conf is pretty conservative. So, I increased the datasize: ... values to infinity. After that cabal installed the 1.22.0.0 just fine. It upgraded from 1.16.0.x to 1.22.0.0. I will also try compiling a newer version of ghc. I am closing the ticket. Thanks. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9904#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC