[Dune] How to force -std=c++0x in a dune project?

Arya Fallahi arya.fallahi at gmail.com
Sat Feb 16 14:23:49 CET 2013


Dear Markus and Christoph,

Thank you very much for your hints. I followed your tips but there is still
problem. In fact, the return of "g++ --version" and "gcc --version" are
both the installed version 4.7.2, but in the config.log file I see the
following line:

configure:3337: checking for gcc
configure:3353: found /usr/bin/gcc
configure:3363: result: gcc
configure:3607: checking for C compiler version
configure:3610: gcc --version </dev/null >&5
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

which is the default installation on Redhat. I agree that this is the sort
of the problem, but I could not remove it yet. I added CXX='g++' and
CC='gcc' to the optfile but it still had the same problem. The
recommendation from Markus also did not work. I am thinking of another
solution, but would be thankful to know about your ideas.

Thanks a lot,
Arya

P.S. @Christoph: I stop using the Dune Support team, but I still need a
name for the ones I write to. What about "Dune developers" ;-) ?


On Sat, Feb 16, 2013 at 11:47 AM, Markus Blatt <markus at dr-blatt.de> wrote:

> On Fri, Feb 15, 2013 at 10:16:55PM +0100, Arya Fallahi wrote:
> > ../cyrus/signal.hh: In member function 'void
> > Cyrus3d::SignalDataBase::showAll()':
> > ../cyrus/signal.hh:640: error: using 'typename' outside of template
> > ../cyrus/signal.hh:644: error: using 'typename' outside of template
> > ../cyrus/signal.hh:648: error: using 'typename' outside of template
> > ../cyrus/signal.hh:652: error: using 'typename' outside of template
> > ../cyrus/signal.hh:656: error: using 'typename' outside of template
>
> This is an error that you should fix. Presumably you have to strip
> "typename" here. Some compilers are just more strict than others.
>
> > This seems to be due to the incorrect standard chosen for this machine.
> In
> > the first line "g++" should be "g++ -std=c++0x" as in machine 1. I
> googled
> > and searched throughout the Dune Build howto to find the way to set this
> in
> > the opts file. However, I could not find any thing. My opt file is pretty
> > simple:
> >
> > CONFIGURE_FLAGS="    MPICC='/tools/openmpi-1.6.3/bin/mpicc'
> >                                        CXXFLAGS='-O3 -g0
> > --no-strict-aliasing'
> >                                        CPPFLAGS='-O3 -g0
> > --no-strict-aliasing'
> >                                        --enable-parallel
> >                                        --prefix='/tools/cyrus'
> >                                        --with-metis='/tools/metis-5.0.2'
> >
> > --with-alugrid='/tools/ALUGrid-1.52'    "
> >
> I think Cristoph is right, you are probably using the default gcc
> version on your system. Please specify the compiler using CC and
> CXX.
>
> If that does not help: Instead setting MPICC, you might specify the output
> of
> ./dune-common/bin/mpi-config --mpicc=/tools/openmpi-1.6.3/bin/mpicc
> --cflags
> and
> ./dune-common/bin/mpi-config --mpicc=/tools/openmpi-1.6.3/bin/mpicc --libs
> in CPPFLAGS/CFLAGS and LDFLAGS, respectively.
>
> Markus
>
> --
> Do you need more support with DUNE or HPC in general?
>
> Dr. Markus Blatt - HPC-Simulation-Software & Services
> http://www.dr-blatt.de
> Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
> Tel.: +49 (0) 160 97590858  Fax: +49 (0)322 1108991658
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20130216/c1733b36/attachment.htm>


More information about the Dune mailing list