Can't build CodeLite for Linux

Discussion about CodeLite development process and patches
GameCodingNinja
CodeLite Curious
Posts: 2
Joined: Sun Jan 25, 2015 8:10 am
Genuine User: Yes
IDE Question: c++
Contact:

Can't build CodeLite for Linux

Post by GameCodingNinja »

I'm using my own Linux build so my only option is to build the software because you don't supply non-packaged binaries. I use xfce4 as my desktop and my Linux build once booted up only takes up about 105 meg of RAM.

As I start the build, I see the memory usage clime higher and higher. I'm using an older PC with 2 Gigs of RAM. Soon after the build starts, it exceeds my 2 Gigs ram and spills over into my swap partition. The swap partition is 6 Gigs in size. The PC locks up just as it uses all of the swap too.

How much memory do you need to build this software?! I've never seen anything like this before. Is there a way to tell it not to use so much memory?
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Can't build CodeLite for Linux

Post by DavidGH »

Hi,

I've built CodeLite on various distros inside virtualbox guests. The average guest was given 1GB of memory and 300MB of swap, and at first this worked well.

Then distros started to mount /tmp as tmpfs i.e. in ram, and things went strangely wrong when I tried to build any program. I'd get lots of cpu and disc activity without any visible progress, culminating in a gcc 'internal error' message, or even in the guest spontaneously rebooting. This happened only when I tried to use too many cpu cores i.e. -j4 on a 4-core machine. -j1 was always OK; 2 or 3 sometimes. Providing much more ram didn't seem to help.

Google finally told me that this was a lack-of-swap issue, and I've now learned to provide a reasonable amount of memory e.g. 2GB, and enough swap e.g. 2GB. I've had no trouble since then.

All of which is interesting, and might even be helpful to you ;) . You have plenty of swap (though it's surprising how fast that gets utilised); but if you don't already, try building with -j1.

Otherwise, perhaps tell us more about your system: anything unusual about it? which g++ version? what happens when you build other programs?

Regards,

David
GameCodingNinja
CodeLite Curious
Posts: 2
Joined: Sun Jan 25, 2015 8:10 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: Can't build CodeLite for Linux

Post by GameCodingNinja »

My Linux system is a "Linux From Scratch" build with some BLFS like the xfce4 desktop and other misc things. So other then Firefox, JRE, Steam and Adobe Flash, everything is compiled.

Going form -j to -j1 solved the problem. I assume the number represents the amount of cores to use when compiling. This is an older AMD single core CPU. I guess we can see what happens when you tell a single core CPU to compile using more then one core... runaway memory usage. Memory usage now seems to stay below 400 megs.

Thanks for the help. CodeLite is very impressive. I was tinkering with it in Windows and it seems to be just as capable and easy to use as MSVC editor.
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Can't build CodeLite for Linux

Post by DavidGH »

Going from -j to -j1 solved the problem.
Great!
I assume the number represents the amount of cores to use when compiling.
That's right. In theory -j will use the actual number, or that + 1, and all will be optimal. In practice...
Post Reply