Hi, On 01/25/2010 09:30 AM, tcb wrote:
The macports libtool is 2.2.6b and seems to work fine, so it was a bit puzzling why there was any problem at all. After looking through the configure script, at the end you have some lines to correct a problem with linking the stdc++ library- it simply reads the libtool script, pipes it through sed and writes it back again. This is what causes the problems with libtool- the shell script is doing some interpretation of the libtool script as it reads it and when you write it back again, and some of the elaborate quoting of strings is changed.
You might try this patch on osx which removes the sed replacements in the configure.ac file. I think things should work ok on osx without this- I have no idea how you enable this conditionally on osx...
This is unfortunately necessary (at least on GNU/Linux) since there is currently a problem with libtool/gcc when binaries are linked with libstdc++ in a random order, which causes segfaults. The modification ensures that libstdc++ gets linked first. What can be done, is to check whether the corresponding line is there in the file, and only do the modification if it looks exactly as expected, otherwise leave it alone.
It is nice that the 64bit support is there. At the moment I have only built it with 32bit on osx. I had thought that things were working ok, but I had compiled the graph-tool library with a different compiler version to my python libraries- so I have to compile over again... I have encountered another few problems with the default compiler on osx (gcc-4.2) which does not like the tr1::random functions- I got round this by converting tr1::random to boost::random which seems to work just fine (I'm using boost 1.41).
Be careful, there are some serious bugs with the boost random library! Take a look at: http://lists.boost.org/boost-users/2009/05/48444.php I switched to tr1, since the boost::random stuff seems a bit abandoned. However the tr1 has not entirely stabilized yet, and you need gcc 4.4 or newer to use it.
A major problem with trying to work on graph-tool is that the whole library seems to take an extraordinary amount of time (and memory) to compile (given the amount of code). I assume this is because of the sophisticated use of template meta-programming. Is there any way to reduce the compile times? Has anyone used precompiled headers? Do they help?
Precompiled headers do not really help in this case, but I recommend using ccache (http://ccache.samba.org), which works very well. Otherwise you can also turn off graph filtering to save some time and memory. I hear GCC 4.5 will have improved template performance, since they switched to O(1) instantiation, instead of O(N). Cheers, Tiago