| Thread Previous • Date Previous • Date Next • Thread Next |
On Sat, Oct 01, 2005 at 01:40:26PM +0200, Johan Jansson wrote: > On Fri, Sep 30, 2005 at 03:37:51PM +0200, Garth N. Wells wrote: > > With version 1.3.24 of SWIG, I can compile without fatal errors. Running > > test.sh, I'm getting a similar error to what Anders has been seeing, > > > > Traceback (most recent call last): > > File "swigtest.py", line 1, in ? > > import dolfin > > File > > "/usr/local/garth/fenics/dolfin/cvs/dolfin/src/demo/scripting/pydolfin/dolfin.py", > > line > > import _dolfin > > ImportError: > > /usr/local/garth/fenics/dolfin/cvs/dolfin/src/demo/scripting/pydolfin/_dolfin.so: > > ymbol: _ZN6dolfin12EdgeIteratorC1ERKNS_4NodeE > > > > > > Garth > > > > Ok, that's a much more reasonable error. I don't think we have sorted > linking very well in DOLFIN yet, and I guess it shows up here when > dealing with shared libraries. GCC wants libraries listed in order of > dependence, but the way we've solved this is just to repeat the > libraries several times until GCC is happy. That might be true, but the problem with the missing symbol (here _ZN6dolfin12EdgeIteratorC1ERKNS_4NodeE) was simpler than that --- this function was simply not implemented in EdgeIterator.cpp... I think this is fixed now. > At one point I got a similar error to yours on AffineMap::cell(). The > way I solved it was to repeat the libraries once more: > > $(CXX) -shared $< $(LFLAGS) -o $@ $(LFLAGS) > > This is obviously not a robust solution, and we should try to do the > right thing instead. I'll try to find a better solution. Another thing to think about (we discussed it earlier I think) is if we should not do a manual "install" in $toplevel/lib and $toplevel/include during make. Maybe to compile the demos, one should need to do a proper make install? Then we can cleanup all Makefiles and remove ../../ etc before dolfin-config. And then PyDOLFIN would also need to be built against a proper install. Also, perhaps the PyDOLFIN interface could go in src/pydolfin or src/swig (or something similar). Only the demo script needs to be under src/demo. A 'make install' of DOLFIN would then install both the C++ library and the Python bindings. Then some of the demos in src/demo could be C++ and some Python. /Anders
| Thread Previous • Date Previous • Date Next • Thread Next |