Discussion:
rooting out old Python dependencies
Robert Huff
2021-05-15 15:39:17 UTC
Permalink
Hello:
I recently made an effort to move all ports from 2.7 and 3.7 to
3.9.
And I though I had succeeded ... until I ran into this while
rebuilding harfbuzz:

===> Building for harfbuzz-2.8.1
[ 10% 1/10] /usr/local/bin/meson --internal exe --capture src/hb-gobject-enums-tmp.h -- /usr/local/bin/glib-mkenums --identifier-prefix hb_ --symbol-prefix hb_gobject --template /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/src/hb-gobject-enums-tmp.h.tmpl /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-aat-layout.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-aat.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-blob.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-buffer.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-common.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-deprecated.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-draw.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-face.h /data/port-work/usr/ports
/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-font.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-map.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ot-color.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ot-deprecated.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ot-font.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ot-layout.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ot-math.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ot-meta.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ot-metrics.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ot-name.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ot-shape.h /data/port-work/usr/ports/print/harfbuzz/work/ha
rfbuzz-2.8.1/_build/../src/hb-ot-var.h /data/port-wor
k/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ot.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-set.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-shape-plan.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-shape.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-style.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-unicode.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/src/hb-version.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ft.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-graphite2.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-glib.h
FAILED: src/hb-gobject-enums-tmp.h
/usr/local/bin/meson --internal exe --capture src/hb-gobject-enums-tmp.h -- /usr/local/bin/glib-mkenums --identifier-prefix hb_ --symbol-prefix hb_gobject --template /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/src/hb-gobject-enums-tmp.h.tmpl /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-aat-layout.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-aat.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-blob.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-buffer.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-common.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-deprecated.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-draw.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-face.h /data/port-work/usr/ports/print/harfb
uzz/work/harfbuzz-2.8.1/_build/../src/hb-font.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-map.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ot-color.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ot-deprecated.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ot-font.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ot-layout.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ot-math.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ot-meta.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ot-metrics.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ot-name.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ot-shape.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1
/_build/../src/hb-ot-var.h /data/port-work/usr/ports/
print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ot.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-set.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-shape-plan.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-shape.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-style.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-unicode.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/src/hb-version.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-ft.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-graphite2.h /data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-glib.h
--- stderr ---
env: /usr/local/bin/python3.7: No such file or directory

ninja: build stopped: subcommand failed.
*** Error code 1

This has also happened with rebuilding a couple of other ports.
What is the correct way to fix this? And is there a way to go
looking for such cases before they find me?
(make.conf is appended)


Respectfully,


Robert "not a Python guru" Huff


#WITH_DEBUG=yes

SENDMAIL_CFLAGS=-I/usr/local/include/sasl -DSASL
SENDMAIL_LDFLAGS=-L/usr/local/lib
SENDMAIL_LDADD=-lsasl2

#DEFAULT_VERSIONS+=linux=c6_64 samba=4.4 python=3.5 python3=3.5
DEFAULT_VERSIONS+=linux=c7 samba=4.10

# Possible values: 2.7, 3.4, 3.5, 3.6
DEFAULT_VERSIONS+=python=3.9

# Possible values: 2.7
#DEFAULT_VERSIONS+=python2=2.7

# Possible values: 3.4, 3.5, 3.6
DEFAULT_VERSIONS+=python3=3.9

DEFAULT_VERSIONS+=perl5=5.32

DEFAULT_VERSIONS+=php=7.4

DEFAULT_VERSIONS+=java=14

DEFAULT_VERSIONS+=samba=4.13

DEFAULT_VERSIONS+=llvm=11

WITH_CCACHE_BUILD=yes
CCACHE_DIR=/data/ccache
Kubilay Kocak
2021-05-17 03:11:28 UTC
Permalink
Post by Robert Huff
graphite2.h
/data/port-work/usr/ports/print/harfbuzz/work/harfbuzz-2.8.1/_build/../src/hb-glib.h
--- stderr ---
env: /usr/local/bin/python3.7: No such file or directory
ninja: build stopped: subcommand failed.
*** Error code 1
This has also happened with rebuilding a couple of other ports.
What is the correct way to fix this? And is there a way to go
looking for such cases before they find me?
(make.conf is appended)
All else being equal its a port bug, using 'python3.7' when it should be
using PYTHON_VER, which below, is set to 3.9
Post by Robert Huff
# Possible values: 2.7, 3.4, 3.5, 3.6
DEFAULT_VERSIONS+=python=3.9
---------------------------^

Built with python 3.9, so 3.7 isn't available.
Post by Robert Huff
# Possible values: 2.7
#DEFAULT_VERSIONS+=python2=2.7
Benjamin
2021-05-17 06:21:21 UTC
Permalink
Post by Robert Huff
/usr/local/bin/meson --internal exe --capture src/hb-gobject-enums-tmp.h -- /usr/local/bin/glib-mkenums --identifier-prefix hb_ --symbol-prefix hb_gobject --template /data/port-
[snip]
Post by Robert Huff
--- stderr ---
env: /usr/local/bin/python3.7: No such file or directory
seems like your meson has a #!/usr/bin/env /usr/local/bin/python3.7
shbang, did you perhaps remove python3.7 without verifying that nothing
depends on it anymore?

To check that (and other missing dependencies) try pkg check
--dependencies and try rebuilding everything that misses some python
version (you should fix other missing dependencies too).

A rebuild meson should then depend on the default python.

Loading...