Author Topic: Names of compiler executables: Self-built vs Official  (Read 15083 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Names of compiler executables: Self-built vs Official
« Reply #15 on: July 02, 2021, 07:59:30 pm »
My MSys2 mingw32/bin has "i686-w64-mingw32-" prefix are you sure you looked at the full folder?
Sorry, you are right I somehow managed to miss those files.

Although it seems that people moved away from MinGW to mingw-64, I have also downloaded the original MinGW package (with GCC 9.2). It has the unprefixed gcc and g++ executables and is the only package of all I tried having them also prefixed with "mingw32-".

The question remains: It seems that all relevant mingw distributions have gcc.exe and g++.exe so why use the prefix (be it correct or incorrect) for them?

I use the prefix because I have had the auto detect change the path without any warning!
Using the prefix I at least get an error with the bit type has switch!

Tim S.
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 PB

  • Multiple posting newcomer
  • *
  • Posts: 57
Re: Names of compiler executables: Self-built vs Official
« Reply #16 on: July 03, 2021, 08:24:12 am »
I use the prefix because I have had the auto detect change the path without any warning!
Using the prefix I at least get an error with the bit type has switch!

If by "I use the prefix" means that you changed the C::B code then I find this to be not the best solution to the above problem:
1. Only MinGW uses "mingw32-" prefix and AFAICT, this distribution has been on its way out and has been superseded by mingw-64.
2. Changing the "base" GCC compiler settings affects (read "breaks") the custom compiler configurations derived from it.

But again, I know little about C::B so I am probably missing something here.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Names of compiler executables: Self-built vs Official
« Reply #17 on: July 03, 2021, 05:26:02 pm »
I use the prefix because I have had the auto detect change the path without any warning!
Using the prefix I at least get an error with the bit type has switch!

If by "I use the prefix" means that you changed the C::B code then I find this to be not the best solution to the above problem:
1. Only MinGW uses "mingw32-" prefix and AFAICT, this distribution has been on its way out and has been superseded by mingw-64.
2. Changing the "base" GCC compiler settings affects (read "breaks") the custom compiler configurations derived from it.

But again, I know little about C::B so I am probably missing something here.

I USE THE CB GUI TO EDIT THE TOOLCHAIN SETTINGS!

Tim S.
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 PB

  • Multiple posting newcomer
  • *
  • Posts: 57
Re: Names of compiler executables: Self-built vs Official
« Reply #18 on: July 03, 2021, 09:24:27 pm »
I think I have half-solved the mystery.

In the code repo, the incorrect "mingw32-" prefix is there in the options_gcc.xml file (since at least 2013):
https://github.com/obfuscated/codeblocks_sf/blob/master/src/plugins/compilergcc/resources/compilers/options_gcc.xml#L5

However, in Code::Blocks v20.03 installation this file (as CodeBlocks\share\CodeBlocks\compilers\options_gcc.xml) is different and the prefix is not there. It also has a different date (2020/04/02) then all the other installed files which are dated 2020/03/14.

I used codeblocks-20.03-setup.exe installer but that file is the same (i.e., no prefix for g++.exe and gcc.exe on Windows) also in codeblocks-20.03-nosetup.zip. All Windows install packages on SourceForge are dated 2020/04/03 while Linux ones are from March.

So the conclusion is: Someone must have modified (removed the prefix) file options_gcc.xml used in the Code::Blocks v20.03 packages, at least the Windows ones. Who did this and why modify the file in the install package instead in the code repository is the unsolved half of the mystery.
« Last Edit: July 03, 2021, 09:31:51 pm by PB »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Names of compiler executables: Self-built vs Official
« Reply #19 on: July 03, 2021, 09:35:24 pm »
@PB have you checked the 20.03 branch if the file is the same there?
@killerbot, @morten can you comment on this?
(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 PB

  • Multiple posting newcomer
  • *
  • Posts: 57
Re: Names of compiler executables: Self-built vs Official
« Reply #20 on: July 03, 2021, 11:14:57 pm »
@PB have you checked the 20.03 branch if the file is the same there?

The prefix is there in the "release-20.03" branch:
https://github.com/obfuscated/codeblocks_sf/blob/release-20.03/src/plugins/compilergcc/resources/compilers/options_gcc.xml#L5
so the file is different from the one actually installed with 20.03, assuming this file ends up being "%ProgramFiles%\CodeBlocks\share\CodeBlocks\compilers\options_gcc.xml".
« Last Edit: July 03, 2021, 11:18:41 pm by PB »

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: Names of compiler executables: Self-built vs Official
« Reply #21 on: April 19, 2022, 05:43:44 am »
@Miguel Gimenez I just spotted this thread and based on the change I did earlier this year that caused problems I would expect there to be issues going from 20.03 to the latest SVN due to the opposite change. 

As per PB's post on 04 July 2021, 05:24:27, I also cannot find in the SVN history any changes to the options_gcc.xml that are applicable for the 20.03 release.