Subject: [Dorsal-dev] dolfin on snowleopard

From: Aron Wahlberg <[email-masked]>
Date: Tue, 6 Oct 2009 18:07:34 +0200

I've reinstalled dolfin from scratch, with the new snowleopard  
platform file. Is there an easy fix to this problem?

Aron

Simula-Drifts-MacBook-Pro:~ aron$ python
Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
 >>> from dolfin import *
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/Users/aron/Work/FEniCS/build/lib/python2.6/site-packages/ 
dolfin/__init__.py", line 11, in <module>
     import cpp
   File "/Users/aron/Work/FEniCS/build/lib/python2.6/site-packages/ 
dolfin/cpp.py", line 6, in <module>
     import _cpp
ImportError: dlopen(/Users/aron/Work/FEniCS/build/lib/python2.6/site- 
packages/dolfin/_cpp.so, 2): Symbol not found: _XAllocColor
   Referenced from: /Users/aron/Work/FEniCS/build/lib/libdolfin.dylib
   Expected in: flat namespace
  in /Users/aron/Work/FEniCS/build/lib/libdolfin.dylib

---

From: Harish Narayanan <[email-masked]>
Date: Tue, 06 Oct 2009 18:08:58 +0200

>   in /Users/aron/Work/FEniCS/build/lib/libdolfin.dylib

Yes. Comment out petsc, slepc, and add skip: before every other package
(other than DOLFIN), and try it again.

Harish

---

From: Aron Wahlberg <[email-masked]>
Date: Tue, 6 Oct 2009 19:35:04 +0200

> (other than DOLFIN), and try it again.

Ok, at first it seems to work now.

from dolfin import * gives no errors.

But plotting doesn't work. I ran the following:

###################
from dolfin import *

mesh = UnitSquare(2, 2)

plot(mesh)
interavtive()
###################

Simula-Drifts-MacBook-Pro:Poisson aron$ python dolfin_test.py
Traceback (most recent call last):
   File "dolfin_test.py", line 5, in <module>
     plot(mesh)
   File "/Users/aron/Work/FEniCS/build/lib/python2.6/site-packages/ 
dolfin/plot.py", line 53, in dolfin_plot
     return viper_plot(object, *args, **kwargs)
   File "/Users/aron/Work/FEniCS/build/lib/python2.6/site-packages/ 
viper/viper_dolfin.py", line 423, in plot
     fig = _plotter.plot(data, **kwargs)
   File "/Users/aron/Work/FEniCS/build/lib/python2.6/site-packages/ 
viper/viper_dolfin.py", line 373, in plot
     return self.autoplot(plot_object, *args, **kwargs)
   File "/Users/aron/Work/FEniCS/build/lib/python2.6/site-packages/ 
viper/viper_dolfin.py", line 387, in autoplot
     plotter = Viper(plot_object, *args, **kwargs)
   File "/Users/aron/Work/FEniCS/build/lib/python2.6/site-packages/ 
viper/viper_dolfin.py", line 43, in __init__
     self.plot(data, *args, **kwargs)
   File "/Users/aron/Work/FEniCS/build/lib/python2.6/site-packages/ 
viper/viper_dolfin.py", line 66, in plot
     self.plot_mesh(data, *args, **kwargs)
   File "/Users/aron/Work/FEniCS/build/lib/python2.6/site-packages/ 
viper/viper_dolfin.py", line 88, in plot_mesh
     (self.iren, self.renWin, self.ren) = self.simple_plotter 
(self.filter, self.x.min(), self.x.max(), wireframe=True)
   File "/Users/aron/Work/FEniCS/build/lib/python2.6/site-packages/ 
viper/viper.py", line 1017, in simple_plotter
     self.ren, self.renWin = self._construct_renderer()
   File "/Users/aron/Work/FEniCS/build/lib/python2.6/site-packages/ 
viper/viper.py", line 800, in _construct_renderer
     renWin.SetSize(self.window_size)
TypeError: function takes exactly 2 arguments (1 given)

---

From: Harish Narayanan <[email-masked]>
Date: Tue, 06 Oct 2009 21:14:49 +0200

> But plotting doesn't work. I ran the following:

You need to patch viper like I showed you for the ultra-new VTK. I am
not sure why the patch[1] wasn't applied automatically.

[1] http://www.fenics.org/dev/dorsal/file/855ad97a6fea/patches/viper.patch

Harish