Author Topic: Compiler flags go blank trouble shooting work  (Read 2890 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7572
    • My Best Post
Compiler flags go blank trouble shooting work
« on: January 06, 2024, 09:20:28 pm »
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.
« Last Edit: January 06, 2024, 10:48:25 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline nenin

  • Almost regular
  • **
  • Posts: 199
Re: Compiler flags go blank trouble shooting work
« Reply #1 on: January 07, 2024, 01:51:21 pm »
My case:
1. Project, used on different PC with different compiler:
Code
 <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.

Offline nenin

  • Almost regular
  • **
  • Posts: 199
Re: Compiler flags go blank trouble shooting work
« Reply #2 on: January 07, 2024, 01:57:40 pm »
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.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1564
Re: Compiler flags go blank trouble shooting work
« Reply #3 on: January 07, 2024, 02:21:51 pm »
Can you attach the created xml file? I want to check if it is empty, damaged or what...

Offline nenin

  • Almost regular
  • **
  • Posts: 199
Re: Compiler flags go blank trouble shooting work
« Reply #4 on: January 07, 2024, 02:27:30 pm »
Can you attach the created xml file? I want to check if it is empty, damaged or what...
It is attached here:
https://forums.codeblocks.org/index.php/topic,25649.msg174606.html#msg174606
It is not empty for sure.

Offline nenin

  • Almost regular
  • **
  • Posts: 199
Re: Compiler flags go blank trouble shooting work
« Reply #5 on: January 08, 2024, 09:18:10 am »
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:
Code
- <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":

Code
- <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)
Code
Starting debugger: c:\mingw32\gdb64\bin\gdb.exe -fullname -quiet  -args Q:/mingw64/projects/****
failed