Author Topic: Ubuntu 13.04, codeblocks would not compile.  (Read 26718 times)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Ubuntu 13.04, codeblocks would not compile.
« Reply #15 on: August 20, 2013, 10:12:22 pm »
What exactly do aou have in "Settings -> Environment -> General settings -> Shell to run commands in:" ?
Code
/bin/sh
or
Code
/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.

Offline vasilenko93

  • Single posting newcomer
  • *
  • Posts: 8
Re: Ubuntu 13.04, codeblocks would not compile.
« Reply #16 on: August 20, 2013, 10:17:07 pm »
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.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Ubuntu 13.04, codeblocks would not compile.
« Reply #17 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:
Code
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.

Offline Wyrm

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: Ubuntu 13.04, codeblocks would not compile.
« Reply #18 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?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Ubuntu 13.04, codeblocks would not compile.
« Reply #19 on: August 21, 2013, 09:50:28 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?

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:
Code
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.

Offline vasilenko93

  • Single posting newcomer
  • *
  • Posts: 8
Re: Ubuntu 13.04, codeblocks would not compile.
« Reply #20 on: August 21, 2013, 05:54:52 pm »
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.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Ubuntu 13.04, codeblocks would not compile.
« Reply #21 on: August 21, 2013, 06:05:03 pm »
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).