Bug 1668230 - FFI.cdef() prints WARNING: yacc table file version is out of date
Summary: FFI.cdef() prints WARNING: yacc table file version is out of date
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pycparser
Version: rawhide
Hardware: All
OS: Linux
high
low
Target Milestone: ---
Assignee: Eric Smith
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1336913
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-22 09:15 UTC by Jan Pazdziora
Modified: 2023-09-14 04:45 UTC (History)
5 users (show)

Fixed In Version: python-pycparser-2.14-18.fc30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1336913
Environment:
Last Closed: 2019-03-31 00:03:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jan Pazdziora 2019-01-22 09:15:29 UTC
+++ This bug was initially created as a clone of Bug #1336913 +++

With a fresh fc24 install, ipa-client-install prints the following warning:

# ipa-client-install -N
WARNING: yacc table file version is out of date
Discovery was successful!

and then proceeds to configure the client as normal.  Nothing seems to be broken, but I didn't do anything obviously odd and this warning is esoteric.

[...]

--- Additional comment from Fedora Update System on 2016-07-12 17:01:29 CEST ---

python-pycparser-2.14-6.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 1 Jan Pazdziora 2019-01-22 09:18:27 UTC
The issue is back in Fedora rawhide with python3-pycparser-2.14-15.fc29.noarch.

With

(1/3): python3-ply-3.11-1.fc30.noarch.rpm       106 kB/s | 107 kB     00:01    
(2/3): python3-pycparser-2.14-15.fc29.noarch.rp 144 kB/s | 146 kB     00:01    
(3/3): python3-cffi-1.11.5-6.fc30.x86_64.rpm    226 kB/s | 230 kB     00:01    

installed, running python3 with the snippet from bug 1336913 comment 6 causes lextab.py and yacctab.py to be created in the current directory.

Also, that snippet code actually produces some tracebacks as well:

# python3
Python 3.7.2 (default, Jan  2 2019, 11:32:51) 
[GCC 8.2.1 20181215 (Red Hat 8.2.1-6)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from cffi import FFI
>>> _ffi = FFI()
>>> _ffi.cdef("""
... ... int rpmvercmp (const char *a, const char *b);
... ... """)
WARNING: yacc table file version is out of date
Traceback (most recent call last):
  File "/usr/lib64/python3.7/site-packages/cffi/cparser.py", line 276, in _parse
    ast = _get_parser().parse(fullcsource)
  File "/usr/lib/python3.7/site-packages/pycparser/c_parser.py", line 146, in parse
    debug=debuglevel)
  File "/usr/lib/python3.7/site-packages/ply/yacc.py", line 333, in parse
    return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
  File "/usr/lib/python3.7/site-packages/ply/yacc.py", line 1201, in parseopt_notrack
    tok = call_errorfunc(self.errorfunc, errtoken, self)
  File "/usr/lib/python3.7/site-packages/ply/yacc.py", line 192, in call_errorfunc
    r = errorfunc(token)
  File "/usr/lib/python3.7/site-packages/pycparser/c_parser.py", line 1682, in p_error
    self._parse_error('At end of input', '')
  File "/usr/lib/python3.7/site-packages/pycparser/plyparser.py", line 55, in _parse_error
    raise ParseError("%s: %s" % (coord, msg))
pycparser.plyparser.ParseError: : At end of input

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 3, in <module>
  File "/usr/lib64/python3.7/site-packages/cffi/api.py", line 107, in cdef
    self._cdef(csource, override=override, packed=packed)
  File "/usr/lib64/python3.7/site-packages/cffi/api.py", line 121, in _cdef
    self._parser.parse(csource, override=override, **options)
  File "/usr/lib64/python3.7/site-packages/cffi/cparser.py", line 315, in parse
    self._internal_parse(csource)
  File "/usr/lib64/python3.7/site-packages/cffi/cparser.py", line 320, in _internal_parse
    ast, macros, csource = self._parse(csource)
  File "/usr/lib64/python3.7/site-packages/cffi/cparser.py", line 278, in _parse
    self.convert_pycparser_error(e, csource)
  File "/usr/lib64/python3.7/site-packages/cffi/cparser.py", line 307, in convert_pycparser_error
    raise CDefError(msg)
cffi.error.CDefError: parse error
: At end of input
>>>

Comment 2 Christian Heimes 2019-01-22 09:29:54 UTC
The regeneration of yacctab is caused by a packaging mismatch between python3-pycparser and python-ply. Fedora 30 has python-ply-3.11-1.fc30 but python-pycparsing was created with python-ply-3.9-8.fc29. The new version of python-ply has tabversion 3.10, but the yacctab of python-pycparser-2.14-15 has tabversion 3.8. Since the tabversion number is different, the pre-generated yacctab is not compatible and is rebuilt automatically. Please rebuild pycparser with latest ply.

In order to prevent this issue in the future, the pycparser package should have a hard dependency on the tabversion provided by python-ply.

Comment 3 Orion Poplawski 2019-01-22 14:57:42 UTC
Re-assigning to the proper component (python3-pycparser is for EPEL only)

Comment 4 Jan Pazdziora 2019-02-13 15:46:02 UTC
Hello, any chance of getting the package rebuilt and this issue fixed? Looking at https://koji.fedoraproject.org/koji/packageinfo?packageID=16664, the automatic rebuilds that rel-eng does failed ...

Comment 5 Christian Heimes 2019-02-26 10:30:06 UTC
https://src.fedoraproject.org/rpms/python-pycparser/pull-request/2#request_diff addresses the mass-rebuild issue and introduced a harder version dependency on python-ply to avoid the "yacc table file version is out of date" problem in the future.

Comment 6 Jan Pazdziora 2019-03-07 14:45:22 UTC
I can see that the pull request was merged and python-pycparser-2.14-18.fc31 was built for rawhide: https://koji.fedoraproject.org/koji/buildinfo?buildID=1220953.

However, since this bugzilla was filed, Fedora 30 was branched, so the patch and new build is also needed on the f30 branch and in f30 target.

Comment 7 Alexander Bokovoy 2019-03-18 09:03:47 UTC
Eric, is it possible to get F30 build as well?

Comment 8 Fedora Update System 2019-03-18 19:24:11 UTC
python-pycparser-2.14-18.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-ed16a6840b

Comment 9 Fedora Update System 2019-03-21 19:11:07 UTC
python-pycparser-2.14-18.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-ed16a6840b

Comment 10 Fedora Update System 2019-03-31 00:03:12 UTC
python-pycparser-2.14-18.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Red Hat Bugzilla 2023-09-14 04:45:24 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


Note You need to log in before you can comment on or make changes to this bug.