Solved glib-2.84.1_2,2 depends on file: /usr/local/gobject-introspection-bootstrap/bin/g-ir-scanner - not found

Hello.
Updated ports.

How to fix?
Code:
root@site:/ # portupgrade -arR
[Reading data from pkg(8) ... - 156 packages found - done]
** Detected a package name change: glib-bootstrap (devel/glib20) -> 'glib' (devel/glib20)
--->  Upgrading 'glib-bootstrap-2.82.4_1,2' to 'glib-2.84.1_2,2' (devel/glib20)
--->  Building '/usr/ports/devel/glib20'
===>  Cleaning for gobject-introspection-1.84.0,1
===>  Cleaning for bison-3.8.2_2,1
===>  Cleaning for bison-3.8.2_2,1
===>  Cleaning for m4-1.4.19_1,1
===>  Cleaning for m4-1.4.19_1,1
===>  Cleaning for texinfo-7.1_8,1
===>  Cleaning for texinfo-7.1_8,1
===>  Cleaning for help2man-1.49.3_1
===>  Cleaning for help2man-1.49.3_1
===>  Cleaning for p5-Locale-gettext-1.07
===>  Cleaning for p5-Locale-gettext-1.07
===>  Cleaning for gettext-tools-0.23.1_1
===>  Cleaning for gettext-tools-0.23.1_1
===>  Cleaning for libtextstyle-0.23.1
===>  Cleaning for libtextstyle-0.23.1
===>  Cleaning for gmake-4.4.1
===>  Cleaning for gmake-4.4.1
===>  Cleaning for p5-Locale-libintl-1.35
===>  Cleaning for p5-Locale-libintl-1.35
===>  Cleaning for p5-Text-Unidecode-1.30
===>  Cleaning for p5-Text-Unidecode-1.30
===>  Cleaning for p5-Unicode-EastAsianWidth-12.0
===>  Cleaning for p5-Unicode-EastAsianWidth-12.0
===>  Cleaning for meson-1.7.0
===>  Cleaning for py311-setuptools-63.1.0_3
===>  Cleaning for py311-wheel044-0.44.0
===>  Cleaning for py311-flit-core-3.12.0
===>  Cleaning for py311-build-1.2.2_2
===>  Cleaning for py311-installer-0.7.0
===>  Cleaning for py311-pyproject-hooks-1.2.0
===>  Cleaning for py311-wheel-0.45.1
===>  Cleaning for ninja-1.11.1,4
===>  Cleaning for ninja-1.11.1,4
===>  Cleaning for glib-2.84.1_2,2
===>  Cleaning for glib-2.84.1_2,2
===>  License LGPL20 accepted by the user
===>   glib-2.84.1_2,2 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by glib-2.84.1_2,2 for building
===>  Extracting for glib-2.84.1_2,2
=> SHA256 Checksum OK for gnome/glib-2.84.1.tar.xz.
===>   glib-2.84.1_2,2 depends on file: /usr/local/gobject-introspection-bootstrap/bin/g-ir-scanner - not found
===>   glib-2.84.1_2,2 depends on file: /usr/local/gobject-introspection-bootstrap/bin/g-ir-scanner - not found
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/glib20
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/glib20
egrep: empty (sub)expression
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20250501-73336-154xgz env UPGRADE_TOOL=portupgrade UPGRADE_PORT=glib-bootstrap-2.82.4_1,2 UPGRADE_PORT_VER=2.82.4_1,2 make
** Fix the problem and try again.
--->  Skipping 'devel/glib20' (glib-2.82.4_1,2) because it has already failed
** Listing the failed packages (-:ignored / *:skipped / !:failed)
    ! devel/glib20 (glib-bootstrap-2.82.4_1,2)    (unknown build error)
    * devel/glib20 (glib-2.82.4_1,2)

Code:
uname -rms
FreeBSD 14.2-RELEASE-p2 amd64

Code:
/etc/make.conf
CPUTYPE?=nocona
MAKE_JOBS_NUMBER=6
NO_GAMES=true
NO_INET6=true
NO_BLUETOOTH=true
NO_SHAREDOCS=true
OPTIONS_UNSET=DOCS X11 IPV6 BLUETOOTH GAMES SMB CUPS VULKAN FFMPEG GITWEB EXAMPLES
 
Read /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
 
