Troubleshooting with truss

Once you learn how to use truss(1), you'll wonder how you ever solved any problems without it. truss watches a running program and lists the system calls it makes. Whenever I have a problem getting a program to run in Linux mode, I run it under truss and gather all sorts of details.

One drawback to truss is that it requires a FreeBSD-native procfs. While procfs is not part of the FreeBSD new world order, it is still required on rare occasions. I recommend adding an entry for /proc to /etc/fstab but marking it noauto so that it is not automatically mounted at boot. That way, you only have to remember to type mount /proc before running truss, instead of digging through the procfs(5) man page.

proc /proc procfs rw,noauto 0 0

Once you have /proc mounted, run your Linux program under truss. This will generate a lot of output, so you might want to use script(1) to capture the output. Simply asking the version generates 308 lines of truss output to skim through for the error. The simplest thing to do is to search the truss output for directory. Near the end of the output are several lines like:

A few more complicated tests show that the software runs exactly as documented in the PGP Command Line manual. While I'm not sure I could get official corporate support for this install, everything I've tried works perfectly. I get excellent results installing Linux programs on FreeBSD by configuring the environment properly, branding the software correctly, and using truss(1) to identify problems. Good luck!