News:

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

Main Menu

Compiler flags go blank trouble shooting work

Started by stahta01, January 06, 2024, 09:20:28 PM

Previous topic - Next topic

stahta01

Symptom: The compiler setting -> compiler flags are blank/missing.

Work around delete the file "options_gcc.xml" which is under path %APPDATA%\CodeBlocks\share\codeblocks\compilers in windows

Known ways that cause the creation of the "options_gcc.xml" file.
1. Delete an "compiler flags".

Edit: This is a long term project; because it may have already been fixed or may require several things to be done to trigger the system.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

nenin

My case:
1. Project, used on different PC with different compiler:
<Option compiler="nixman_131_ucrt_win32_gnu_gcc_64" /> 
was opened in C::B.
2. It proposed me to change non-existing compiler with incorrect one.
3. I choose correct.
4. I applied changes on all targets.
Everything looks fine at that moment, but options_gcc.xml was generated. When I opened C::B next time, I got empty compiler flags.

nenin

This issue has a very poor reproducibility. In some rare cases compiler flags disappeared after "apply changes", something like 20% after next start of the C::B, and 80% cases are OK.

Miguel Gimenez

Can you attach the created xml file? I want to check if it is empty, damaged or what...

nenin


nenin

Likely this is an issue  from the same origins. GDB for toolchain configured as in attach, from actual 64 bit mingw. In C::B config it is OK:
- <nixman_gcc_132_64__compiler>
- <NAME>
- <str>
- <![CDATA[ Nixman GCC 13.2 64  Compiler
  ]]>
  </str>
  </NAME>
- <PARENT>
- <str>
- <![CDATA[ gcc
  ]]>
  </str>
  </PARENT>
- <MASTER_PATH>
- <str>
- <![CDATA[ C:\mingw64\nixman13_2w32u
  ]]>
  </str>
  </MASTER_PATH>
- <C_COMPILER>
- <str>
- <![CDATA[ x86_64-w64-mingw32-gcc.exe
  ]]>
  </str>
  </C_COMPILER>
- <CPP_COMPILER>
- <str>
- <![CDATA[ x86_64-w64-mingw32-c++.exe
  ]]>
  </str>
  </CPP_COMPILER>
- <LINKER>
- <str>
- <![CDATA[ x86_64-w64-mingw32-g++.exe
  ]]>
  </str>
  </LINKER>
- <DEBUGGER_CONFIG>
- <str>
- <![CDATA[ gdb_debugger:nix64
  ]]>
  </str>
  </DEBUGGER_CONFIG>
  </nixman_gcc_132_64__compiler>


where "nix64":

- <conf4>
- <NAME>
- <str>
- <![CDATA[ nix64
  ]]>
  </str>
  </NAME>
- <values>
- <EXECUTABLE_PATH>
- <str>
- <![CDATA[ C:\mingw64\nixman13_2w32u\bin\gdb.exe
  ]]>
  </str>
  </EXECUTABLE_PATH>
  <DISABLE_INIT bool="1" />
- <USER_ARGUMENTS>
- <str>
- <![CDATA[
  ]]>
  </str>
  </USER_ARGUMENTS>
  <TYPE int="0" />
- <INIT_COMMANDS>
- <str>
- <![CDATA[ source $(TARGET_COMPILER_DIR)etc/gdbinit
set print elements 100
  ]]>
  </str>
  </INIT_COMMANDS>
  <WATCH_ARGS bool="1" />
  <WATCH_LOCALS bool="1" />
  <CATCH_EXCEPTIONS bool="1" />
  <EVAL_TOOLTIP bool="0" />
  <ADD_OTHER_SEARCH_DIRS bool="0" />
  <DO_NOT_RUN bool="0" />
  <DISASSEMBLY_FLAVOR int="0" />
- <INSTRUCTION_SET>
- <str>
- <![CDATA[
  ]]>
  </str>
  </INSTRUCTION_SET>
  </values>
  </conf4>




Actually called "Default" GDB (invalid)
Starting debugger: c:\mingw32\gdb64\bin\gdb.exe -fullname -quiet  -args Q:/mingw64/projects/****
failed