The flag detection in <ffc>/setup.py is not probably correct because it
is not ensured there that distutils.ccompiler.new_compiler will pickup
the correct compiler. I will register an issue.

But as a workaround, try setting exporting CXXFLAGS (without
underscores) - this is the variable setup.py is looking for.

Maybe Sean, who also encountered the issue
https://bitbucket.org/fenics-project/dolfin/issue/449, also has some
input here.

Jan


On Wed, 18 Feb 2015 21:23:48 +0100
Corrado Maurini <[email protected]> wrote:

> I have a problem on building fenics 1.5 with hashdist on a outdated
> rhel5 cluster. 
> 
> I use gcc-4.8.2 compilers and openmpi 1.7.4. 
> 
> At the building of ffc using hashdist package I obtain an error
> related to the absence of c++11 flags at compile time. This is
> obtained both with a standard fenics-install script and with hit
> build and a personalised profile. 
> 
> To bypass the issue I created a bogus hashdist package c++11 having
> the following content:
> 
> when_build_dependency:
>   - {set: 'CFLAGS', value: '-std=c++11'}
>   - {set: 'CMAKE_CXX_FLAGS', value: '-std=c++11’}
> 
> and set it as a dependence of ffc hashdist package at build and run
> time. With this workaround ffc compiles correctly, but when running
> poisson-demo I get an error when ffc compile the form related to the
> absence of c++11 flags, with error messages in the instant
> compile.log as the one below. The problem is really only applying the
> good -std=c++11 flags at compiling time with instant, because if I
> compile manually using cmake with appropriate option to set this
> flag, the ffc_form it compiles correctly. 
> 
> Any suggestion? When and how the instant compiling flags are defined?
> How can one modify them?
> 
> /tmp/tmpiV5Ppj2015-2-18-20-34_instant_cf7f1e9e78769af8486efe86b1e90a7ec8c9b60a/ffc_form_746ebe8521dc9d314e6f65075dbc60d03cfee94b/ffc_form_746ebe8521dc9
> d314e6f65075dbc60d03cfee94b.h:782:54: warning: extended initializer
> lists only available with -std=c++11 or -std=gnu++11 [enabled by
> default] 
> /tmp/tmpiV5Ppj2015-2-18-20-34_instant_cf7f1e9e78769af8486efe86b1e90a7ec8c9b60a/ffc_form_746ebe8521dc9d314e6f65075dbc60d03cfee94b/ffc_form_746ebe8521dc9
> d314e6f65075dbc60d03cfee94bPYTHON_wrap.cxx: In function ‘PyObject*
> _wrap_new_ffc_form_746ebe8521dc9d314e6f65075dbc60d03cfee94b_finite_element_0(PyObjec
> t*,
> PyObject*)’: 
> /tmp/tmpiV5Ppj2015-2-18-20-34_instant_cf7f1e9e78769af8486efe86b1e90a7ec8c9b60a/ffc_form_746ebe8521dc9d314e6f65075dbc60d03cfee94b/ffc_form_746ebe8521dc9
> d314e6f65075dbc60d03cfee94bPYTHON_wrap.cxx:3333:5: error:
> ‘shared_ptr’ is not a member of ‘std’ std::shared_ptr<
> ffc_form_746ebe8521dc9d314e6f65075dbc60d03cfee94b_finite_element_0 >
> *smartresult = result ? new std::shared_ptr<  ffc_form_746e
> be8521dc9d314e6f65075dbc60d03cfee94b_finite_element_0 >(result
> SWIG_NO_NULL_DELETER_SWIG_POINTER_NEW) : 0;
> 
> 
> 
> 
> 
> Corrado Maurini
> [email protected]
> 
> 
> 

_______________________________________________
fenics-support mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics-support

Reply via email to