Opened 20 months ago

Closed 2 months ago

Last modified 2 months ago

#71963 closed defect (fixed)

virt-viewer fails to build without 'python3 select'

Reported by: jasonliu-- (Jason Liu) Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version: 2.10.5
Keywords: mojave highsierra sierra elcapitan yosemite Cc: drkp (Dan Ports)
Port: virt-viewer

Description

Builds for 10.14 Mojave and older are failing at the configure stage with the following error message:

meson.build:214:12: ERROR: Program or command 'python3' not found or not executable

The error can be worked around by manually running port select python3 python313 (or any other version of python 3.x).

Attachments (1)

main.log.gz (2.8 KB) - added by jasonliu-- (Jason Liu) 20 months ago.

Download all attachments as: .zip

Change History (6)

Changed 20 months ago by jasonliu-- (Jason Liu)

Attachment: main.log.gz added

comment:1 Changed 20 months ago by jmroot (Joshua Root)

Owner: set to raimue
Status: newassigned

comment:2 Changed 2 months ago by drkp (Dan Ports)

Resolution: fixed
Status: assignedclosed

In 0e03a4cd14c766471271e4b2ec269101f1855128/macports-ports (master):

virt-viewer: fix SPICE support and python3 build

Add the spice-protocol dependency (spice-gtk's pkg-config file requires
it but only build-depends on it) and enable spice/vnc explicitly, so
SPICE support is not silently dropped. Point meson at a versioned
python3 so the build does not rely on "port select python3".

Fixes: #74206
Fixes: #71963

comment:3 Changed 2 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: drkp added

You are not supposed to need to patch meson.build to substitute another program for the results of find_program. Instead, use:

meson.native.binaries-append python3=${prefix}/bin/python${py_branch}

The second reinplace, where it looks like you fix upstream's erroneous use of python3 instead of the found binary, is likely still necessary, until upstream fixes it. (You've reported the bug to them? If not, please do.)

comment:4 Changed 2 months ago by drkp (Dan Ports)

Thanks, I'm not that familiar with meson!

(I haven't reported it upstream yet but planning to...)

comment:5 Changed 2 months ago by drkp (Dan Ports)

In 6cb68ae08325b407e1759e6c5f652f41fba1335b/macports-ports (master):

virt-viewer: resolve python3 via meson native binaries

Use meson.native.binaries to point find_program at the versioned
python3 instead of patching meson.build, and keep the reinplace only
for upstream's run_command() calls that bypass the found program.

See: #71963

Note: See TracTickets for help on using tickets.