Problem building matplotlib in superbuild

I’m attempting to build paraview in an apptainer container, but I keep running into crashes when it gets to the matplotlib build. The specific failure is a missing freetype library, but I can verify that the library is built earlier and exists in the intended location. Any ideas what could be going on?

This is with the osmesa build, in a rocky 8 container.