5

I've just tried to install FEniCS on Ubuntu 16.04 and when I try to run the first example code using python3.5 I get the following 2 errors:

 RuntimeError: Expecting a string or list of strings, not
 {'slepc_real', 'sz', 'mpi', 'mpi_cxx', 'hdf5', 'boost_timer', 'm',
 'boost_filesystem', 'z', 'dolfin', 'petsc_real', 'dl'}.

 RuntimeError: Unable to compile C++ code with dijitso

image of error attached

Has anyone encountered this and managed to fix it?

Siong Thye Goh
  • 3,518
  • 10
  • 23
  • 31
Natasha
  • 51
  • 2

2 Answers2

3

the problem, in this case, is an old version of pkgconfig. Please update it with the command

$ pip3 install -U pkgconfig

Then, this problem should disappear even without your changes in /usr/lib/python3/dist-packages/dolfin/jit/jit.py

0

I ran into the same problem just now. I ran the ran tutorial with the python debugger:

$ python3 -m pdb ft01_poisson.py

I found the problem and fixed it (hackishly) by adding the explicit cast to list with the added list(...) statement on three lines /usr/lib/python3/dist-packages/dolfin/jit/jit.py

# Set compiler/build options 
params = dijitso.params.default_params() 
params['build']['include_dirs'] = list(dolfin_pc["include_dirs"]) 
params['build']['libs'] = list(dolfin_pc["libraries"]) 
params['build']['lib_dirs'] = list(dolfin_pc["library_dirs"])
Adam
  • 67
  • 1
  • 8