Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: kriegaex on March 07, 2012, 05:33:37 pm

Title: Custom make commands are never executed
Post by: kriegaex on March 07, 2012, 05:33:37 pm
I created a new project with an existing external makefile. I selected "This is a custom Makefile". I created a new target "all" to check if the external Makefile is triggered. It is.

So far, so good. Now I edited the first entry in the target's "Make commands" section. Unfortunately, this setting seems to be ignored. Whatever I write there, even something like "echo 'test'", is ignored. Pre- and post-commands are run, though.

I am a CB newbie, so maybe I am doing something wrong (if so, nothing obvious). If so, tell me what, please. Otherwise I guess this might be a bug.

I am on Ubuntu 11.10 64-bit and using the CB package which is part of the distribution.
Title: Re: Custom make commands are never executed
Post by: Jenna on March 07, 2012, 07:56:52 pm
If the makefile is called, then it is either a bug of make, or a miswritten makefile.

If you turn on full commandline logging for the compiler you have chosen for your project/target, you should see all the output of the make command.
See http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F) for an instruction how to do it.

Be aware, that just the make command of the compiler is used, not the compiler itself.
Title: Re: Custom make commands are never executed
Post by: kriegaex on March 11, 2012, 01:30:19 pm
Maybe we have a misunderstanding here: I am using a custom makefile. It is called, but not the way I specify in the command line editor (see attached image). As you can see, I even changed the command completely for testing so as not to call make at all, but echo some text to the console, but my command line is not used - against my expectation. CB always calls "make <target>" no matter what I specify in custom commands.

Edit: OMG, I guess CB is quite buggy in the version (svn 7671) offered by Ubuntu 11.10:

Guys, I have just created my first project and run my first make, but already discovered three easy to spot bugs at once. I must say, I am shocked. Anyway, I would like to continue testing CB because it starts up faster and seems leaner on my old machine than Eclipse, but I do hope you have some solutions or bugfixes for me. Are these known bugs which are fixed in newer versions? If so, please try to trigger the maintainers of the Ubuntu/Debian packages and urge them to upgrade to a newer release. The way it is now, the software is absolutely useless, not even able to run an external makefile with a custom command without a trick (turning on full command line logging).
Title: Re: Custom make commands are never executed
Post by: MortenMacFly on March 11, 2012, 03:00:06 pm
This is your first post...

Guys, I have just created my first project and run my first make, but already discovered three easy to spot bugs at once. I must say, I am shocked.
[...]
but I do hope you have some solutions or bugfixes for me.
I have to say you have a strange attitude.

Sure - all bugs must be on our side and surely we will serve you at will. What else can we do for you? Do you like a beer, an ice-cream and a massage, too?
Title: Re: Custom make commands are never executed
Post by: kriegaex on March 11, 2012, 04:35:35 pm
Look, I am a user and a CB newbie, but not stupid and a computer scientist and developer like many of you here, too. CB is neither my first IDE nor is this my first Linux build. I usually use the command line, so I know how to call and debug make. I also know how to do what I want with Eclipse.

What I want is just to be taken seriously, not a beer and definitely not a massage. Would you not agree that the three issues I have mentioned are bugs? I have posted twice now, but my first post has not been taken seriously and not read thoroughly. I told you what was wrong and I got an irrelevant reply. No problem, misunderstandings happen every day. So I tried to make myself understood by posting a reply with more details and even a screenshot to clarify things. And what do I get as a reply now? A polemic, sarcastic comment and again no relevant answer.

Hey, bugs are a normal thing, but would you not be shocked if at first contact with a new IDE with an everyday core task (building a program) you would not just bump into one, but into three errors at once? Many people would immediately give up and go back to what they know is working, never touching the software again, free or not. I am different and stated clearly that I want to keep testing, I just needed help and was even suggesting the bugs might be old and already fixed, blaming Ubuntu package maintainers for not upgrading their package.

