Symbol not found: _SEEK_END

I have an error that I suspect somehow relates to parmetis because building without parmetis doesn't give this error. However, I need parmetis in there. I do have an suspicion that I need to change a pkgconfig file (parmetis.pc). Similar errors have been fixed that way but for other packages.

Anyone know anything about this lost symbol _SEEK_END?

Aron-Wahlbergs-MacBook-Pro:python aron$ python
Traceback (most recent call last):
File "", line 20, in
from dolfin import *
File "/Users/aron/Work/FEniCS/build/lib/python2.6/site-packages/dolfin/", line 11, in
import cpp
File "/Users/aron/Work/FEniCS/build/lib/python2.6/site-packages/dolfin/", line 28, in
_cpp = swig_import_helper()
File "/Users/aron/Work/FEniCS/build/lib/python2.6/site-packages/dolfin/", line 24, in swig_import_helper
_mod = imp.load_module('_cpp', fp, pathname, description)
ImportError: dlopen(/Users/aron/Work/FEniCS/build/lib/python2.6/site-packages/dolfin/, 2): Symbol not found: _SEEK_END
Referenced from: /Users/aron/Work/FEniCS/build/lib/libdolfin.dylib
Expected in: flat namespace
in /Users/aron/Work/FEniCS/build/lib/libdolfin.dylib

Greatful for any help.