April 14, 2010

Compiling Postfix on Mac OS X 10.6

So, I'm trying to compile Postfix 2.7 on my new 10.6 system. During make, I get this:

In file included from dns_lookup.c:152:
dns.h:23:29: error: nameser8_compat.h: No such file or directory
make: *** [dns_lookup.o] Error 1
make: *** [update] Error 1

A google search found a suggested fix, in /src/util/sys_defs.h, the following line should be commented out:


With this line commented out, I'm able to get a good build, but at what cost? Presumably this is going to break some of the name resolution that Postfix uses, which would not be good. After reporting this on the Postfix mailing list, I spent some additional time researching the issue, but ironically kept coming up with various pages that mirror the Postfix list, and kept coming back to my own posting... Time to switch gears.

More searching online found some similar reports for software other than Postfix, but no hints at fixes. Digging into the OS, I found that Mac OS X 10.6 no longer has an include file named nameser8_compat.h, which is the source of the issue. The equivalent file now seems to be arpa/nameser_compat.h. Updating the Postfix dns.h file (line 23) to include this file instead finally resulted in a good build. It may be another day or so before I'm able to put this server online to test.

This information has also been reported to the Postfix mailing list, it is likely that the 2.7.1 version of Postfix should have this change and compile properly out of the box.

Posted by Jim at April 14, 2010 10:58 AM | TrackBack