Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 706240 - sys-devel/gcc: gcc -dumpversion should contain only numbers (breaks at least firefox)
Summary: sys-devel/gcc: gcc -dumpversion should contain only numbers (breaks at least ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-01-24 15:14 UTC by Sergei Trofimovich (RETIRED)
Modified: 2020-01-26 20:55 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
www-client:firefox-72.0.2:20200124-150535.log (www-client:firefox-72.0.2:20200124-150535.log,70.90 KB, text/x-log)
2020-01-24 15:14 UTC, Sergei Trofimovich (RETIRED)
Details
0001-security-nss-coreconf-werror.py-allow-non-numeric-su.patch (0001-security-nss-coreconf-werror.py-allow-non-numeric-su.patch,1.66 KB, patch)
2020-01-24 15:25 UTC, Sergei Trofimovich (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich (RETIRED) gentoo-dev 2020-01-24 15:14:34 UTC
Created attachment 604136 [details]
www-client:firefox-72.0.2:20200124-150535.log

$ gcc -dumpversion
10.0.0-pre9999

Relevant build failure:

 0:41.36 Traceback (most recent call last):
 0:41.36   File "./coreconf/werror.py", line 60, in <module>
 0:41.36     main()
 0:41.36   File "./coreconf/werror.py", line 37, in main
 0:41.36     if not can_enable():
 0:41.36   File "./coreconf/werror.py", line 29, in can_enable
 0:41.36     v = list(map(int, v))
 0:41.36 ValueError: invalid literal for int() with base 10: '0-pre9999'

Firefox assumes all components are numbers.
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2020-01-24 15:25:13 UTC
Created attachment 604140 [details, diff]
0001-security-nss-coreconf-werror.py-allow-non-numeric-su.patch
Comment 2 Jory A. Pratt gentoo-dev 2020-01-24 17:20:23 UTC
Please open upstream bug report and submit patch to them.
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2020-01-25 22:36:07 UTC
man gcc says we don't print conformant versions:

       -dumpversion
           Print the compiler version (for example, 3.0, 6.3.0 or 7)---and don't do anything else.  This is the compiler version used in filesystem paths and specs. Depending on how the compiler has been configured it can be just a single number (major version), two numbers separated by a dot (major and minor version) or three numbers separated by dots (major, minor and patchlevel version).

       -dumpfullversion
           Print the full compiler version---and don't do anything else. The output is always three numbers separated by dots, major, minor and patchlevel version.

We should have number-only versions.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2020-01-25 22:37:52 UTC
Freshy built vanilla gcc master reports the following:

  $ ./gcc/xgcc -Bgcc -dumpversion
  10.0.1

  $ ./gcc/xgcc -v
  ...
  Configured with: ../gcc/configure
  ...
  gcc version 10.0.1 20200122 (experimental) (GCC)

We can do something like 10.0.9999.
Comment 5 Larry the Git Cow gentoo-dev 2020-01-26 20:55:39 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1baad49bb596a829836937b88d79249cd4df027

commit d1baad49bb596a829836937b88d79249cd4df027
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-01-26 19:31:20 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-01-26 20:55:33 +0000

    sys-devel/gcc: match live ebuild version with upstream's
    
    Closes: https://bugs.gentoo.org/706240
    Package-Manager: Portage-2.3.85, Repoman-2.3.20
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 sys-devel/gcc/{gcc-10.0.0_pre9999.ebuild => gcc-10.0.1_pre9999.ebuild} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=068669eb1bc72cb3a4dcb589dc37739e04e174a9

commit 068669eb1bc72cb3a4dcb589dc37739e04e174a9
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-01-26 19:29:54 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-01-26 20:55:32 +0000

    toolchain.eclass: don't override release vesion, assert it instead
    
    Closes: https://bugs.gentoo.org/706240
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 eclass/toolchain.eclass | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)