Sure, to say that I am shocked is a personal statement, but one backed by facts (three reproduceable bugs, I can create a screen cam for you if you like). I insulted noone and said clearly what I want from you: hints, bugfixes, help. And you just insult me personally instead of offering help. Is this how you welcome new users?

Edit and P.S.: I am not just demanding something, I am not a leecher. I took the time to report three errors. So first I was giving away something: my time and devotion as a free tester for your project. I have led an OSS project long enough to know that this is important. Software development is for users, but also the developers cannot improve a lot without feedback. I just gave feedback, and this is what I get in return. Thank you so much.
Title: Re: Custom make commands are never executed
Post by: Jenna on March 11, 2012, 04:57:31 pm
I have no such errors here.

Can you create a sample project, where this error occurs, pack and attach it here.
Please attach also C::B's conf-file (default.conf in ~/.codeblocks).

Calling gui elements from inside C::B (like askpass dialog) will mot likely not work, because the commands are executed through wxWidgets wxExecute, abd not through a shell.
Title: Re: Custom make commands are never executed
Post by: kriegaex on March 11, 2012, 05:12:54 pm
Sorry Jens, I do not want to seem lecturing, being a smart-ass or something, but please read my inquiry a bit more thoroughly, then you can by deduction (because I mentioned it) conclude that

Anyway, here are my CB configuration and my project file. It has two targets "all" and "install" by which it builds an external software package (mc-4.8.1, the well known Midnight Commander). I just wanted to test a bit to see how CB works and then use it as a GUI front-end for debugging mc later, just in case you are interested in my use case and motivation. You might notice that the project base directory is not equal to the source code directory, but this is not a problem because I could "add files recursively" from the directory easily.

Edit: In the project I uploaded, you first need to deactivate full command line logging in order to see the problem. As a workaround I have activated it because then at least my custom commands are executed.
Title: Re: Custom make commands are never executed
Post by: kriegaex on March 11, 2012, 06:02:07 pm
Sorry for replying several times in a row (and I will need yet another post after this one), but there is a limit to attachments. I am attaching more screenshots for the bugs described in post #3. I know I could upload an archive full of pics, but this is inconvenient for viewing.
Title: Re: Custom make commands are never executed
Post by: kriegaex on March 11, 2012, 06:02:42 pm
More screenshots
Title: Re: Custom make commands are never executed
Post by: oBFusCATed on March 11, 2012, 06:12:04 pm
Please don't use local attachments.
Storage for the forum is limited and attachments get removed at random!

It seems that I can reproduce your bug.

Set the build command to 'xmessage -buttons "test" -center " tead" ' (build options->target->make commands->build project/target)
and then switching the log mode to something different than full log.

This is pretty strange, but calling it "quite buggy" is harsh, in fact this could be regarded as feature, because using anything that full log is asking for trouble. In fact I'll be ok/happy if we just remove the other two modes :)
Title: Re: Custom make commands are never executed
Post by: Jenna on March 11, 2012, 06:14:44 pm
Good to hear that calling sudo works, but what I wanted to say, is that it is not guaranteed to work in any cases.

The other thing (not using the correct make-command if not full commandline logging is set) is definitely a bug and will be fixed as soon as possible.

When a fix will make it into ubuntu's repo is their (the ubuntu maintainer's) decision.

Alternatively you can use my repo (see my sig), if the bug is fixed and I uploaded a new version.

The counting of warnings and errors works here in all cases.
A warning can be treated as error in some cases, because we use regexes to parse the output.

If you can copy the warning-message treated as error, it might be able to fix this.

If you use localized versions of gcc, it might break the regexes, in this case you have to fix it yourself, because we can not provide regexes for each and any probable localization. Or switch to engish, while compiling ( I have set LC_ALL to en_US.UTF-8 in my environment variables inside C::B).

