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 1743903 - uwsgi fails to build on Fedora 32
Summary: uwsgi fails to build on Fedora 32
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: uwsgi
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Jorge Gallegos
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F32FTBFS F32FailsToInstall PYTHON38
TreeView+ depends on / blocked
 
Reported: 2019-08-20 23:26 UTC by Miro Hrončok
Modified: 2019-09-14 15:59 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-14 15:59:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2019-08-20 23:26:52 UTC
uwsgi-2.0.18-3.fc32 failed to rebuild with Python 3.8.

See https://koji.fedoraproject.org/koji/buildinfo?buildID=1360729

The error is:

+ cd uwsgi-2.0.18
+ CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wno-error -Wno-unused-but-set-variable'
+ /usr/bin/python2 uwsgiconfig.py --build fedora.ini
BUILDSTDERR: /var/tmp/rpm-tmp.JgDz6v: line 32: /usr/bin/python2: No such file or directory

This issue is blocking the Python 3.8 rebuilds. If this package won't build with 3.8, it won't be installable, along with all its dependent packages, after the side tag is merged.
Furthermore, as it fails to install, its dependent packages will fail to install and/or build as well. 


The coordinated rebuild of Python 3.8 has started in the `f32-python` side tag.

If you figure out how to rebuild this package, please don't rebuild it in regular rawhide, but use the side tag instead:

    on branch master:
    $ fedpkg build --target=f32-python

To wait for a build to show up in the side tag, do:

    $ koji wait-repo f32-python --build=<nvr>

Where <nvr> is name-version-release of the source package, e.g. python-foo-1.1-2.fc32.

An updated mock config is posted at: http://copr.fedorainfracloud.org/coprs/g/python/python3.8/

Thanks. Let us know if you need up to date info, or if you have any questions.

Comment 1 Miro Hrončok 2019-08-20 23:29:42 UTC
I believe the %{with python2} conditional is not working properly here.

This section is OK:

%if %{with python2}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python2} uwsgiconfig.py --plugin plugins/python fedora
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python2} uwsgiconfig.py --plugin plugins/gevent fedora
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python2} uwsgiconfig.py --plugin plugins/tornado fedora
%endif
%if %{with python3}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3} uwsgiconfig.py --plugin plugins/python fedora python%{python3_pkgversion}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3} uwsgiconfig.py --plugin plugins/gevent fedora python%{python3_pkgversion}_gevent
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3} uwsgiconfig.py --plugin plugins/tornado fedora python%{python3_pkgversion}_tornado
%endif
%if %{with python3_other}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3_other} uwsgiconfig.py --plugin plugins/python fedora python%{python3_other_pkgversion}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python3_other} uwsgiconfig.py --plugin plugins/gevent fedora python%{python3_other_pkgversion}_gevent
%endif

But it further continues with:

%if %{with mongodblibs}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python2} uwsgiconfig.py --plugin plugins/mongodblog fedora
CFLAGS="%{optflags} -Wno-unused-but-set-variable -std=gnu++11 -Wno-error" %{__python2} uwsgiconfig.py --plugin plugins/stats_pusher_mongodb fedora
%endif
%if %{with mono}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python2} uwsgiconfig.py --plugin plugins/mono fedora
%endif
%if %{with v8}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python2} uwsgiconfig.py --plugin plugins/v8 fedora
%endif
%if %{with go}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python2} uwsgiconfig.py --plugin plugins/gccgo fedora
%endif
%if %{with ruby19}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python2} uwsgiconfig.py --plugin plugins/fiber fedora
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python2} uwsgiconfig.py --plugin plugins/rbthreads fedora
%endif
%if %{with systemd}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python2} uwsgiconfig.py --plugin plugins/systemd_logger fedora
%endif
%if %{with tuntap}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python2} uwsgiconfig.py --plugin plugins/tuntap fedora
%endif
%if %{with perl}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python2} uwsgiconfig.py --plugin plugins/psgi fedora
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python2} uwsgiconfig.py --plugin plugins/coroae fedora
%endif
%if %{with zeromq}
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python2} uwsgiconfig.py --plugin plugins/logzmq fedora
CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python2} uwsgiconfig.py --plugin plugins/mongrel2 fedora
%endif
...

