I am using a fresh installation of FEniCs (2019.2.0.dev0) on Ubuntu 18.04.5. Note: I encountered similar issues as described here: Petsc_dir issues and solved them analogously by uninstalling a previous Petsc version.
Using ffc to compile my .ufl files works fine, when compiling my C++ code, I am met with the follow errors:
error: ‘void heat_cell_integral_0_otherwise::tabulate_tensor(double*, const double* const*, const double*, int) const’ marked ‘final’, but is not virtual
void tabulate_tensor(double * A,
error: invalid new-expression of abstract class type ‘heat_cell_integral_0_otherwise’
return new heat_cell_integral_0_otherwise();
I am suspecting something went wrong with my fenics installation, since I do not have the same issues on another machine (where I did not have the petsc issue). However, I have no idea where to start.
As it works on your other computer, it is clearly something with your installation.
Could you tell me which steps you used to install the latest version?
Did you use the following steps:
Could you check if your C++ version matches the one used in the docker image? (or on your other computer). As far as I can tell from other similar issues in other projects: https://github.com/feixh/VISMA/issues/2 it because a newer version of gcc is used.
It’s also worth deleting the jit cache (e.g. ~/.cache/fenics/). If the error is from ffc then this is a likely culprit. The jit generated files are sensitive to specific conditions, including python version.
If that doesn’t help then check you don’t have user-installed python modules interfering (e.g. in ~/.local/lib/python3*/site-packages/)
It seems like the cleaning up ~/.local/lib/python3*/site-packages/ did the trick (I uninstalled FEniCs, cleaned up and installed again). In particular, I removed a few FEniCs/ffc related things.