[...]
I must say, I am shocked.
[...]
The way it is now, the software is absolutely useless, not even able to run an external makefile with a custom command without a trick (turning on full command line logging).
If you post such statements, you have to live with answers like the ones from MortenMacFly.

It's not very professional and to say C::B is absolutely useless is (sorry to say it that way) bullshit.
C::B has it's own very powerful build-system.
Using custom makefiles is not the normal usecase and it uses nearly nothing of the possibilities of C::B .

Nevertheless it should work without such bugs, but as you should know, there is not much software without bugs, so we are glad if a user finds and reports iussues.

And as the forum-rules clearly state:

Quote from: http://forums.codeblocks.org/index.php/topic,9996.0.html
6. Bug reports belong in the BerliOS project page. Don't expect the devs to crawl in the forums for a bug - we're NOT Google! The bug report webpage was made for a reason.

No need to do it in this case, I will fix it anyway.
But when you have registered here, you accpeted to follow these rules, so please calm down and be patient.
Title: Re: Custom make commands are never executed
Post by: Jenna on March 11, 2012, 06:18:03 pm
Our posts have crossed.
Please use LC_ALL=en_US.UTF-8 (or something similar) in envvar-plugin.
German messages can not be paresed correctly.

That does not guarantee your message to be parsed correctly, if it is not a message from compiler/linker, but from the make-command.
Title: Re: Custom make commands are never executed
Post by: Jenna on March 11, 2012, 06:30:36 pm
about the lower- and upper case-stuff:
environment-variables and user-defined fields in global variables are totally different. The later are not case-sensitive.
Title: Re: Custom make commands are never executed
Post by: kriegaex on March 11, 2012, 09:00:19 pm
Quote
Please don't use local attachments. Storage for the forum is limited and attachments get removed at random!

I am sorry, I was not aware of that fact. Maybe you better deactivate uploads if you prefer your users not to upload anything. (I mean it literally, ironic as it may sound - no misunderstandings again just because I use explicit instead of euphemistic language, please.) I have no intention of spamming your forum. As you can see I did not post full-sized screenshots but cut out the relevant parts and decreased the colour depth to 8 bit. The files are numerous, but really small.

Quote
It seems that I can reproduce your bug.

Cool, thank you. I will wait for the fix and then be happy to test it for you with my setup. :-)

Quote
Set the build command to 'xmessage -buttons "test" -center " tead" ' (build options->target->make commands->build project/target)
and then switching the log mode to something different than full log.

No change in behaviour: The command is only called for full log.

Quote
This is pretty strange, but calling it "quite buggy" is harsh, in fact this could be regarded as feature, because using anything that full log is asking for trouble. In fact I'll be ok/happy if we just remove the other two modes

I guess that is a matter of perspective. I wonder how anyone could regard it a feature that custom commands are not executed with the default log options, but are with another setting. Please do not be angry at me if I say that, but if your default mode - which I think is really nice and useful except for the fact that it does not work at the moment (but this can easily be fixed, no problem) - does not work and you think it calls for trouble, why does that mode (a) exist at all and why is it (b) the default? No, please do not remove something useful, just do not be annoyed if your users find bugs and try to help you spot and fix them. This is part of the normal software lifecycle. I was just wondering why I was the first user finding that bug because it is so obvious. I guess that 99% of your users do not use external makefiles, but the internal build system, which makes sense for self-developed software. But as I said, I just want to patch and debug a piece of standard software with a set of existing, complex makefiles which I have no intention of changing. I was just adding a new MC featue (ash/dash subshell support + two bugfixes for existing subshells) and thought it would be a nice test for C::B's debugging front-end to test MC in C::B. Actually, I have not gotten that far just yet because I am discussing this issue here with you, but I think it is well worth the time to improve a product which obviously many other users are satisfied with.

When I was calling C::B useless, I meant it was useless for my specific use case, not all in all and for many other use cases. My remark had a context. So no, I will not accept answers like the one by MortenMacFly. There is no reason to feel insulted just because a user puts his finger into a wound, i.e. he reports bugs.