Comment 2 Miro Hrončok 2019-08-21 16:35:13 UTC
The f32-python side tag has been merged. In order to rebuild the package, do it in regular rawhide, but please wait until python3-3.8 is tagged:

  $ koji wait-repo f32-build --build python3-3.8.0~b3-3.fc32


If your built already started in f32-python, after it is finished, please tag it to rawhide with:

  $ koji tag-build f32-pending <nvr>

For example:

  $ koji tag-build f32-pending libreoffice-6.3.0.4-3.fc32

Thanks!

(This comment is mass posted to all bugzillas blocking the PYTHON38 tracking bug.)

Comment 3 Miro Hrončok 2019-08-21 17:29:17 UTC
(Python 3.8 has landed in the rawhide buildroot.)

Comment 4 Carl George 2019-08-31 16:57:19 UTC
Sorry for the lack of response here, been pretty busy with $dayjob.  As you can see this spec file is not simple, so I'd be happily accept any assistance here.  I haven't heard from Jorge in a while, so I don't expect him to respond here.  If I can ever find the time I want to rewrite this spec file from scratch to simplify it.

Comment 5 Miro Hrončok 2019-08-31 18:40:37 UTC
I can ty to rewrite if from scratch as python3 only

Comment 6 Jorge Gallegos 2019-09-03 16:12:56 UTC
The spec grew in complexity as ruby then python crossed major versions. I haven't been good at cleaning up old/stale versions though.
I haven't had time to put as much effort here as I don't use uwsgi in my $dayjob anymore now for a couple of years, but I would be all into rewriting the spec with epel7 and fedora 30+ in mind, meaning getting rid of a bunch of conditionals in the spec. I am not sure we can discard python2 just yet for f29 but I think we can for 30+.

Comment 7 Miro Hrončok 2019-09-03 16:20:32 UTC
No we cannot discard Python 2 for Fedora 30, that ship has sailed. See https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_multiple_python_runtimes

> Mirroring the policy for regular packages, the Python-version-specific subpackages of your package MUST NOT be removed in a release branch of Fedora.

Comment 8 Miro Hrončok 2019-09-03 16:38:34 UTC
Even when I update the calls, uwsgiconfig.py is not Python 3 compatible:


+ /usr/bin/python3 uwsgiconfig.py --plugin plugins/coroae fedora
using profile: buildconf/fedora.ini
detected include path: ['/usr/lib/gcc/x86_64-redhat-linux/9/include', '/usr/local/include', '/usr/include']
*** uWSGI building and linking plugin plugins/coroae ***
Traceback (most recent call last):
  File "uwsgiconfig.py", line 1383, in build_plugin
    execfile('%s/uwsgiplugin.py' % path, up)
NameError: name 'execfile' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "uwsgiconfig.py", line 1638, in <module>
    build_plugin(options.plugin[0], uc, cflags, ldflags, libs, name)
  File "uwsgiconfig.py", line 1386, in build_plugin
    exec(f.read(), up)
  File "<string>", line 12
    print "unable to find the Coro perl module !!!"
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("unable to find the Coro perl module !!!")?

Comment 9 Carl George 2019-09-04 19:06:27 UTC
uwsgiconfig.py is PY3 compatible, but plugins/coroae/uwsgiplugin.py is not.

https://github.com/unbit/uwsgi/blob/2.0.18/plugins/coroae/uwsgiplugin.py#L12

Comment 10 Miro Hrončok 2019-09-04 19:16:14 UTC
Here are my changes in spec: https://src.fedoraproject.org/rpms/uwsgi/pull-request/8

Porting plugins/coroae/uwsgiplugin.py to py3 should be trivial, maybe even with 2to3, but I won't be able to look into it today.

Comment 11 Miro Hrončok 2019-09-04 22:08:11 UTC
Ok, 2to3 works. The above PR is ready for review.

Comment 12 Carl George 2019-09-14 15:59:49 UTC
This is in rawhide now.

https://bodhi.fedoraproject.org/updates/FEDORA-2019-d86b995550


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