I deleted the devel/glib20 port and tried to install it again, this is what I get.
root@site:/usr/ports/devel/glib20 # make install clean
===> License LGPL20 accepted by the user
===> glib-2.84.1_2,2 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by glib-2.84.1_2,2 for building
===> Extracting for glib-2.84.1_2,2
=> SHA256 Checksum OK for gnome/glib-2.84.1.tar.xz.
===> glib-2.84.1_2,2 depends on file: /usr/local/gobject-introspection-bootstrap/bin/g-ir-scanner - not found
===> glib-2.84.1_2,2 depends on file: /usr/local/gobject-introspection-bootstrap/bin/g-ir-scanner - not found
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/glib20
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/glib20
 
pkg remove glib-bootstrap gobject-introspection-bootstrap
 
pkg remove glib-bootstrap gobject-introspection-bootstrap

did
root@site:/usr/ports/devel/glib20 # pkg remove glib-bootstrap gobject-introspection-bootstrap
No packages matched for pattern 'glib-bootstrap'

No packages matched for pattern 'gobject-introspection-bootstrap'

Checking integrity... done (0 conflicting)
2 packages requested for removal: 0 locked, 2 missing

root@site:/usr/ports/devel/glib20 # pkg version -v | egrep 'glib-bootstrap|gobject-introspection-bootstrap|glib'
root@site:/usr/ports/devel/glib20 #
 
I decided to try the update on another server.

root@ttt:/ # portupgrade -arR
...
....
...
===> Cleaning for frei0r-2.3.3
===> Cleaning for ffnvcodec-headers-12.0.16.1
===> Cleaning for v4l_compat-1.23.0_6
===> Cleaning for evdev-proto-5.8
===> Cleaning for ffmpeg-6.1.2_11,1
---> Cleaning out obsolete shared libraries
No such file or directory @ rb_check_realpath_internal - /usr/local/lib/compat/pkg/libmysqlclient_r.so.21
** Listing the failed packages (-:ignored / *:skipped / !:failed)
! devel/glib20 (glib-2.82.4_1,2) (unknown build error)
* devel/glib20 (glib-bootstrap-2.82.4_1,2)
root@ttt:/usr/ports #
I do as indicated.
root@ttt:/usr/ports # pkg remove glib-bootstrap gobject-introspection-bootstrap
Updating database digests format: 100%
No packages matched for pattern 'gobject-introspection-bootstrap'

Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
glib-bootstrap: 2.82.4_1,2

Number of packages to be removed: 1

The operation will free 17 MiB.

Proceed with deinstalling packages? [y/N]: y
[ttt] [1/1] Deinstalling glib-bootstrap-2.82.4_1,2...
[ttt] [1/1] Deleting files for glib-bootstrap-2.82.4_1,2: 100%
# pkg version -vl '<'
glib-2.82.4_1,2 < needs updating (index has 2.84.1_2,2)
I continue updating.
# portupgrade -arR
[Reading data from pkg(8) ... - 229 packages found - done]
---> Upgrading 'glib-2.82.4_1,2' to 'glib-2.84.1_2,2' (devel/glib20)
---> Building '/usr/ports/devel/glib20'
===> Cleaning for gobject-introspection-1.84.0,1
===> Cleaning for glib-2.84.1_2,2
===> Cleaning for glib-2.84.1_2,2
===> License LGPL20 accepted by the user
===> glib-2.84.1_2,2 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by glib-2.84.1_2,2 for building
===> Extracting for glib-2.84.1_2,2
=> SHA256 Checksum OK for gnome/glib-2.84.1.tar.xz.
===> glib-2.84.1_2,2 depends on file: /usr/local/gobject-introspection-bootstrap/bin/g-ir-scanner - not found
===> glib-2.84.1_2,2 depends on file: /usr/local/gobject-introspection-bootstrap/bin/g-ir-scanner - not found
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/glib20
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/glib20
egrep: empty (sub)expression
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20250501-5931-8rvl28 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=glib-2.82.4_1,2 UPGRADE_PORT_VER=2.82.4_1,2 make
** Fix the problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
! devel/glib20 (glib-2.82.4_1,2) (unknown build error)
 
I ran into this one as well (deliberately) and I agree that the documentation could be a bit more descriptive. So... going all out here:

First: we need to understand what is going on here. Getting to a solution always depends on understanding the issue at hand. The issue at hand, as hinted at by SirDice, is that both ports depend on the other. So basically we have a chicken and the egg problem here.

Second: if you're messing with ports, you'd better understand how they work. In this case we need to be aware of flavors, link to porters handbook right here. In short: flavors allow us to select a specific type of the (same) port. An important detail here (not directly mentioned in that chapter) => the actual build target. This is usually denoted by a @ sign, and the name of the flavor behind it.

NOW let's take a closer look at the Makefile for devel/glib20, shall we?

