On macosx I need to set CXXFLAGS="-lpython" as environment variable with
the new ffc including ufc.

Otherwise I get an error at linking (see below). The issue was not present
before the merging of ufc and ffc.

Is there a proper way to fix? I do not exactly which configuration file
should be modified.

Corrado


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/Maurini/.instant/error/ffc_form_47fe6a7f2dd394a4567c94fe4fb0afeb70e88b85/compile.log'
Traceback (most recent call last):
  File "demo_poisson.py", line 41, in <module>
    V = FunctionSpace(mesh, "Lagrange", 1)
  File
"/opt/HPC/FEniCS/lib/python2.7/site-packages/dolfin/functions/functionspace.py",
line 392, in __init__
    FunctionSpaceBase.__init__(self, mesh, element, constrained_domain)
  File
"/opt/HPC/FEniCS/lib/python2.7/site-packages/dolfin/functions/functionspace.py",
line 81, in __init__
    ufc_element, ufc_dofmap = jit(self._ufl_element)
  File
"/opt/HPC/FEniCS/lib/python2.7/site-packages/dolfin/compilemodules/jit.py",
line 62, in mpi_jit
    return local_jit(*args, **kwargs)
  File
"/opt/HPC/FEniCS/lib/python2.7/site-packages/dolfin/compilemodules/jit.py",
line 126, in jit
    return jit_compile(form, parameters=p)
  File "/opt/HPC/FEniCS/lib/python2.7/site-packages/ffc/jitcompiler.py",
line 75, in jit
    return jit_element(ufl_object, parameters)
  File "/opt/HPC/FEniCS/lib/python2.7/site-packages/ffc/jitcompiler.py",
line 186, in jit_element
    compiled_form, module, form_data, prefix = jit_form(form, parameters)
  File "/opt/HPC/FEniCS/lib/python2.7/site-packages/ffc/jitcompiler.py",
line 155, in jit_form
    cache_dir = cache_dir)
  File
"/opt/HPC/FEniCS/lib/python2.7/site-packages/ffc/backends/ufc/build.py",
line 73, in build_ufc_module
    **kwargs)
  File "/opt/HPC/FEniCS/lib/python2.7/site-packages/instant/build.py", line
542, in build_module
    recompile(modulename, module_path, new_compilation_checksum,
build_system)
  File "/opt/HPC/FEniCS/lib/python2.7/site-packages/instant/build.py", line
151, in recompile
    instant_error(msg % (cmd, compile_log_filename_dest))
  File "/opt/HPC/FEniCS/lib/python2.7/site-packages/instant/output.py",
line 57, in instant_error
    raise RuntimeError(text)
RuntimeError: In instant.recompile: The module did not compile with command
'make VERBOSE=1', see
'/Users/Maurini/.instant/error/ffc_form_47fe6a7f2dd394a4567c94fe4fb0afeb70e88b85/compile.log'


Here the relevant lines of compile.log:

/usr/local/Cellar/cmake/2.8.12.2/bin/cmake -E cmake_link_script
CMakeFiles/_ffc_form_47fe6a7f2dd394a4567c94fe4fb0afeb70e88b85.dir/link.txt
--verbose=1
/usr/bin/c++   -std=c++11  -O2 -bundle -Wl,-headerpad_max_install_names
-o _ffc_form_47fe6a7f2dd394a4567c94fe4fb0afeb70e88b85.so
CMakeFiles/_ffc_form_47fe6a7f2dd394a4567c94fe4fb0afeb70e88b85.dir/ffc_form_47fe6a7f2dd394a4567c94fe4fb0afeb70e88b85PYTHON_wrap.cxx.o
Undefined symbols for architecture x86_64:
  "_PyArg_UnpackTuple", referenced from:
      _SwigPyObject_own in
ffc_form_47fe6a7f2dd394a4567c94fe4fb0afeb70e88b85PYTHON_wrap.cxx.o
  "_PyBool_FromLong", referenced from:
      _SwigPyObject_richcompare in
ffc_form_47fe6a7f2dd394a4567c94fe4fb0afeb70e88b85PYTHON_wrap.cxx.o
      _SwigPyObject_own in
ffc_form_47fe6a7f2dd394a4567c94fe4fb0afeb70e88b85PYTHON_wrap.cxx.o
  "_PyCapsule_GetPointer", referenced from:
      _SWIG_Python_DestroyModule in
ffc_form_47fe6a7f2dd394a4567c94fe4fb0afeb70e88b85PYTHON_wrap.cxx.o
  "_PyCapsule_Import", referenced from:




Corrado Maurini
Institut Jean Le Rond d'Alembert (UMR 7190)
Université Pierre et Marie Curie
4 Place Jussieu, case 162
Tour 55-65, 4ème étage, Bureau 424
75252 Paris Cedex 05
Tél: 01 44 27 87 19, Fax: 01 44 27 52 59
E-mail: [email protected]
Web: http://www.lmm.jussieu.fr/~corrado/


On Tue, Feb 25, 2014 at 11:56 AM, Jan Blechta <[email protected]>wrote:

