Page 1 of 1

[SOLVED] Wrong Terminal Path on Lubuntu 15.10

Posted: Sun Dec 27, 2015 6:29 am
by mkahler
Just installed Lubuntu 15.10 and Codelite 9.0.0 from the official Wily repository, when trying to use the Run option from inside the IDE, it fails with the error:

Code: Select all

Program exited with return code: 65280
The problem was the console path setting. It was trying to access /usr/lib/codelite, but the codelite_xterm is located at /usr/bin/
The path can be configured inside the IDE at:

Settings->Global Editor Preferences->Terminal

Which solves the problem.

---

Original post:
I've been trying to use Codelite, version 9.0.0, on Lubuntu 15.10
Successfully followed the official instructions, (I've downloaded and installed the package for ubuntu wily, through Synaptic Package Manager, not building it myself) and got the IDE running.

When I try to compile and run a simple Hello, World! program, the launch fails with the following

Code: Select all

Current working directory: /media/mateus/TULHA/Prog/CodeLiteW/consolo/Release
Running program: /usr/lib/codelite/codelite_xterm './consolo ' '/bin/sh -f /usr/bin/codelite_exec ./consolo'
Program exited with return code: 65280
Trying to reproduce the error outside the IDE, I've noticed that the folder /usr/lib/codelite does not exist, and couldn't find the codelite_xterm executable.
I've tried to purge and reinstall Codelite and associated packages. Same result.

I've found something more strange: I can't run the generated executable even from outside the IDE, it shows a permission denied error, and when trying as super user, a command not found error (even when forcing the executable flag with chmod).
If I manually compile the same file using g++ on the terminal, it works just fine.

The build output, from inside the IDE (showing success):

Code: Select all

/bin/sh -c '/usr/bin/make -j2 -e -f  Makefile'
----------Building project:[ consolo - Release ]----------
make[1]: Entering directory '/media/mateus/TULHA/Prog/CodeLiteW/consolo'
/usr/bin/g++  -c  "/media/mateus/TULHA/Prog/CodeLiteW/consolo/main.cpp" -O2 -Wall -DNDEBUG  -o ./Release/main.cpp.o -I. -I.
/usr/bin/g++ -o ./Release/consolo @"consolo.txt" -L.
make[1]: Leaving directory '/media/mateus/TULHA/Prog/CodeLiteW/consolo'
====0 errors, 0 warnings====
The source code of the test program:

Code: Select all

#include <stdio.h>

int main(int argc, char **argv)
{
    printf("hello world\n");
    return 0;
}
I am noob to Linux environment. Tanks for the help.

Re: Codelite on Lubuntu 15.10, incomplete install?

Posted: Sun Dec 27, 2015 3:05 pm
by DavidGH
Hi,
I've noticed that the folder /usr/lib/codelite does not exist, and couldn't find the codelite_xterm executable.
For a 64 bit Lubuntu look in /usr/lib/x86_64-linux-gnu/codelite/. I don't have a 32 bit one, but I suspect it'll be in /usr/lib/i386-linux-gnu/codelite/. /usr/bin/codelite_xterm should exist, though; if not, something went wrong with the install.

In my lubuntu 15.10 I just created a workspace and added a gcc console project using the wizard template. After installing 'gcc' and 'make' it built and ran normally.

I suggest you try doing the same thing. If that works, adjust your project settings to match the known-to-work ones from the template project.

Regards,

David

Re: Codelite on Lubuntu 15.10, incomplete install?

Posted: Mon Dec 28, 2015 5:41 am
by mkahler
Tanks for the reply, it gave me confidence to execute the following workaround:

I've created the folder /usr/lib/codelite and copied the codelite_xterm script from /usr/bin/ to it. Now I can compile and run simple programs from inside the IDE.

My report:
Running in the terminal

Code: Select all

dpkg -L codelite |grep xterm
outputs /usr/bin/codelite_xterm, which shows that the installation was correct, but the IDE incorrectly (?) tries to run codelite_xterm from the folder /usr/lib/codelite

Side-notes:
  • Weird that this does not reproduce in your system, since I haven't changed any configuration (just installed Lubuntu and codelite right away);
    I'm also using the 64 bit OS;
    (the permission denied error was something about having the workspace in an USB drive mounted with noexec flag, no Codelite related);

Re: Codelite on Lubuntu 15.10, incomplete install?

Posted: Mon Dec 28, 2015 10:43 am
by eranif
mkahler wrote:I've created the folder /usr/lib/codelite and copied the codelite_xterm script from /usr/bin/ to it. Now I can compile and run simple programs from inside the IDE.
Sorry for the late response here, but why did you do this?
This is configurable..

Settings->Preferences->Terminal

and change the path used for codelite_xterm

Eran

Re: Codelite on Lubuntu 15.10, incomplete install?

Posted: Mon Dec 28, 2015 2:07 pm
by DavidGH
but the IDE incorrectly (?) tries to run codelite_xterm from the folder /usr/lib/codelite
Mine doesn't; as you can see in the attached screenshot, the setting was (the correct) /usr/bin/codelite_xterm, and that's what is used in the template project: you can see the 'run' output below.

Did you try a new workspace/project? You might be pleasantly surprised ;)

Re: [SOLVED] Wrong Terminal Path on Lubuntu 15.10

Posted: Tue Dec 29, 2015 4:52 am
by mkahler
Tanks for the answers.

I've edited the original post with the - now known - precise problem and solution, in case anyone comes across this or similar problem (is this a good thing™?).

The wrong path was default, even in new workspace. Still don't know the reason.