Bug 1951997 - gnumeric fails to build with Python 3.10: sys.version[0:3] returns Python version as 3.1 instead of 3.10
Summary: gnumeric fails to build with Python 3.10: sys.version[0:3] returns Python ver...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gnumeric
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Huzaifa S. Sidhpurwala
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1968810 (view as bug list)
Depends On:
Blocks: F35FTBFS F35FailsToInstall PYTHON3.10
TreeView+ depends on / blocked
 
Reported: 2021-04-21 09:50 UTC by Tomáš Hrnčiar
Modified: 2021-06-22 01:58 UTC (History)
7 users (show)

Fixed In Version: gnumeric-1.12.50-1.fc33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-13 19:45:00 UTC
Type: Bug


Attachments (Terms of Use)
Tentative minimal patch (730 bytes, patch)
2021-04-22 23:21 UTC, M Welinder
no flags Details | Diff

Description Tomáš Hrnčiar 2021-04-21 09:50:53 UTC
gnumeric fails to build with Python 3.10.0a7.

git grep sys.version
configure:    PY_VERSION=`$PYTHON -c 'import sys ; sys.stdout.write(sys.version[0:3])'`
configure:     major_ver=`$PYTHON -c 'import sys ; sys.stdout.write(sys.version[0:1])'`
configure.ac:    [PY_VERSION=`$PYTHON -c 'import sys ; sys.stdout.write(sys.version[0:3])'`
configure.ac:     major_ver=`$PYTHON -c 'import sys ; sys.stdout.write(sys.version[0:1])'`]

python3.10 -c 'import sys ; sys.stdout.write(sys.version[0:3])'
3.1

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/02141319-gnumeric/

For all our attempts to build gnumeric with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/gnumeric/

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.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, 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 Julian Sikorski 2021-04-21 10:10:40 UTC
Morten, it looks like something for upstream.

Comment 2 M Welinder 2021-04-21 16:24:46 UTC
I'll have a look.

That code is old enough to vote.  It's a wonder we didn't get bitten until now.

Comment 3 Petr Viktorin 2021-04-22 09:36:03 UTC
> It's a wonder we didn't get bitten until now.

That's nothing to wonder about -- 3.10 is Python's first double-digit minor version.

Comment 4 M Welinder 2021-04-22 23:21:29 UTC
Created attachment 1774631 [details]
Tentative minimal patch

This might work.

Comment 5 Miro Hrončok 2021-04-23 08:15:03 UTC
Suggestion: Use "{:d}".format(*sys.version_info) for major_ver (for consistency and future compatibility with Python 10+ -- this sounds silly now, but I guess so did Python 3.10+ once).

Comment 6 Miro Hrončok 2021-04-23 08:16:06 UTC
Ignore my previous comment. It is already compatible with Python 10+. I've misread str(sys.version_info[0]) as str(sys.version[0]).

Comment 7 Julian Sikorski 2021-04-25 13:35:07 UTC
The error is different now

make[3]: Leaving directory '/builddir/build/BUILD/gnumeric-1.12.49/plugins/python-loader'
/usr/bin/ld: cannot find -lpython

Comment 8 M Welinder 2021-04-25 13:51:27 UTC
Not good.

I cannot actually test this, so I hope I can lean on you for a bit of
debugging of what is going on here.

Comment 9 Miro Hrončok 2021-06-04 20:12:48 UTC
This is a mass-posted update. Sorry if it is not 100% accurate to this bugzilla.


The Python 3.10 rebuild is in progress in a Koji side tag. If you manage to fix the problem, please commit the fix in the rawhide branch, but don't build the package in regular rawhide.

You can either build the package in the side tag, with:

    $ fedpkg build --target=f35-python

Or you can the build and we will eventually build it for you.

Note that the rebuild is still in progress, so not all (build) dependencies of this package might be available right away.

Thanks.

See also https://fedoraproject.org/wiki/Changes/Python3.10

If you have general questions about the rebuild, please use this mailing list thread: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/G47SGOYIQLRDTWGOSLSWERZSSHXDEDH5/

Comment 10 Miro Hrončok 2021-06-07 22:57:47 UTC
The f35-python side tag has been merged to Rawhide. From now on, build as you would normally build.

Comment 11 Miro Hrončok 2021-06-08 11:15:27 UTC
*** Bug 1968810 has been marked as a duplicate of this bug. ***

Comment 12 Fedora Update System 2021-06-13 18:37:47 UTC
FEDORA-2021-5494c9f0c8 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-5494c9f0c8

Comment 13 Fedora Update System 2021-06-13 18:38:07 UTC
FEDORA-2021-81b91be750 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-81b91be750

Comment 14 Miro Hrončok 2021-06-13 19:45:00 UTC
Hello,

Please note that this comment was generated automatically. If you feel that this output has mistakes, please contact me via email (mhroncok).

All subpackages of a package against which this bug was filled are now installable or removed from Fedora 35.

Thanks for taking care of it!

Comment 15 Fedora Update System 2021-06-14 01:07:09 UTC
FEDORA-2021-5494c9f0c8 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-5494c9f0c8`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-5494c9f0c8

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 16 Fedora Update System 2021-06-14 02:01:25 UTC
FEDORA-2021-81b91be750 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-81b91be750`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-81b91be750

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 17 Fedora Update System 2021-06-22 01:01:27 UTC
FEDORA-2021-5494c9f0c8 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 18 Fedora Update System 2021-06-22 01:58:01 UTC
FEDORA-2021-81b91be750 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.


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