So something in the graphiz build is incorrectly (upstream and pkgsrc together) seeing content in /usr/pkg and changing the build output. This is pretty common - I just ran into it in gimp 3.2 and glib2 etc. have this problem.
I've seen that.
This works, after the failure: pkg_delete -f graphviz (should already be gone as part of make replace) make clean installNo, replace does not delete the package. It builds a new package and then calls pkg_add -U -u, and pkg_add does remove/install in one operation (assuming no crash in between). If the new package does not get built ok, then pkg_add -u is not called, and the old package remains. This is definitely a feature, and why make replace is way better than make update. (On the other hand, make update might remove first and avoid more of these /usr/pkg-leak-into-build bugs.)
To clarify: doozer# pkg_info | grep graphviz graphviz-12.2.1nb7 Graph Drawing Programs from AT&T Research and Lucent Bell Labs doozer# make replace => Bootstrap dependency digest>=20211023: found digest-20220214 ===> replace-message [graphviz-14.1.3] ===> Replacing for graphviz-14.1.3 ===> replace-destdir [graphviz-14.1.3] ===> Updating using binary package of graphviz-14.1.3 /usr/bin/env /usr/local/sbin/pkg_add -K /usr/local/pkgdb -U -D /usr/pkgsrc/graphics/graphviz/work/.packages/graphviz-14.1.3.tgz pkg_add: graphviz-14.1.3: missing required library: /usr/local/lib/libcdt.so.5 pkg_add: graphviz-14.1.3: missing required library: /usr/local/lib/libcgraph.so.6 pkg_add: 1 package addition failed *** Error code 1 Stop. make[2]: stopped making "su-replace" in /usr/pkgsrc/graphics/graphviz *** Error code 1 Stop. make[1]: stopped making "replace" in /usr/pkgsrc/graphics/graphviz *** Error code 1 Stop. make: stopped making "replace" in /usr/pkgsrc/graphics/graphviz doozer# pkg_info | grep graphviz (shows nothing, as in no graphviz package installed)I suppose this is because the new package is built just fine, but "make replace" fails during the attempt to install the newly built package, after the old one is already removed.
John