[build2] Installation Error on Manjaro

Matthew Krupcale mkrupcale at matthewkrupcale.com
Mon Apr 6 15:40:08 UTC 2020


On Mon, Apr 6, 2020 at 10:49 AM Boris Kolpackov <boris at codesynthesis.com> wrote:
> Uh, this is actually a messy problem that we've been trying to solve
> for some time now. The problem is that different translations change
> the format of the output from which we try to extract information,
> such as the compiler version. For example, in the above case they for
> some reason decided to throw away the word "version" and move the
> version itself to the end.

I wonder if it would be easier to use __GNUC__ preprocessor macros[1]
instead of trying to parse `gcc --version`. These are defined from
BASEVER[2], but this is only defined at GCC build time[3], whereas you
are given localized pkgversion_string and version_string in `gcc
--version`[4].

[1] https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html#Common-Predefined-Macros
[2] https://github.com/gcc-mirror/gcc/blob/c72a1b6f8b26de37d1a922a8af143af009747498/gcc/cppbuiltin.c#L57
[3] https://github.com/gcc-mirror/gcc/blob/c72a1b6f8b26de37d1a922a8af143af009747498/gcc/version.c#L30
[4] https://github.com/gcc-mirror/gcc/blob/c72a1b6f8b26de37d1a922a8af143af009747498/gcc/gcc.c#L8038

Matthew



More information about the users mailing list