An IDE has three main use cases: edit code, build, debug. The second one was not working for me, so maybe you understand that in this context the program was useless for me. But now I know a workaround and am confident that the bug(s) will soon be fixed, so I will hang on and continue using C::B. Quality of software is one criterion for me to use software, quality of customer service another one. We had a bad start, but I guess now we are getting closer to finding a solution for the technical problems I detected in your product. This is fine with me.

Quote
Good to hear that calling sudo works, but what I wanted to say, is that it is not guaranteed to work in any cases.

Why should it not? It is a subprocess like any other, too. The GUI dialog is the only way to enter the password because your console is not a real tty. This is exactly what SUDO_ASKPASS was invented for and it works with each editor or IDE I know. As I said, it is independent from or orthogonal to C::B.

Quote
Alternatively you can use my repo (see my sig), if the bug is fixed and I uploaded a new version.

Thanks for your kind invitation, I am going to accept it. If you help me by fixing a bug, I will help you with testing and feedback. That's the deal. As we say in Germany: One hand washes the other one.

Quote
The counting of warnings and errors works here in all cases. (...) If you use localized versions of gcc, it might break the regexes, in this case you have to fix it yourself, because we can not provide regexes for each and any probable localization. Or switch to engish, while compiling ( I have set LC_ALL to en_US.UTF-8 in my environment variables inside C::B).

Yes, that must be it. I did not know that English was the only language supported by C::B, but on second thought, the menu is in English, so I could have concluded from that. I will just use LANG=C (I am on ISO-8859-15 here, not UTF-8, because I often develop for an embedded system with a cross-compiler, and the target system only supports latin1 character set). A quick test shows that the warning is interpreted correctly then.

Some ideas for improvement:

As for your suggestion to post bug reports at BerliOS, you can be sure I will do that next time. You are 100% right that if there is a ticket system, it should be used. When I was first posting here I was just not sure if as a newbie I should ring the alarm right away or first try to get some feedback in a user forum. I decided to do the latter and am sorry if this was the wrong place. I usually (not always) try first to ask experienced co-users before I consume precious developer time. But when I am sure that what I consider a bug really is one, I create tickets. If you like to have one for reference, I can do that anyway.

Quote
about the lower- and upper case-stuff: environment-variables and user-defined fields in global variables are totally different. The later are not case-sensitive.

Sorry to say that, but if a menu option is called "Global variables" and the dialogue title is "Global variable editor" and it even works to use a global variable as an environment variable (no matter if it is printed in lower-case when I re-open the dialogue), it is kind of counter-intuitive to assume there is a difference. I have to admit though, that if I had RTFM I probably should have known. Mea culpa. So now that I know it, I will use "Build options" - "Custom variables" which hopefully is the right place. But as it is project-specific and I wanted to set the variable for all projects once and for all, I (falsely) figured that "Global variables" was the right place. BTW, is there a way to set my variable globally for C::B (other than doing it before calling C::B, I mean).
Title: Re: Custom make commands are never executed
Post by: oBFusCATed on March 11, 2012, 09:12:07 pm
...I wonder how anyone could regard it a feature that custom commands are not executed with the default log options, but are with another setting...
It stimulates people to use the full log. :)
In fact using anything other than the full log in custom make file project is asking for trouble. :)
As I said, I'd prefer there were no other options.
Title: Re: Custom make commands are never executed
Post by: Jenna on March 12, 2012, 06:37:02 am
Quote
about the lower- and upper case-stuff: environment-variables and user-defined fields in global variables are totally different. The later are not case-sensitive.

Sorry to say that, but if a menu option is called "Global variables" and the dialogue title is "Global variable editor" and it even works to use a global variable as an environment variable (no matter if it is printed in lower-case when I re-open the dialogue), it is kind of counter-intuitive to assume there is a difference. I have to admit though, that if I had RTFM I probably should have known. Mea culpa. So now that I know it, I will use "Build options" - "Custom variables" which hopefully is the right place. But as it is project-specific and I wanted to set the variable for all projects once and for all, I (falsely) figured that "Global variables" was the right place. BTW, is there a way to set my variable globally for C::B (other than doing it before calling C::B, I mean).

