Page 1 of 1

Codelite build help Linux

Posted: Sun Jul 16, 2017 6:38 am
by BandidoPabs
Self compiled version of Codelite
Ubuntu 16.04

I was following the instructions on http://codelite.org/Developers/Linux. I got to the step of buidling codelite "make -j4". Everytime I run that command it gets to 10% and then my OS crashes. Any advice on what I'm doing wrong?

Also I've downloaded Codelite Version 9.1.7 and the only issue I have here is that I get the error failed to locate gdbd. I've deleted the space and set the correct path, switched to xterm terminal but I still can't use the built in terminal.

Any help is appreciated thanks.

Re: Codelite build help Linux

Posted: Sun Jul 16, 2017 11:16 am
by DavidGH
Hi,
I got to the step of buidling codelite "make -j4". Everytime I run that command it gets to 10% and then my OS crashes.
The same happens for me in the wrong circumstances.

As you probably know, '-j4' means "Tell g++ to use 4 logical CPUs". It guesses that your machine has at least that number, and sometimes it will be wrong.

Until a few years ago that didn't seem to matter. Even if I tried -j8 in a 2-core machine (or in a VirtualBox guest that had access only to 2 cores) it did no harm. But then systems changed to use tmpfs when building, and I found that too many parallel builds would either drastically slow down the build, or the build would abort with a gcc error, or the system would crash. The same thing happened when not specifying a number by passing '-j'. Sometimes that seems to be due to running out of memory allocated to tmpfs; sometime to running out of swap space (I used to allocate very little swap to a VirtualBox guest).

There are two ways to solve the problem;
  • 1) Use the correct number of CPUs. However that isn't always easy: some distros automatically set the wrong number in some cirumstances e.g. when using rpmbuild. The fix (for a 2-core machine) is to
    export MAKEOPTS="-j2"
    in that terminal.
    2) Don't use tmpfs. Instead do something like:
    export TMPDIR=/somewhere/else
    in that terminal.
I get the error failed to locate gdbd.
(I presume you mean 'gdb'.) Is gdb installed?

Regards,

David

Re: Codelite build help Linux

Posted: Mon Jul 17, 2017 12:36 am
by BandidoPabs
Hi David,

I did the first suggestion where you set the correct number of cores. I got the following error.

http://imgur.com/a/6RuHN

Regarding the gdb. Yes it is installed and I have the set the correct debugger in the codelite settings. Somehow I've managed to move on to the next problem.. This time when I use the build in terminal to debug it says that " &"warning: GDB: Failed to set controlling terminal: :

Re: Codelite build help Linux

Posted: Mon Jul 17, 2017 1:02 am
by DavidGH
I got the following error.
http://imgur.com/a/6RuHN
"File truncated" makes it sound as if it's trying to link to an old file that was damaged in one of your previous crashes. Did you 'make clean' before you tried to build again? Perhaps try deleting the whole of the build subdirectory and start again.

If that doesn't help, please give more details about what you are doing e.g. which wxWidgets version are you building against, what options are you passing to cmake.
This time when I use the build in terminal to debug it says that " &"warning: GDB: Failed to set controlling terminal:
That's 'normal'. It's a false alarm, and you can ignore it.

Re: Codelite build help Linux

Posted: Mon Jul 17, 2017 1:02 am
by BandidoPabs
Hi David,

I got everything working now. Thanks for you help! The only annoying thing I'm dealing is with that warning sign &"warning: GDB: Failed to set controlling terminal:. However I've read online and apparently it doesn't affect the terminal.

It would be nice to know how to get rid of it though.

Re: Codelite build help Linux

Posted: Mon Jul 17, 2017 10:52 am
by DavidGH
It would be nice to know how to get rid of it though.
That isn't possible. It's a side-effect of how CodeLite works out which tty it's using.

Other IDEs have the same issue, and there's a useful explanation in this thread.