Solving 'too many open files' problem on NetBSD
When you see 'too many open files' message in the log of any userspace program, you have to tweak a couple of things to eliminate.
If it was not available in PEM, then determine which format it is (here: DER), then convert it:
$ openssl x509 -in ca-cerificate-file.crt -inform DER -out ca-cerificate-file.pem -outform PEM
$ openssl x509 -noout -fingerprint -in ca-certificate-file
Then cd there.
When you experience problems building libxml2 or any other ports depending on it (e.g. libreoffice), see the error message of the compiler. If it contains undefined reference 'lzma_auto_compress', then simply remove lzma and lzmalib packages from the system and continue the build process.
Reason: The base system contains lzma library, and the uncompatible package version supresses if installed.