In the default.conf you attached erlier, you did not use a global variable for this, and it would not work, but you have set an environmemnt variable:
Code
       <envvars>
                <sets>
                        <default>
                                <ENVVAR0>
                                        <str>
                                                <![CDATA[1|SUDO_ASKPASS|/usr/lib/openssh/gnome-ssh-askpass]]>
                                        </str>
                                </ENVVAR0>
                        </default>
                </sets>
                <ACTIVE_SET>
                        <str>
                                <![CDATA[default]]>
                        </str>
                </ACTIVE_SET>
                <DEBUG_LOG bool="0" />
        </envvars>
that's most likely the cause, why it works.
It's in "Settings -> Environment -> Environment variables", if the contrib-plugins-package is installed.

The make command not working as expected is not really a bug, but a design flaw, that's near a bug, because it's really not intuitive.
When I reworked the makefile stuff some years ago, I decided to use a special command for silent output (just show tasks or no output at all), it's in the last text-control on the make-commands tab.
I can't remember why I did it that way, but I will change it and use the same command like for full commandline logging and pipe the standard output against /dev/null (or nul on windows). If that works as expected, I will commit the changes.
Title: Re: Custom make commands are never executed
Post by: Jenna on March 12, 2012, 08:20:27 am
Some ideas for improvement:
  • If make returns with exit code 0 (zero), it would be smart to assume that there were warnings, but no errors, otherwise the exit code would be !=0.
  • If you know that you only support the English version of make, maybe you could set the environment (LC_ALL or whatever is appropriate) as necessary by yourself , so you are in control of how you parse make's output. This is what my shell scripts with regexes do if I know they only work for English.

There is no guarantee, that each an every possible make command works this way.
In fact gnu-make returns 2, if an error occurs and 1 if it was called qith -q and a rebuild of any of the targets is needed.

Forcing LC_ALL or whatever makes sense on windows or Mac does not make sense, because the user can have a modified version of the regexes, that would break if we force english as language in any cases.
Title: Re: Custom make commands are never executed
Post by: kriegaex on March 12, 2012, 10:36:29 am
In the default.conf you attached erlier, you did not use a global variable for this, and it would not work, but you have set an environmemnt variable:
(...)
that's most likely the cause, why it works.
It's in "Settings -> Environment -> Environment variables", if the contrib-plugins-package is installed.

You are right. I must have stumpled upon this option dialogue right after having installed C::B and forgotten about it, later wondered why the variable was gone and erroneously re-entered it in the wrong spot, global variables (as can be seen in one of my screenshots).

Talking about screenshots: In one of the screenshots above you also see the German warning ("Warnung") message you asked me to send, if you are still interested. If you ever have plans to localise the program or at least warning and error parsing, you can always run your (unit) tests for make/gcc output parsing with LANG=de_DE@euro or some UTF-8 equivalent. Maybe you could also just compare the localisation packages for the most important languages (whatever those may be, e.g. French, German, Spanish) directly to see all the relevant text strings beside each other. But for me personally English is just fine, as long as I know that I need to manually set it. In order to minimise your support efforts and the number of ticket and forum activity on this topic though, I guess it would be a good idea to find a way to make the default settings work out of the box. Defaults which do not work are always a problem in software, especially because newbies start with defaults. Unless you find a way to make it work out of the box, you could at least show a warning dialogue before issuing the make if the language settings are different from what you expect. Calling make -v test-wise to parse default output can help you determine if the language is English or not. (Just thinking aloud, there is not much thought or analysis behind it.) This would work regardless of the platform (Linux, Windows, MacOS). A popup like "Attention: Your language settings seem to be non-English. This might cause problems in build output parsing (errors, warnings). You might want to set a global environment variable which sets the console language to English." might be helpful, maybe including a wiki link which explains more details or provides platform-specific hints about how to do that. I guess 90+% of German users will probably install their OS in German. The same applies to other localisations.
Title: Re: Custom make commands are never executed
Post by: oBFusCATed on March 12, 2012, 11:58:10 am
Talking about screenshots: In one of the screenshots above you also see the German warning ("Warnung") message you asked me to send, if you are still interested. If you ever have plans to localise the program or at least warning and error parsing, you can always run your (unit) tests for make/gcc output parsing with LANG=de_DE@euro or some UTF-8 equivalent.
Unit tests? What is that?  :P ::)
Maybe you could also just compare the localisation packages for the most important languages (whatever those may be, e.g. French, German, Spanish) directly to see all the relevant text strings beside each other.
You're missing at least Chinese and Indian (all the variants).

