-
Notifications
You must be signed in to change notification settings - Fork 40
Description
I had not run portmaster -a
in nearly a month on FreeBSD 12/amd64. A bunch of ports were queued up including textproc/libxml2, misc/gnome-user-docs and textproc/py-libxml2, in that order.
Those three ports and itstool were already installed:
libxml2-2.9.12
gnome-user-docs-41.1
py38-libxml2-2.9.12
itstool-2.0.7
textproc/libxml2 was successfully updated from 2.9.12 to 2.9.13
Then it came time for misc/gnome-user-docs to be built and the following error occurred:
Traceback (most recent call last):
File "/usr/local/bin/itstool", line 27, in <module>
import libxml2
File "/usr/local/lib/python3.8/site-packages/libxml2.py", line 1, in <module>
import libxml2mod
ImportError: /usr/local/lib/libxml2.so.2: version LIBXML2_2.4.30 required by /usr/local/lib/python3.8/site-packages/libxml2mod.cpython-38.so not defined
gmake[2]: *** [Makefile:893: as/as.stamp] Error 1
gnome-user-docs correctly has a build dependency on textproc/itstool. itstool, has a run time dependency on textproc/py-libxml2 (which has a run time dependency on textproc/libxml2).
The itstool python script imports the 'libxml2' python module. But the shared object, libxml2mod.cypthon-38.so, installed by textproc/py-libxml2 had not been rebuilt yet (to catch up to the libxml2-2.9.13 update) when the gnome-user-docs build tried to use itstool. py-libxml2 should be rebuilt because of the libxml2.so.2 change (which in this case with the update from libxml2 2.9.12 to 2.9.13, had a breaking change between the shared lib, libxml.so.2, and the shared object module, libxml2mod.cypthon-38.so). The ldd output showing the dependency on libxml2.so.2 is below.
% ldd /usr/local/lib/python3.8/site-packages/libxml2mod.cpython-38.so
/usr/local/lib/python3.8/site-packages/libxml2mod.cpython-38.so:
libcrypt.so.5 => /lib/libcrypt.so.5 (0x800706000)
libintl.so.8 => /usr/local/lib/libintl.so.8 (0x800727000)
libdl.so.1 => /usr/lib/libdl.so.1 (0x800736000)
libutil.so.9 => /lib/libutil.so.9 (0x80073a000)
libm.so.5 => /lib/libm.so.5 (0x800752000)
libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0x800e00000)
libz.so.6 => /lib/libz.so.6 (0x800788000)
libc.so.7 => /lib/libc.so.7 (0x80024e000)
libicudata.so.70 => /usr/local/lib/libicudata.so.70 (0x8007a4000)
libicui18n.so.70 => /usr/local/lib/libicui18n.so.70 (0x800f9b000)
libicuuc.so.70 => /usr/local/lib/libicuuc.so.70 (0x8012e8000)
liblzma.so.5 => /usr/lib/liblzma.so.5 (0x8007a7000)
libthr.so.3 => /lib/libthr.so.3 (0x8007d3000)
libc++.so.1 => /usr/lib/libc++.so.1 (0x8014fb000)
libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x8015c8000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x80160c000)
libmd.so.6 => /lib/libmd.so.6 (0x801626000)
The question is: Is this a ports bug (where itstool's PORTREVISION should have been bumped due to the py-libxml2 update)? Or is this a portmaster bug where it should have been able to follow the dependency chain and get py-libxml2 (a run time dependency of itstool) built before building gnome-user-docs (which has the build time dependency on itstool)?
The workaround is to build textproc/py-libxml2 alone before going back to build all ports with portmaster -a.