Author Topic: invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]? Toolchain path?  (Read 27787 times)

Sethpaladin1

  • Guest
"Seth2 - Debug" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Probably the toolchain path within the compiler options is not setup correctly?! Skipping...
Nothing to be done.

That is the exact message I recieved, and any compiler I use has the same message. Can anyone tell me what's wrong? I didn't even change the script from the "Hello World" starter script.

Edit: This message appears under the Build Log tab under "Logs and others", This is Code::Blocks 10.05, And I have tried modifying some of the toolchain executables, but nothing I do seems to work, and I am rather new to all this, so I have no clue as what to do...
« Last Edit: August 27, 2010, 06:38:12 pm by Sethpaladin1 »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11715
    • Travis build status
Hm, What about searching for the "invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]" using the forum's search engine or even better directly in google?

Every forum has the rule "search before posting" and you've violated it, as probably 100-200 other people, that have created the same thread as you did!
Also, you've violated another rule by not specifying your compiler and os versions!
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
At least he read the 'toolchain' part, or so it seems, yet he does not know what it is. How hard would it be to provide a link in the log that opens the compiler settings and takes the user to the toolchain tab? Probably a message in there that gives the user an idea of what to do with it,  or perhaps a button that shows a dialog with a longer explanation of what it is all about. A link to a sticky thread that explains it would also work (kind of a kb).

If we can give the user a better solution in the IDE itself (probably with the link), that will hopefully save us from scaring off all new users who do not search before posting.

[edit]
Now that I think of... the link could send the user to an article in the wiki, which could work as our kb-like thing.
[/edit]
« Last Edit: August 27, 2010, 09:36:49 pm by Ceniza »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6507
    • My Best Post
If we can give the user a better solution in the IDE itself (probably with the link), that will hopefully save us from scaring off all new users who do not search before posting.

I agree; but, I have never been able to duplicate the problem without doing something really stupid; so feel free to write an Wiki page on the problem if you know exactly what most newbies are doing wrong. After having a Wiki page then would be the time to add the link to it.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
I agree; but, I have never been able to duplicate the problem without doing something really stupid; so feel free to write an Wiki page on the problem if you know exactly what most newbies are doing wrong. After having a Wiki page then would be the time to add the link to it.

Tim S.

I haven't had that problem, so I would not be able to write that one. However, I remember seeing a video in YouTube explaining how to install Code::Blocks and what to do in case that error occurred (it occurred in the video). I think the link was somewhere in the forums...

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Newer revisions of C::B give this error-message:
Quote
The compiler's setup is invalid so Code::Blocks cannot find/run the compiler. Probably the toolchain path within the compiler options is not setup correctly?! Skipping...
It might be easier to understand.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6507
    • My Best Post
Based on the Times I helped users on this issue the three top causes are

1. User does not have an compiler installed
2. C::B is not configured right to use the installed compiler
3. The user did NOT install the Compiler Correctly; example missing part of the MinGW installation
4. The user's project uses a different Compiler than the one they configured.

Edit: Added number 4 on 2010-12-30

Note: Most users never confirmed the fix or the problem; so the above is based on a very small sample size.

Tim S.
« Last Edit: December 30, 2010, 02:37:17 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9489
Newer revisions of C::B give this error-message:
Quote
The compiler's setup is invalid so Code::Blocks cannot find/run the compiler. Probably the toolchain path within the compiler options is not setup correctly?! Skipping...
It might be easier to understand.
I still have a little hope. But if that doesn't work how about implementing an automatic uninstall instead of this message... :lol:
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11715
    • Travis build status
Another feature to be considered is adding the message "WARNING: Search the forum before you post a question about this problem. If you skip the this search step, a kitty will be killed!"  :lol:
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Newer revisions of C::B give this error-message:
Quote
The compiler's setup is invalid so Code::Blocks cannot find/run the compiler. Probably the toolchain path within the compiler options is not setup correctly?! Skipping...
It might be easier to understand.

For a newbie... I don't think so. You may want to ask some people what they think "toolchain path" means. It must be like some sort of road/way, or something in it, that has a chain built with screwdrivers, wrenches and such, right?

My point is, the message is way too technical for the users who come here asking about it. That's why I proposed the link that could go to a Wiki article when that error occurs. The biggest issue seems to be that no one who could write the article can reproduce the problem.

I would also like to propose removing all threads about this problem that have been closed because the poster did not search for an answer. Hopefully, only threads with an answer will remain.

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
I think this is the video I watched before: http://www.youtube.com/watch?v=ec-yYMTUV3c (at 2:40).

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11715
    • Travis build status