But you're right that we should make Codeblocks work out of the box, when the user is using some non English locale.
But I doubt this will always work. What happens if the user has no en_US.utf8 or en_GB.utf8 locale installed?

@devs: have someone tried to force the locale inside the compiler plugin?

p.s. simple export LC_MESSAGES=... doesn't work for gcc on my CentOS 5.6, which is pretty strange.
Title: Re: Custom make commands are never executed
Post by: Jenna on March 12, 2012, 12:10:30 pm
It might be possible to have an annoying dialog which is called if wxLocale::GetSystemLanguage returns a non-english language.
But I don't know how reliable this function works.

@devs: have someone tried to force the locale inside the compiler plugin?

p.s. simple export LC_MESSAGES=... doesn't work for gcc on my CentOS 5.6, which is pretty strange.
I use LC_ALL in my envvars (set default).

And I try not to use localized software where ever possible, because it's much easier to search the web for issues, if you use default (in most cases english) settings.
Title: Re: Custom make commands are never executed
Post by: kriegaex on March 12, 2012, 12:51:38 pm
LC_ALL=C should always work (but do not take it for granted, I am not an expert there).

As for annoying dialogues, usually it works like this: They are shown, have a message and an additional checkbox, saying "don't annoy me again". So the user is free to choose is she likes to be reminded or not. Usually somehwre in the menu you can reset the warning dialogues so they are shown again.
Title: Re: Custom make commands are never executed
Post by: MortenMacFly on March 12, 2012, 01:36:58 pm
But I don't know how reliable this function works.
Well shouldn't we simply assume it works reliable? What other options do we have? I don't want to implement another I18N... ;-) I like the idea and would do it this way.

As for annoying dialogues, usually it works like this: [...]
C::B's annoying dialog already works like that. We just need to add the two-liner to show it, if needed.
Title: Re: Custom make commands are never executed
Post by: thomas on March 12, 2012, 09:08:49 pm
Quote
C::B's annoying dialog already works like that. We just need to add the two-liner to show it, if needed.
No need, this has been in preferences (under environment) for years.

As for localization, I don't think we should be doing anything. No matter what angle you look at it, localization is a lot of shit, both in general and in particular. It goes far beyond replacing "Warning" with "Warnung".
In the light of the trouble involved, I think it's acceptable to expect a developer to run the compiler without localization. It's what 100% of the German developers in the dev team do too, as far as I know :)
Title: Re: Custom make commands are never executed
Post by: MortenMacFly on March 13, 2012, 06:54:19 am
Quote
C::B's annoying dialog already works like that. We just need to add the two-liner to show it, if needed.
No need, this has been in preferences (under environment) for years.
What has been there? That you get a warning when you issue C::B under a localised environment? I don't think so. The idea here is, that in the case you run C::B under "de_DE" or alike you get an initial warning (i.e. at first startup) that using a localised compiler - which is likely in that case - may screw the regexes / output parsing. We don't have that under "environment", do we?!

