Nope, it is not. At least on my machine macports does not install any DLFCN.py.
Well, this is obviously a problem with the python installation of macports, right? This is a standard python module, which should be installed...
... well, yes I guess and on top its easy to generate by the h2py.py script.
Here is the issue in detail: We need to make sure that the C++ RTTI (run-time type information) works properly when the compiled modules are imported from python. The only way to do this, is by ensuring the RTLD_GLOBAL flag is passed to the dlopen() function, when python loads the module. This is not a bug, either in graph-tool or python, it is just how life is (see http://gcc.gnu.org/faq.html#dso). Python provides an interface for doing this, namely the sys.setdlopenflags() function. This is all nice and well, but we need to know the numeric values of the flags we want to pass, and we need to pass always two flags: RTLD_LAZY | RTLD_GLOBAL (or RTLD_NOW | RTLD_GLOBAL, for immediate symbol resolution). Thus, these two flags must be defined somewhere, since their numeric values will vary across OS's. These two values used to be inside the "dl" module, which is now deprecated and has even been removed in python 3. To close this hole, they have created the DLFCN module, whose _only purpose_ AFAIK is to contain these important definitions. Thus, without this module we are completely stuck. The ctypes module, for whatever reason, does not include either RTLD_LAZY or RTLD_NOW (as you have already noticed).
I know, I read a lot about it recently. However, the idea of having shared libraries is not that appreciated on Mac - about every stupid piece of software comes along with its own libraries. The only common ground on has - as I see it - is the apple gcc...
So, we really need the DLFCN module. I've checked, and in my macports installation the module is also not installed... However it does have the dl module, which I then used as a fall-back.
Hmm, I don't have a dl module in the macports python, but in the apple python. However, in the past I deleted some stuff from the Developer directory structure, such that I should have a dl module.
I guess we have to submit a bug report the macports people.
Let me reinstall my Xcode and then we file a bug report, if things stay as is.
ccache works very reliably for me (even on macos). I only need to recompile things if the source code really changes in some meaningful way. Simple modifications, such as comments, indentations, etc, should never trigger a recompile. And yes, you should of course enable it in the macports config file...
Next time I compile graph-tool, I will enable ccache and share that new Portfile.
-- Tiago de Paula Peixoto email@example.com
graph-tool mailing list firstname.lastname@example.org http://lists.skewed.de/mailman/listinfo/graph-tool