Fedora Account System
Red Hat Associate
Red Hat Customer
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.
> /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?
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle. Changing version to 32.
Bill, could you please have look and report this upstream if needed? Thanks.
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.
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.