(Redhat 6.2) : Running swig causes a recursion for including /usr/include/sys/errno.h . Renaming the file to errno.h_wk solved the problem.