Opened 4 years ago

Closed 4 years ago

#9904 closed bug (fixed)

ghc: out of memory, requested 1048576 bytes on openbsd

Reported by: vu3rdd Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.6.3
Keywords: cabal-install Cc:
Operating System: OpenBSD Architecture: Unknown/Multiple
Type of failure: Other Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

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.

Change History (4)

comment:1 Changed 4 years ago 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).

comment:2 Changed 4 years ago by carter

additionally, its worth configuring having a decent sized swap file or your systems equivalent.

comment:3 in reply to:  1 Changed 4 years ago by vu3rdd

Replying to 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.

Thanks. I tried increasing the swap by another 1 GB and still get this problem.

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).

Thanks. I will try upgrading to cabal 1.18.x.

comment:4 Changed 4 years ago by vu3rdd

Resolution: fixed
Status: newclosed

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.

Note: See TracTickets for help on using tickets.