ahushh / monaba

Imageboard engine written in Haskell and powered by Yesod
https://haibane.ru
MIT License
86 stars 9 forks source link

Possible memory leak while building from source #14

Open hails opened 8 years ago

hails commented 8 years ago

When I try to compile/build from source, using either stackage and cabal, the process halts when it reaches the following step [25 of 32] Compiling Handler.Admin.Board ( Handler/Admin/Board.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Handler/Admin/Board.o ). I'm currently with 8GB of RAM, SSD, and 2GB of swap (file), and the building process consumes everything before halting (high I/O, system lagging etc).

ahushh commented 8 years ago

As a temporary solution you can decrease GHC optimization level to -O0 in Monaba.cabal

hails commented 8 years ago

Didn't work, but it seems to work when I use stackage stack build. First, I tried to compile in three differents Digital Ocean droplets (Ubuntu and Debian) and got some dependencies errors, even using stackage. Now, compiling (and hacking with a mix of cabal and stackage) on my Arch Linux setup kinda worked. Should we perhaps make Monaba "stackage compliant" and recheck the dependencies?

ahushh commented 8 years ago

Hmm, it works for me when I use cabal and latest packages with GHC 7.10.2 following my readme. I never used stackage before but I will surely take a look on it

hails commented 8 years ago

What Linux distribution are you using to build Monaba with cabal?

ahushh commented 8 years ago

gentoo

hails commented 8 years ago

That's strange, tried several times (even asked to a friend of mine to try buidling) and got almost the same errors (dependencies failing, memory leak, and so on). Maybe it's just me being unlucky (and being hated back by cabal) or doing something wrong.

ahushh commented 8 years ago

I got memory leaking too, but -O0 always helped. Don't know how to fix it another way yet. Just updated package list, inited sandbox and reinstalled dependencies, got no errors (except of nano-md5). What dependencies errors did you get?

ahushh commented 8 years ago

I updated dependencies versions according to yesod scaffold example, not sure if it helps

hails commented 8 years ago

Gonna test on a Digital Ocean droplet.

hails commented 8 years ago

Welp, this time everything went well. I guess I can close the issue now?

ahushh commented 8 years ago

Let it be open to remind me that memory leak isn't fixed, -O0 still isn't a good way

hails commented 8 years ago

Ok, if something like that happens again, I'll report it here.

jeanlucaslima commented 8 years ago

@ahushh the option -O0 should be on the documentation then