Solved devel/glib20 ERROR: Could not execute command /usr/ports/devel/glib20/work-default/.bin/g-ir-scanner --version

Problem install from ports
devel/glib20

After make i have ERROR: Could not execute command /usr/ports/devel/glib20/work-default/.bin/g-ir-scanner --version

All reports:
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/lib/python3.12/subprocess.py", line 1955, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/bin/g-ir-scanner'
ERROR: Unhandled python OSError. This is probably not a Meson bug, but an issue with your build environment.
===> Script "configure" failed unexpectedly.
Please report the problem to desktop@FreeBSD.org [maintainer] and attach the
"/usr/ports/print/harfbuzz/work/harfbuzz-14.2.1/_build/meson-logs/meson-log.txt"
including the output of the failure of your make command. Also, it might be
a good idea to provide an overview of all packages installed on your system
(e.g. a /usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1
Stop.
make[2]: stopped making "/usr/ports/print/harfbuzz/work/.install_done.harfbuzz._usr_local" in /usr/ports/print/harfbuzz
*** Error code 1
Stop.
make[1]: stopped making "deinstall install" in /usr/ports/print/harfbuzz
*** Error code 1

!!! But problem in link at "g-ir-scanner" in "/usr/ports/devel/glib20/work-default/.bin"
After make install in "/usr/ports/devel/glib20/work-default/.bin" create link:
Code:
root@gw:/usr/ports/devel/glib20/work-default/.bin # ls -l
total 0
lrwxr-xr-x  1 root wheel 69 Jul  9 23:09 g-ir-scanner -> ../../../../../local/gobject-introspection-bootstrap/bin/g-ir-scanner
lrwxr-xr-x  1 root wheel 35 Jul  9 23:09 python3 -> ../../../../../local/bin/python3.12
But g-ir-scanner in:
Code:
root@gw:/usr/ports/devel/glib20 # where g-ir-scanner
/usr/local/bin/g-ir-scanner

So, create you need to manually create a symlink immediately after executing the command make install:
Code:
root@gw:/usr/ports/devel/glib20 # ln -sf /usr/local/bin/g-ir-scanner /usr/ports/devel/glib20/work-default/.bin/g-ir-scanner
and then the installation will complete successfully.
 
I fought this issue just the other day after upgrading from Python3.11->3.12. Cyclical dependencies are the worse. My fix was to force uninstall
devel/glib20
and devel/gobject-introspection, then issue:

make FLAVOR=bootstrap all install clean

On both /usr/ports/devel/glib and /usr/ports/devel/gobject-introspection.
Not sure if actually needed on both ports, at that point I was getting frustrated and was in "monkey flinging poo" mode.
 
From /usr/ports/UPDATING:

Code:
20250402:
 AFFECTS: users of devel/glib20 and devel/gobject-introspection building outside of Poudriere
 AUTHOR: arrowd@FreeBSD.org

 New versions of glib started to require gobject-introspection as a build
 dependency, while gobject-introspection requires glib to build. This forms a
 dependency cycle that is dealt with by introducing the @bootstrap flavor for
 mentioned ports. This solution is suggested by the upstream as well, see
 https://discourse.gnome.org/t/dealing-with-glib-and-gobject-introspection-circular-dependency/18701

 When building devel/glib20 in Poudriere no manual intervention is required.

 The devel/glib20@bootstrap gets built first and provides for
 devel/gobject-introspection@bootstrap. This in turn provides for a normal
 devel/glib20 build, which finally fulfills a dependency for normal devel/gobject-introspection

 Users that are building outside of the isolated environments will be ending
 up with useless glib-bootstrap and gobject-introspection-bootstrap packages
 installed after each update. These can be removed with

  pkg remove glib-bootstrap gobject-introspection-bootstrap
 
Back
Top