User forums > Using Code::Blocks

Names of compiler executables: Self-built vs Official

<< < (2/5) > >>

PB:

--- Quote from: stahta01 on June 30, 2021, 08:00:56 pm ---When you start Code::Blocks it runs a auto detect compiler routine!

--- End quote ---

When this may mean modifying my carefully set and working compiler settings behind my back, doing this may not be for the best.

And, how comes this does not happen with v20.03?

oBFusCATed:
Can you reproduce the problem reliably? Is any other setting getting lost?
We had some reports in the past that the default.conf file is truncated after a crash or some other unknown reason.
Could this be happening to you? Are you running multiple instances of C::B?

Auto-detection should happen only when your settings are clean/empty/on-first-run. If you see auto-detection in other cases it would be good if you could isolate the cause, so we could try to debug and fix the problem.

PB:

--- Quote from: oBFusCATed on June 30, 2021, 07:15:54 pm ---Try this patch and let me know if it works: https://sourceforge.net/p/codeblocks/tickets/374/#13f6

--- End quote ---

I tried and the only difference from v20.03 is that upon launching patched C::B, Compilers auto-detection dialog is shown with compiler "GNU GCC MingW64 Compiler" having "Invalid" status. The compilers in existing GCC-based toolchains are still prefixed with "mingw-"; however, those newly added ones (e.g., "GNU GCC MingW32 Compiler" or "GNU GCC TDM-32 Compiler" are not.

When I check that invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] in Global compiler settings, it has an empty installation directory. Additionally, its "Make program" is set to "make.exe" but I think it should be "mingw32-make.exe" just as in other mingw-based distributions?

PB:

--- Quote from: oBFusCATed on June 30, 2021, 09:13:56 pm ---Can you reproduce the problem reliably? Is any other setting getting lost?
We had some reports in the past that the default.conf file is truncated after a crash or some other unknown reason.
Could this be happening to you? Are you running multiple instances of C::B?

--- End quote ---

Yes, it is always the same when I run a nightly or a self-built C::B.

I have not noticed any other setting being lost.

I do not experience C::B crashes nor am I running its multiple instances.

If the config file were truncated; how comes the compiler settings are OK when I launch v20.03? I thought all the settings are shared, being stored in %APPDATA%\CodeBlocks?

But looking at the default.conf, my compiler settings for compiler "msys2-mingw-w64-i686" look like this

--- Code: ---<msys2_mingw_w64_i686>
    <NAME>
        <str>
            <![CDATA[msys2-mingw-w64-i686]]>
        </str>
    </NAME>
    <PARENT>
        <str>
            <![CDATA[gcc]]>
        </str>
    </PARENT>
    <MASTER_PATH>
        <str>
            <![CDATA[C:\msys64\mingw32]]>
        </str>
    </MASTER_PATH>
    <DEBUGGER_CONFIG>
        <str>
            <![CDATA[gdb_debugger:msys2-mingw-w64-i686]]>
        </str>
    </DEBUGGER_CONFIG>
</msys2_mingw_w64_i686>
--- End code ---

So it seems that the names of the executables are not actually stored in the file but assumed by C::B based on the "parent" compiler (here GCC). This was corroborated when I changed "C compiler" from "gcc.exe" to "agcc.exe" and saved the setting, resulting into
--- Code: ---<C_COMPILER>
    <str>
        <![CDATA[agcc.exe]]>
    </str>
</C_COMPILER>
--- End code ---
being added, so it appears only "overriden" settings such as executable names are actually stored in the default.conf. This explains why the settings keep being correct in v20.03 after being wrong in a self-built C::B.

But if no one else sees this, perhaps this is just some glitch on my setup, so you can safely label it a non-issue.

oBFusCATed:

--- Quote from: PB on June 30, 2021, 09:47:54 pm ---But if no one else sees this, perhaps this is just some glitch on my setup, so you can safely label it a non-issue.

--- End quote ---
Can you start from a clean state and try to reproduce the problem and post the exact steps?
Probably moving the whole %APPDATA%\CodeBlocks folder to the side would be enough to reset everything related to autodetection.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version