Newer revisions of C::B give this error-message:
Quote
The compiler's setup is invalid so Code::Blocks cannot find/run the compiler. Probably the toolchain path within the compiler options is not setup correctly?! Skipping...
It might be easier to understand.

Probably it should be:
Quote
The compiler's setup is invalid so Code::Blocks cannot find/run the compiler. Probably the toolchain path within the compiler options is not setup correctly?!
To fix you compiler options go to "Settings -> Compiler & Debugger -> Compiler -> [the compiler used for current project/target] ->Toolchain executables" and verify that the path is correct.
Code::Blocks failed to find and execute: [full path to the executable]
Skipping...

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

bendwalk

  • Guest
In order to increase your pool of known solutions to this problem, I wanted to let you know that I had this issue and discovered I did not have a compiler installed.  I had assumed the compiler would have come with the Code::Blocks install, but a quick download later from http://tdm-gcc.tdragon.net/ and I had my compiler.  Then I just had to change the "Toolchains-executable" path to C:\MinGW32 and it worked for me.  However, the Auto-detect feature did not find it...

Thanks for all the tips across multiple threads. 

Offline Yamakuzure

  • Multiple posting newcomer
  • *
  • Posts: 20
Sorry for resurrecting this thread, but doing a forums search on the current error message "The compiler's setup is invalid so Code::Blocks cannot find/run the compiler. Probably the toolchain path within the compiler options is not setup correctly?! Skipping..." does _not_ find anything, and when searching for "compiler invalid" this thread is the top one with most "relevance" factor.
Based on the Times I helped users on this issue the three top causes are

1. User does not have an compiler installed.
Visual Studio 2008 with C/C++ and Service Pack 1 is installed on this machine.
2. C::B is not configured right to use the installed compiler.
Neither the Visual Studio's VC nor the VC/bin directory seems to be right. Debugging tools and SDK are set as additional paths.
When opening cmd the command cl.exe provides:
Code: [Select]
P:\Codeblocks>cl.exe
Microsoft (R) 32-Bit C/C++-Optimierungscompiler Version 15.00.30729.01 für 80x86

Copyright (C) Microsoft Corporation.  All rights reserved.

Syntax: cl [ Option... ] Dateiname... [ /link Linkeroption... ]
So path and environment are correctly set.
3. The user did NOT install the Compiler Correctly; example missing part of the MinGW installation
Visual Studio 2008 is working fine. Including nmake.exe, cdb.exe, link.exe and cl.exe from the command line.

I have tried deleting the default.conf file and restarting C::B with a new config. Autodetect works fine, setting all paths and toolchain executables by itself. But unfortunately that's all.

I was completely stuck here, because the message appears immediately when trying to compile. I had an issue with a folder not set in the path environment variable, so a .dll could not be found when trying to start cl.exe. But this issue is fixed.

How can I be sure that Code::Blocks _really_ tries to execute cl.exe in the specified path? And if it does why isn't there a message stating what went wrong?

My settings:
Compiler's installation directory: P:\VStudio2008\VC
C++ compiler: cl.exe
Code: [Select]
P:\VStudio2008\VC>dir /B bin\*.exe
bscmake.exe
cl.exe
cvtres.exe
dumpbin.exe
editbin.exe
lib.exe
link.exe
ml.exe
nmake.exe
pgocvt.exe
pgomgr.exe
pgosweep.exe
undname.exe
xdcmake.exe

So what is the solution here?

The solution is, that although Code::Blocks is correctly configured, the project is a cross-platform project copied from a linux machine.

If all your settings are correct, you might want to make sure, that the Build Options of your project show the same compiler used you set up. ;)

Cheers

P.S.: Edith fixed some typos, but probably not all...
« Last Edit: December 30, 2010, 01:15:16 pm by Yamakuzure »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11715
    • Travis build status
If all your settings are correct, you might want to make sure, that the Build Options of your project show the same compiler used you set up. ;)
So you fixed your problem?

@devs: Would you accept a patch that implements the error message I've suggested?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11715
    • Travis build status
If the compiler is invalid the full log doesn't help (it is empty).
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

CoolGuy

  • Guest
I stumbled upon this topic when i ran into the same problem earlier. I did everything that has already been suggested in this thread and non of it worked.

So for fun and games I decided to do exactly what the guy on the video did. I changed the default path of the installation from C:\program files to plain old C:\ and then tried to run the program and had the same error...I went into "Compiler and Debugger" just like the video, hit reset to defaults and voila it works!!!

Prior to this, I had hit reset to default about a billion times, changed compilers, changed toolchain etc and nothing changed (Only thing different I did was changing the installation path). Since this is the first thread that comes up when you search the issue I hope this can help create a quick solution for those who encounter this problem in the future.