News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Ubuntu 13.04, codeblocks would not compile.

Started by vasilenko93, August 19, 2013, 02:32:52 AM

Previous topic - Next topic

Jenna

What exactly do aou have in "Settings -> Environment -> General settings -> Shell to run commands in:" ?
/bin/sh
or
/bin/sh -c

The -c is a must !

By the way on systems with bash as default shell (as on Ubuntu [and many more] as far as I know)  /bin/sh is just a symlink to /bin/bash so there should not be a difference.

vasilenko93

Thank you very much, finally works. Really odd that by default it comes with /bin/sh not /bin/sh -c

You are the best jens.

Jenna

The default (when created from scratch, e.g. by deleting the default.conf or using a different personality) is "/bin/sh -c".
The default is hardcoded in globals.cpp:58 as follows:
const wxString DEFAULT_CONSOLE_SHELL = _T("/bin/sh -c");

If this is really not the default for the C::B from Ubuntu's repo, they must have changed it.
In this case, please file a bug-report against the Ubuntu bug-tracker.

Wyrm

Looks like you guys have already resolved the issue and Jens's idea was correct. Good call.
So what's the conclusion? Everyone on Ubuntu and derivatives must go to environment settings and add "-c" or compile C::B from source?

Jenna

Quote from: Wyrm on August 21, 2013, 05:28:14 AM
Looks like you guys have already resolved the issue and Jens's idea was correct. Good call.
So what's the conclusion? Everyone on Ubuntu and derivatives must go to environment settings and add "-c" or compile C::B from source?

Quote from: jens on August 20, 2013, 10:24:27 PM
The default (when created from scratch, e.g. by deleting the default.conf or using a different personality) is "/bin/sh -c".
The default is hardcoded in globals.cpp:58 as follows:
const wxString DEFAULT_CONSOLE_SHELL = _T("/bin/sh -c");

If this is really not the default for the C::B from Ubuntu's repo, they must have changed it.
In this case, please file a bug-report against the Ubuntu bug-tracker.

If the Ubuntu-maintainers really changed this (I can't believe this, because it would be to stupid, on the other hand it's Ubuntu ...  ;) ), there would be no other way to fix this, until they fix this.
Please try to start C::B with -p test parameter from commandline (or any other new personality) and check the default settings.

vasilenko93

I don't know if Ubuntu really did change the settings, or I did sometimes and re-installing the program kept them. Because I actually used the synaptic package manager to remove everything that has to do with codeblocks (installed through software center), and compiled it from source with the latest SVN. That did nothing (except fix broken add-on) because I guess my old codeblocks settings where still saved. Also it is not the first time I got this, before a fresh install of Ubuntu 12.10 and codeblocks from the software center still gave me this problem. SOFTWARE CENTER PROGRAMS ARE BUGGY!

But yes, the problem has been solved, just needed that extra -c.

Jenna

This has nothing to do with software center,.
It's normal for programs to keep user configuration if the package gets removed.

And instead of blaming Ubuntu's repo it would have been better to test whether they really changed this setting.
I gave you an advice on how to do it (e.g. different personality).