Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 642750 - sci-geosciences/grass-7.2.0 with gcc 7 - ValueError: invalid literal for long() with base 8: '08420217248550443400745280086994171'
Summary: sci-geosciences/grass-7.2.0 with gcc 7 - ValueError: invalid literal for long...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sam Jorna (wraeth)
Whiteboard: ~arch only
Keywords: PATCH
Depends on: 645892
Blocks: gcc-7
  Show dependency tree
Reported: 2017-12-30 18:25 UTC by Martin von Gagern
Modified: 2018-06-09 19:05 UTC (History)
4 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2017-12-30 18:25:23 UTC
sci-geosciences/grass-7.2.0 fails to re-build for me:

Traceback (most recent call last):
  File "./", line 139, in <module>
    descriptions = ctypesgencore.parser.parse(options.headers, options)
  File "/var/tmp/portage/sci-geosciences/grass-7.2.0/work/grass-7.2.0/lib/python/ctypes/ctypesgencore/parser/"
, line 22, in parse
  File "/var/tmp/portage/sci-geosciences/grass-7.2.0/work/grass-7.2.0/lib/python/ctypes/ctypesgencore/parser/datacollecti", line 74, in parse
    ctypesparser.CtypesParser.parse(self, fname, None)
  File "/var/tmp/portage/sci-geosciences/grass-7.2.0/work/grass-7.2.0/lib/python/ctypes/ctypesgencore/parser/",
 line 120, in parse
  File "/var/tmp/portage/sci-geosciences/grass-7.2.0/work/grass-7.2.0/lib/python/ctypes/ctypesgencore/parser/preprocessor
.py", line 218, in parse
    token = self.lexer.token()
  File "/var/tmp/portage/sci-geosciences/grass-7.2.0/work/grass-7.2.0/lib/python/ctypes/ctypesgencore/parser/preprocessor
.py", line 63, in token
    result = lex.Lexer.token(self)
  File "/var/tmp/portage/sci-geosciences/grass-7.2.0/work/grass-7.2.0/lib/python/ctypes/ctypesgencore/parser/", lin
e 355, in token
    newtok = func(tok)
  File "/var/tmp/portage/sci-geosciences/grass-7.2.0/work/grass-7.2.0/lib/python/ctypes/ctypesgencore/parser/", line 262, in t_ANY_int
    g1 = str(long(g1, 8))
ValueError: invalid literal for long() with base 8: '08420217248550443400745280086994171'
make[6]: *** [Makefile:102: OBJ.x86_64-pc-linux-gnu/] Error 1
make[6]: Leaving directory '/var/tmp/portage/sci-geosciences/grass-7.2.0/work/grass-7.2.0/lib/python/ctypes'

The build does not terminate straight away (which I consider a bad sign, who knows what other errors might go undetected…), but later down I get things like

    import grass.lib.gis as libgis
ImportError: No module named lib.gis

The issue is described upstream, related to gcc 7, and has a fix there:

So I fixed this locally using a user patch which could be included in portage:

# mkdir -p /etc/portage/patches/sci-geosciences/grass-7.2.0
# svn diff -c 71219 \
  > /etc/portage/patches/sci-geosciences/grass-7.2.0/commit71219.patch
Comment 1 Thomas Bettler 2018-02-01 20:21:31 UTC
This issue will be obsolete with grass-7.4
see bug #645892
Comment 2 Larry the Git Cow gentoo-dev 2018-04-04 21:09:44 UTC
The bug has been closed via the following commit(s):

commit 6ca4bd78d32c439cb0bdae189d3d309787fbbdb1
Author:     Andreas Sturmlechner <>
AuthorDate: 2018-04-04 20:42:47 +0000
Commit:     Andreas Sturmlechner <>
CommitDate: 2018-04-04 21:09:32 +0000

    sci-geosciences/grass: Fix build with GCC-7
    Thanks-to: Martin von Gagern <>
    Package-Manager: Portage-2.3.28, Repoman-2.3.9

 sci-geosciences/grass/files/grass-7.2.0-gcc7.patch | 94 ++++++++++++++++++++++
 sci-geosciences/grass/grass-7.2.0-r1.ebuild        |  1 +
 2 files changed, 95 insertions(+)