Time to move to MacPorts.
There are likely to be more issues related to Apple's switch to the `prime` linker.
(I’m a port contributor and am on macports-users where this issue has come up twice. There is what I think is excessive concern about the macOS beta NDA preventing the creation of a package installer until after GA when it no longer applies. A bigger problem is the availability of sufficient build hardware as they have a smallish Mac mini multi-booting into 11, 12, and 13.)
./configure && make && sudo make install