The only issue I see is that of course this only applies to compiler actually using localisation and where you actually can disable it. If I think about VC (for example) this is not the case. So the warning should say something like:
"Be aware that using a locale other than neutral / English might break the compiler output parsing of Code::Blocks build system. Either you switch your locale to English, or you need to adjust the RegEx parsing in the advanced compiler options, if needed. This might not apply to compilers other than GCC."
Title: Re: Custom make commands are never executed
Post by: kriegaex on March 13, 2012, 12:28:17 pm
C::B's annoying dialog already works like that.

I know, this is why I quoted it. I thought the chance to get it this way would be good because the effort would probably be small. ;-)

Quote from: thomas
No matter what angle you look at it, localization is a lot of shit, both in general and in particular.

I translate this to "localisation should be done right and is a lot of work". Then I agree. If you do think it is a lot of shit, I strongly disagree. Even though I am fluent in English and have no problem using C::B in English (if it works out of the box in a localised environment, that is), I think localisation is helpful and I enjoy using software in my mother tongue. So do a billion or so other people. Software is made for users, not for the developers who build it (only if the developers care to be the only users). And users run software in the context of a (possibly localised) OS. Not doing localisation because of scarce development resources and other priorities is okay, but not doing it because of an attitude like "it is a lot of shit" is just being lazy and snobby. So as I said, thomas, I guess you probably meant "hard to do" or "a lot of work".
Title: Re: Custom make commands are never executed
Post by: Jenna on March 14, 2012, 01:01:41 am
The actual packages on my server have the fixes for your issue.
See http://apt.jenslody.de/ (http://apt.jenslody.de/) for information how to use it.
Title: Re: Custom make commands are never executed
Post by: kriegaex on March 14, 2012, 12:11:20 pm
Thanks Jens. A few questions in advance because I am not a package management expert:

Sorry for so many questions, I want to test, but not break anything here. If there is an FAQ or wiki page answering these questions already, just point me to it, please.
Title: Re: Custom make commands are never executed
Post by: Jenna on March 14, 2012, 01:38:09 pm
Thanks Jens. A few questions in advance because I am not a package management expert:
  • Can I somehow install the package in parallel to the Ubuntu 11.10 one? If so, how?
No.
  • If not: How stable is your trunk? Depending on your SCM policy it could be stable or not.
I use it for my daily work,
  • If I temporarily upgrade my installation, can I downgrade again without trouble for config and project files? If so, how do I do that?
Yes, you have to remove my repo from the sources list and most likely uninstall C::B completeley and than reinstall the ubuntu version.
  • Is the patch optionally available for the version on which the Ubuntu package is based?
No, I don't know on which version their package is based, but backporting it should not be too hard (it's svn r7895).
Sorry for so many questions, I want to test, but not break anything here. If there is an FAQ or wiki page answering these questions already, just point me to it, please.
No problem.
Title: Re: Custom make commands are never executed
Post by: kriegaex on March 14, 2012, 02:01:36 pm
I wrote it earlier in this thread: The "about" dialogue in Ubuntu 11.10 says: "svn 7671".

Thanks for your patience. I am gonna test it later this afternoon. :-)
Title: Re: Custom make commands are never executed
Post by: kriegaex on March 14, 2012, 02:27:51 pm
Okay, I just quickly tested the version from your repository, Jens. It was a bit tedious to get it running because I have Ubuntu, so I had to also switch the wxwidgets repo, as described on your info page. After that, the plugin for global variables (where I defined my SUDO_ASKPASS) was gone because package "codeblocks-contrib" had been deactivated before and needed to be reinstalled. Even after reinstallation and even though I had not saved the project changes from the previous try and even though the variable was visible in the plugin's dialogue, it was not used. Only after I dummy-edited it and re-applied it, it was used. Very strange.

