FTBFS: no default /usr/bin/python

Bug #1866693 reported by Andreas Hasenack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
uwsgi-plugin-php (Ubuntu)
Fix Released
High
Andreas Hasenack

Bug Description

uwsgi-plugin-php is silently failing to build the php plugin:

$ uwsgi --build-plugin /usr/src/uwsgi/plugins/php
$ echo $?
1

strace shows it searching for "python" in many different places, and giving up:
29616 execve("/usr/sbin/python", ["python", ".uwsgi_plugins_builder/uwsgiconf"..., "--extra-plugin", "/usr/src/uwsgi/plugins/php"], 0x555a9d65f140 /* 44 vars */) = -1 ENOENT (No such file or directory)
29616 execve("/usr/bin/python", ["python", ".uwsgi_plugins_builder/uwsgiconf"..., "--extra-plugin", "/usr/src/uwsgi/plugins/php"], 0x555a9d65f140 /* 44 vars */) = -1 ENOENT (No such file or directory)
29616 execve("/sbin/python", ["python", ".uwsgi_plugins_builder/uwsgiconf"..., "--extra-plugin", "/usr/src/uwsgi/plugins/php"], 0x555a9d65f140 /* 44 vars */) = -1 ENOENT (No such file or directory)
...

Looking at the uwsgi src, we see:
core/plugins_builder.c:uwsgi_build_plugin()
...
        // now run the python script
        char *argv[6];

        argv[0] = getenv("PYTHON");
        if (!argv[0]) argv[0] = "python";

Therefore, I suggest this fix for uswgi-plugin-php:
diff --git a/debian/rules b/debian/rules
index a426234..885381e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -26,7 +26,7 @@ OUR_BINARY_VERSION = $(subst -,+,$(UWSGI_VERSION))+$(DEB_VERSION)
        dh $@ --with uwsgi

 override_dh_auto_build:
- uwsgi --build-plugin /usr/src/uwsgi/plugins/php
+ PYTHON=python3 uwsgi --build-plugin /usr/src/uwsgi/plugins/php
        help2man \
                --name 'fast (pure C), self-healing, developer-friendly WSGI server' \
                --section 1 \

Tags: ftbfs

Related branches

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package uwsgi-plugin-php - 0.0.4ubuntu1

---------------
uwsgi-plugin-php (0.0.4ubuntu1) focal; urgency=medium

  * d/rules: be explicit about the python interpreter we want the
    plugin builder to use (LP: #1866693)

 -- Andreas Hasenack <email address hidden> Mon, 09 Mar 2020 19:29:10 +0000

Changed in uwsgi-plugin-php (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.