Question #102008 on DOLFIN changed: https://answers.launchpad.net/dolfin/+question/102008
Status: Open => Answered Harish Narayanan proposed the following answer: On 2/22/10 3:08 PM, Aron Wahlberg wrote: > New question #102008 on DOLFIN: > https://answers.launchpad.net/dolfin/+question/102008 > > I have just installed dolfin 0.9.7. The build process went smooth via Dorsal. > However, I get the following when importing dolfin: > >>>> from dolfin import * > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File > "/Users/aron/bzr/FEniCS/lib/python2.6/site-packages/dolfin/__init__.py", line > 13, in <module> > import dolfin.cpp as cpp > File "/Users/aron/bzr/FEniCS/lib/python2.6/site-packages/dolfin/cpp.py", > line 28, in <module> > _cpp = swig_import_helper() > File "/Users/aron/bzr/FEniCS/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/bzr/FEniCS/lib/python2.6/site-packages/dolfin/_cpp.so, 2): > Library not loaded: > /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gis_cgal/work/CGAL-3.5.1/lib/libCGAL.4.dylib > Referenced from: /opt/local/lib/libCGAL_Core.4.dylib > Reason: image not found >>>> There is a bug in MacPorts' CGAL (or rather, CMake), and I have pointed it out to them. In order to get around this for now, you need to do a strange and dirty trick I discovered (whose details I've forgotten, but it goes something like this): 1. Do a otool -L for each of libCGAL* 2. You will see your strange library /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gis_cgal/work/CGAL-3.5.1/lib/libCGAL.4.dylib popup in some of these. 3. Do a install_name_tool -change ${brokenlibrary} ${actual_library} file for each of the instances in each of the files. e.g. (I think) install_name_tool -change /bigbroken/lib/libCGAL.4.dylib /opt/local/lib/libCGAL_Core.4.dylib without the linebreak. I wish I did not know this. Harish -- You received this question notification because you are a member of DOLFIN Team, which is an answer contact for DOLFIN. _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : dolfin@lists.launchpad.net Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp