dolfin examples don't compile
Trying to update and test dolfin 1.5.0, I run the poisson example only to get:
$ python /opt/local/share/dolfin/demo/documented/poisson/python/demo_poisson.py
Calling FFC just-in-time (JIT) compiler, this may take some time.
In instant.recompile: The module did not compile with command 'make VERBOSE=1', see '/Users/sean/.instant/error/ffc_form_746ebe8521dc9d314e6f65075dbc60d03cfee94b/compile.log'
Traceback (most recent call last):
File "/opt/local/share/dolfin/demo/documented/poisson/python/demo_poisson.py", line 41, in <module>
V = FunctionSpace(mesh, "Lagrange", 1)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dolfin/functions/functionspace.py", line 468, in __init__
FunctionSpaceBase.__init__(self, mesh, element, constrained_domain)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dolfin/functions/functionspace.py", line 153, in __init__
ufc_element, ufc_dofmap = jit(self._ufl_element, mpi_comm=mesh.mpi_comm())
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dolfin/compilemodules/jit.py", line 64, in mpi_jit
return local_jit(*args, **kwargs)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dolfin/compilemodules/jit.py", line 128, in jit
return form_compiler.jit(form, parameters=p)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ffc/jitcompiler.py", line 72, in jit
return jit_element(ufl_object, parameters)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ffc/jitcompiler.py", line 177, in jit_element
compiled_form, module, prefix = jit_form(form, parameters)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ffc/jitcompiler.py", line 148, in jit_form
cache_dir = cache_dir)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ffc/backends/ufc/build.py", line 73, in build_ufc_module
**kwargs)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/instant/build.py", line 563, in build_module
recompile(modulename, module_path, new_compilation_checksum, build_system)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/instant/build.py", line 165, in recompile
instant_error(msg % (cmd, compile_log_filename_dest))
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/instant/output.py", line 85, in instant_error
raise RuntimeError(text)
RuntimeError: In instant.recompile: The module did not compile with command 'make VERBOSE=1', see '/Users/sean/.instant/error/ffc_form_746ebe8521dc9d314e6f65075dbc60d03cfee94b/compile.log'
Attached is the error log.
Comments (14)
-
-
- changed status to closed
There is for some reason missing
-std=c++11
in compiler flags. This probably prevents interpreting curly brackets. It could happen because you have still instant, ffc 1.3.0 as @chris_richardson suggested.Please, raise the issue at
fenics-support@fenicsproject.org
. -
reporter ffc
,ufl
,instant
, andFIAT
were all updated to 1.5.0 (in fact, I did not have any previous installations). The~/.instant
folder was removed many times previous to me opening this issue. Any other ideas? I can post this atfenics-support@fenicsproject.org
if that's the workflow preferred. -
Ok, maybe we can solve it here. Is there
-std=c++11
in<prefix>/share/ufc/UFCConfig.cmake
, variableUFC_CXX_FLAGS
? If not, try recompiling FFC withgit clean -fdx export CXXFLAGS='-std=c++11' python setup.py install --prefix=<prefix>
-
reporter Interesting. You are right that the
UFC_CXX_FLAGS
variable is missing-std=c++11
. Adding that does fix the demo compilations. The problem here was that I am testing this in a sandboxed environment (MacPorts) so exporting environment variables isn't as straight-forward. I've fixed this in theffc
port; thanks for the help! -
Nevertheless, flag should be found by
has_cxx_flag
function in<ffc>/setup.py
which is not working on your machine for some reason. Could you find a problem so that it can be patched? -
reporter This might be a MacPorts bug in the Python portgroup with it not sending the environment variables to every phase.
-
I don't think so.
<ffc>/setup.py
tries to check whether compiler has-std=c++11
flag and writes it toUFCConfig.cmake
if so. I don't think it has anything to do with environment.It seems that
has_cxx_flag('-std=c++11)
returns false on your system while it should return true. This is what you could debug so that the bug can be fixed. -
reporter Ah, I see what you mean now. Yeah, I can try to debug and see what's up.
-
@seanfarley, any progress here?
-
reporter Sorry, got side tracked at work. I'll try to work on this at lunch.
-
reporter Apologies for the delay! I finally got this pinned down. The issue turned out to be a macports one because we lock out access to using bare compilers (e.g. 'cc'). A quick check of passing CC through the environment (which is how MacPorts passing around this compiler variable) didn't seem to work either. Having a way to specify the compiler would be great but that's out of the scope of this bug report.
Hope that helps!
-
Thanks @seanfarley . I have suggested a solution https://bitbucket.org/fenics-project/ffc/issue/65/compiler-flags-detection-in-setuppy-is#comment-15793394, sorry for not letting known here.
-
reporter Aha, yep, something like that looks like it would work. Thanks!
- Log in to comment
Have you also updated
ffc
,ufl
,instant
andFIAT
? Have you tried removing your~/.instant
folder?