Code:
TEST_DEPENDS=   dbus-uuidgen:devel/dbus \
                update-desktop-database:devel/desktop-file-utils \
                update-mime-database:misc/shared-mime-info

FLAVORS=        default bootstrap
FLAVOR?=        ${FLAVORS:[1]}
FLAVORS_SUB=    yes
See what I mean? It mentions 2 flavors: default and bootstrap.

Because these ports depend on one another they now also provide a bootstrap option that can be used to "boost" the building process along. Unfortunately... this doesn't always work as intended, Portmaster had no issue with this but when I started messing around and removing the bootstraps myself I also ran into problems during a reguild of GLIB20. A report is still on my todo.

Now... how do we get out of this mess? Build both ports, starting with the bootstrap (see also ports(7) for known build targets & environment variables, notice the lack of FLAVOR being mentioned? Yups.... the main reason for my comment here).

SO:

Code:
# cd /usr/ports/devel/gobject-introspection
# make FLAVOR=bootstrap install clean
# cd ../glib20
# make install clean
That should help you force this. I also suggest making sure that both ports end up getting installed because it will make your life a lot easier in the future.

Hope this can help.
 
SO:

# cd /usr/ports/devel/gobject-introspection # make FLAVOR=bootstrap install clean # cd ../glib20 # make install cleanThat should help you force this. I also suggest making sure that both ports end up getting installed because it will make your life a lot easier in the future.

Hope this can help.
Thank you, I was able to update and install it.
Why doesn't it update automatically if FLAVOR=bootstrap is specified in the ports?
 
is there an analogue of Portupgrade that supports FLAVOR?
Fair warning: I'm not familiar with all the functionality of Portupgrade myself, but ports-mgnt/portmaster has never failed me so far. And as I mentioned earlier on it also had no issues with this particular problem.

When I messed around manually I resolved it as I mentioned earlier. But when I was trying to re-do everything (by removing the bootstraps as well as Glib & Gobject-introspection) I managed to solve all this by simply telling Portmaster to start with installing 'Introspection' first.

Though, truth be told that had more to do with the Makefile's in question; the Makefile for "introspection" includes a direct 'bootstrap dependency' for Glib ("bootstrap_BUILD_DEPENDS") whereas Glib doesn't have the same. I'm assuming to prevent more heavier circular dependencies, but as a result you can also easily run into this problem when you focus on building Glib first.

But yah... maybe Portmaster?
 
Does Postmaster work with ports or packages?
Most of my systems have software installed from ports.
 
portupgrade -arR updates all installed ports and their dependencies.
how to do this in portmaster, while reading the portmaster instructions, I only found how to update the ports themselves for which there are updates portmaster -a
 
Does Postmaster work with ports or packages?
Most of my systems have software installed from ports.
It's primary build for ports building... for example one of the things I personally like is that it will show you all config screens right after oneanother instead of somewhere between builds (which would happen if you were to rely on # make install clean.

However... recent updates also provide functionality for binary packages; you can tell it to prefer binary packages or only when stuff goes wrong. However... fair disclaimer: I never used those functions myself so I can't really comment on those.

(edit)

portupgrade -arR updates all installed ports and their dependencies.
how to do this in portmaster, while reading the portmaster instructions, I only found how to update the ports themselves for which there are updates portmaster -a
Portmaster always checks dependencies, so yeah: # portmaster -a is basically all you need to upgrade all currently installed ports.

Also be aware of its configuration file, there are several options that can become invaluable. Refering to /usr/local/etc/portmaster.rc. In specific I strongly suggest to check:

Code:
# Always save the backup packages of the old port (-b)
BACKUP=bopt

# Always delete stale distfiles without prompting (-d)
ALWAYS_SCRUB_DISTFILES=dopt
The first option ensures that Portmaster will make a backup copy of the currently installed port ("package") before installing the new one. So should you run into problems after the upgrade (maybe people discovered a bug?) then all you have to do is remove the current version and re-install the previous one.

The last is also useful: this ensures that your system won't fill up with unused distfiles (aka: original packages of the ports which you installed).
 
The first option ensures that Portmaster will make a backup copy of the currently installed port ("package") before installing the new one. So should you run into problems after the upgrade (maybe people discovered a bug?) then all you have to do is remove the current version and re-install the previous one.

The last is also useful: this ensures that your system won't fill up with unused distfiles (aka: original packages of the ports which you installed).
portmaster -adb
As I understand it, then the command will be like this, without specifying the settings in /usr/local/etc/sportmaster.rc.
 
Back
Top