> On Tue, 25 Feb 2014 11:39:38 +0100
> Kent-Andre Mardal <[email protected]> wrote:
>
> > On 25 February 2014 11:28, Jan Blechta <[email protected]>
> > wrote:
> >
> > > On Mon, 24 Feb 2014 19:33:30 +0100
> > > Anders Logg <[email protected]> wrote:
> > >
> > > > On Mon, Feb 24, 2014 at 06:27:29PM +0100, Jan Blechta wrote:
> > > > > On Mon, 24 Feb 2014 16:52:18 +0100
> > > > > Nico Schlömer <[email protected]> wrote:
> > > > >
> > > > > > > Shouldn't -std=c++11 be switched for -std=c++0x which is
> > > > > > > only recognized by GCC 4.6 in Ubuntu Precise, the latest
> > > > > > > long-term release?
> > > > > >
> > > > > > Just bumped into this as well.
> > > > >
> > > > > This is already handled in DOLFIN (by CMake), so it is
> > > > > desirable to be handled also in UFC. Is it possible, Anders?
> > > > > Relevant code is line 10
> > > > >
> > > > >   CXX_FLAGS = "-std=c++11 " + os.environ.get("CXXFLAGS", "")
> > > > >
> > > > > in ffc/setup.py
> > > >
> > > > Sure this can be added, but I don't know how to check for which
> > > > flags are suppported. Is there a standard way to check for
> > > > supported compiler flags in distutils?
> > >
> > > It does not seem that there is a systematic way of doing this. What
> > > about try/except sequence for flags in [' -std=c++11 ', '
> > > -std=c++0x ', ' ']. The latter should work with compilers which
> > > support C++0x/11 by default without flags. On fail, we could print
> > > out "Your compiler does not seem to support C++0x/11. Otherwise,
> > > set environment variable CXX_FLAGS appropriately."
> > >
> > > In the case that this would need speed-up, try/except loop could be
> > > performed with dummy file to detect respective flag.
> > >
> > > Jan
> > >
> >
> >
> > This sounds bothersome. Distutils support for C/C++ is really just a
> > hack on top of the Python system. Adding to CXX_FLAGS sounds like the
> > road to trouble on multiple platforms.  There were good reasons for
> > removing Distutils from instant as it was unpredictable at times due
> > to our modifications of CXX_FLAGS etc.
>
> So what do you suggest with compiling UFC?
>
> Jan
>
> >
> > Kent
> >
> >
> > > >
> > > > --
> > > > Anders
> > > >
> > > >
> > > > > Jan
> > > > >
> > > > > > --Nico
> > > > > >
> > > > > >
> > > > > > On Fri, Feb 21, 2014 at 3:44 PM, Jan Blechta
> > > > > > <[email protected]> wrote:
> > > > > > > Shouldn't -std=c++11 be switched for -std=c++0x which is
> > > > > > > only recognized by GCC 4.6 in Ubuntu Precise, the latest
> > > > > > > long-term release?
> > > > > > >
> > > > > > > Jan
> > > > > > >
> > > > > > >
> > > > > > > On Fri, 21 Feb 2014 15:11:05 +0100
> > > > > > > Johannes Ring <[email protected]> wrote:
> > > > > > >
> > > > > > >> On Fri, Feb 21, 2014 at 3:05 PM, Anders Logg
> > > > > > >> <[email protected]> wrote:
> > > > > > >> > On Fri, Feb 21, 2014 at 03:00:01PM +0100, Johannes Ring
> > > > > > >> > wrote:
> > > > > > >> >> On Fri, Feb 21, 2014 at 2:15 PM, Anders Logg
> > > > > > >> >> <[email protected]> wrote:
> > > > > > >> >> > UFC has now been merged into FFC. Some work remains
> > > > > > >> >> > to do some cleanup after the merge (mostly merging of
> > > > > > >> >> > the documentation), but everything should work now.
> > > > > > >> >> > This means that FEniCS users no longer need to
> > > > > > >> >> > download and install UFC separately.
> > > > > > >> >> >
> > > > > > >> >> > Some issues:
> > > > > > >> >> >
> > > > > > >> >> > - Can we mark the UFC repository as discontinued on
> > > > > > >> >> > Bitbucket? Should it be removed?
> > > > > > >> >> >
> > > > > > >> >> > - How do we handle installation in Dorsal? If we just
> > > > > > >> >> > remove the UFC package, then it will work for
> > > > > > >> >> > installation from the master branch but will fail for
> > > > > > >> >> > download of the latest stable version.
> > > > > > >> >>
> > > > > > >> >> We can fix this temporarily by setting BUILDCHAIN=cmake
> > > > > > >> >> in ufc-stable.package and BUILDCHAIN=nothing in
> > > > > > >> >> ufc.package. This will checkout UFC from git but
> > > > > > >> >> nothing will be built or installed when
> > > > > > >> >> STABLE_BUILD=false. When 1.4 is release, we can remove
> > > > > > >> >> the UFC package.
> > > > > > >> >
> > > > > > >> > Sounds good. Will you fix?
> > > > > > >>
> > > > > > >> Yes, done.
> > > > > > >>
> > > > > > >> Johannes
> > > > > > >> _______________________________________________
> > > > > > >> fenics mailing list
> > > > > > >> [email protected]
> > > > > > >> http://fenicsproject.org/mailman/listinfo/fenics
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > fenics mailing list
> > > > > > > [email protected]
> > > > > > > http://fenicsproject.org/mailman/listinfo/fenics
> > > > > > _______________________________________________
> > > > > > fenics mailing list
> > > > > > [email protected]
> > > > > > http://fenicsproject.org/mailman/listinfo/fenics
> > > > >
> > > > _______________________________________________
> > > > fenics mailing list
> > > > [email protected]
> > > > http://fenicsproject.org/mailman/listinfo/fenics
> > >
> > > _______________________________________________
> > > fenics mailing list
> > > [email protected]
> > > http://fenicsproject.org/mailman/listinfo/fenics
> > >
>
> _______________________________________________
> fenics mailing list
> [email protected]
> http://fenicsproject.org/mailman/listinfo/fenics
>
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to