Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1791688 - gnucash fails to build with Python 3.9: -Werror=declaration-after-statement in _PyVectorcall_Function
Summary: gnucash fails to build with Python 3.9: -Werror=declaration-after-statement i...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: gnucash
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON39
TreeView+ depends on / blocked
 
Reported: 2020-01-16 11:37 UTC by Miro Hrončok
Modified: 2020-04-14 08:51 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-14 08:51:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2020-01-16 11:37:25 UTC
gnucash fails to build with Python 3.9.0a2:

In file included from /usr/include/python3.9/abstract.h:843,
                 from /usr/include/python3.9/Python.h:147,
                 from /builddir/build/BUILD/gnucash-3.7/libgnucash/core-utils/swig-core-utils-python.c:149:
/usr/include/python3.9/cpython/abstract.h: In function '_PyVectorcall_Function':
/usr/include/python3.9/cpython/abstract.h:69:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]


Python uses C99 features, gnucash should not -Werror on C90 warnings.

See https://www.python.org/dev/peps/pep-0007/#c-dialect



For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01145277-gnucash/

For all our attempts to build gnucash with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/gnucash/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.9:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Victor Stinner 2020-01-16 14:24:58 UTC
> /usr/include/python3.9/cpython/abstract.h:69:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

Python 3.6 uses C99: "Python versions greater than or equal to 3.6 use C89 with several select C99 features"
https://www.python.org/dev/peps/pep-0007/#c-dialect

Does gnucash explicitly asks for ISO C90 standard?

Comment 2 Ben Cotton 2020-02-11 17:34:56 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 3 Miro Hrončok 2020-03-16 12:41:47 UTC
Bill, could you please have look and report this upstream if needed? Thanks.

Comment 4 Bill Nottingham 2020-04-14 02:09:24 UTC
Sorry about the delay. Is this still a thing? I see the latest builds in the copr succeed.

AFAICT, there's no real reason for this other than a bunch of explicit -Werror and -Wdeclaration-after-statement in the CMake configuration.

Comment 5 Miro Hrončok 2020-04-14 08:51:07 UTC
Thanks, this is now indeed green (successful build).

> AFAICT, there's no real reason for this other than a bunch of explicit -Werror and -Wdeclaration-after-statement in the CMake configuration

Yes.


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