Anyway, I am filing this under one-time "upgrade / repo switch issues". As for the bugfix: It works. I hereby confirm that in my environment I can now use the combination of "task description" logging mode and custom make commands as expected. For instance, my "sudo -A $make ..." is executed as specified.

Thanks for your swift reaction and for your help, which is appreciated.
Title: Re: Custom make commands are never executed
Post by: thomas on March 15, 2012, 12:07:29 pm
I translate this to "localisation should be done right and is a lot of work".
I really meant to say that it's a lot of shit, but you can translate it to "does not work, adds more trouble, and besides is not done properly anywhere" if it makes you feel better.  :)

One of the biggest issues I have with localization, ignoring the technical aspects for a moment, is that I'm unable to understand what some of the weird, made-up words refer to at all. In case you assumed something different, my native language is German, by the way. English is only my third language, yet I'm able to understand technical documents in their original language better than the raped-language localizations. Try and find a German D&D rulebook (I may be 15-20 years late, does that still exist nowadays?) in your local bookstore. You'll be wondering whether you're reading Chinese.

Another issue I have with localization, especially with software, is that in addition to being ultra-hard, the people implementing it are just dumb. I don't know why it is that way. Try and use Excel (or OO Calc, if you will) in German, and do something real, that is something other than adding 3 numbers. You will go mental. If that isn't enough yet, take a spreadsheet from an English machine, edit a formula on the German installation, and take it back to the original one. I've seen people who have 10+ years of 40-hour-per-week work experience despair on this one.

Now, for the technical issues, it's not just encodings and different words, or pure GUI issues (such as right-to-left text or messages that surprisingly take twice as many words or characters, which suddenly won't fit) you're dealing with, but also entirely different word order / syntax as well as some really strange bends (as e.g. the same word being spelled differently under some condition or mandatory ligatures, and other oddities).

So really, replacing "Warning" with "Warnung" just won't cut it. Incidentially it probably does in this very simple case, but once you start allowing localization, you must also support the 7,512,134 non-trivial cases. Which means that every time it does not work because Chinese mandates that "fung" must use a different symbol after "wang" but not if "zong" follows, except on tuesdays, in which case you must write all numbers in reverse order, too, someone will complain. And, honestly, they will have every right to complain, because you tell them it works, yet it doesn't, all they get is nonsense.

So, my stance is that since everyone else fails more than miserably at doing it, and you will therefore likely fail too, it's just best to use something that works. Fine with translating menu items if people really feel uncomfortable not having these in their own language, fine with translating some dialogs, but when it comes to the real programming stuff that must work, such as communicating with a sub-program -- stop. Otherwise, one could as well localize C, replacing int with ganzzahl and while with während. :)

The best solution would of course be to communicate with sub-programs in a language-agnostic way, using some binary interface. Since this doesn't exist (and if it did, there would never be an agreement on a standard, at least not in this millenium), English is the least troublesome. Incidentially, it's the best choice for users too, since they will be able to google some weird error message more easily in case they don't understand them.

But, this is just my opinion, and I very much realize that I'm probably alone in the world. Same for smartphones and tablet PCs, and Kindle. And goatees, and tattoos. O tempora, o mores.
Title: Re: Custom make commands are never executed
Post by: MortenMacFly on March 15, 2012, 12:33:11 pm
Otherwise, one could as well localize C, replacing int with ganzzahl and while with während. :)
That's what's done in Excel, btw. They really translated the VBA script language into other languages, too.

English is the least troublesome.
You are missing one vital thing here: Unless you are a good native English speaker, you'll fail with that approach, too because you'll certainly translate wrong some times which will also be hard to understand. But I agree that nothing is worse than English from non-native-speaker translated into another language (and maybe back).
Title: Re: Custom make commands are never executed
Post by: Jenna on March 15, 2012, 03:41:39 pm
But, this is just my opinion, and I very much realize that I'm probably alone in the world. Same for smartphones and tablet PCs, and Kindle. And goatees, and tattoos. O tempora, o mores.

You are not alone !