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 demo.py
Traceback (most recent call last):
File "demo.py", line 20, in
from dolfin import *
File "/Users/aron/Work/FEniCS/build/lib/python2.6/site-packages/dolfin/__init__.py", line 11, in
import cpp
File "/Users/aron/Work/FEniCS/build/lib/python2.6/site-packages/dolfin/cpp.py", line 28, in
_cpp = swig_import_helper()
File "/Users/aron/Work/FEniCS/build/lib/python2.6/site-packages/dolfin/cpp.py", 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/_cpp.so, 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.
Aron