[Dune] problems with dune-functions building

Christoph Grüninger christoph.grueninger at iws.uni-stuttgart.de
Wed Jun 1 16:56:51 CEST 2016


Dear all,
I investigated the problem with Clang and the problem
  static_assert failed "tuple_element index out of range"
a little bit further.
- With GCC everything works.
- With Clang 3.5.0 I get the error.
- With Clang 3.8.0 it works. I got the binary from llvm.org as I am
unable to update my Clang package.

Hope this helps,
Christoph

Am 26.05.2016 um 12:07 schrieb Francesco Magaletti:
> Hi guys, 
> I’m an absolute beginner with the dune library. I’m trying to install on
> my mac, following the instructions on the website and on the pdf
> recently uploaded by Oliver Sander (“Getting started with DUNE"). I had
> no problem installing the basic modules (common, grid, islt, geometry,
> localfunctions, alugrid, fem), but in the first example on the pdf by
> Oliver Sander it calls some features of the dune-functions module and
> I’m now facing some problem with that. I downloaded the 2.4 compatible
> release
> from https://gitlab.dune-project.org/staging/dune-functions/tree/releases/2.4-compatible and
> the dune-typetree module and I run, as usual,
> ./dune-common/bin/dunecontrol all. During compiling it stops with an error:
> 
> -- Build files have been written to:
> /Applications/DUNE/dune-functions/build-cmake
> --- calling make for dune-functions ---
> build directory: build-cmake
> cmake --build . -- 
> [ 33%] Built target poisson-pq2
> [ 50%] Building CXX object
> examples/CMakeFiles/stokes-taylorhood.dir/stokes-taylorhood.cc.o
> In file included from
> /Applications/DUNE/dune-functions/examples/stokes-taylorhood.cc
> <http://stokes-taylorhood.cc>:5:
> In file included from
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:265:
> In file included from
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__bit_reference:15:
> In file included from
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:627:
> In file included from
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/utility:157:
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__tuple:187:5:
> error: 
>       static_assert failed "tuple_element index out of range"
>     static_assert(_Ip != 0, "tuple_element index out of range");
>     ^             ~~~~~~~~
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/tuple:154:22:
> note: 
>       in instantiation of template class 'std::__1::tuple_element<0,
>       std::__1::__tuple_types<> >' requested here
>     typedef typename tuple_element<_Ip, __tuple_types<_Tp...> >::type type;
>                      ^
> /Applications/DUNE/dune-functions/dune/common/typeutilities.hh:31:43:
> note: in
>       instantiation of template class 'std::__1::tuple_element<0,
>       std::__1::tuple<> >' requested here
>     (not(std::is_same<This, typename std::tuple_element<0, std::tuple<ty...
>                                           ^
> /Applications/DUNE/dune-functions/dune/functions/functionspacebases/powerbasis.hh:92:50:
> note: 
>       in instantiation of template type alias 'disableCopyMove'
> requested here
>     disableCopyMove<PowerNodeFactory, SFArgs...> = 0,
>                                                  ^
> /Applications/DUNE/dune-functions/dune/functions/functionspacebases/powerbasis.hh:94:3:
> note: 
>       while substituting prior template arguments into non-type template
>       parameter [with SFArgs = <>]
>   PowerNodeFactory(SFArgs&&... sfArgs) :
>   ^~~~~~~~~~~~~~~~
> /Applications/DUNE/dune-functions/dune/functions/functionspacebases/powerbasis.hh:50:7:
> note: 
>       while substituting deduced template arguments into function template
>       'PowerNodeFactory' [with SFArgs = <>, $1 = (no value), $2 = (no
> value)]
> class PowerNodeFactory
>       ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/type_traits:2652:14:
> note: 
>       (skipping 6 contexts in backtrace; use
> -ftemplate-backtrace-limit=0 to see
>       all)
>     : public is_constructible<_Tp>
>              ^
> /Applications/DUNE/dune-functions/dune/functions/functionspacebases/compositebasis.hh:113:57:
> note: 
>       in instantiation of template type alias 'enableIfConstructible'
> requested
>       here
>     enableIfConstructible<std::tuple<SF...>, SFArgs...> = 0>
>                                                         ^
> /Applications/DUNE/dune-functions/dune/functions/functionspacebases/compositebasis.hh:114:3:
> note: 
>       while substituting prior template arguments into non-type template
>       parameter [with SFArgs =
>       <Dune::Functions::PowerNodeFactory<Dune::ReservedVector<unsigned
> long, 2>,
>       Dune::Functions::BasisTags::InterleafedIndex,
>      
> Dune::Functions::PQkNodeFactory<Dune::GridView<Dune::DefaultLeafGridViewTraits<const
>       Dune::YaspGrid<2, Dune::EquidistantCoordinates<double, 2> >,
>       Dune::PartitionIteratorType::All_Partition> >, 2,
>       Dune::ReservedVector<unsigned long, 2>, unsigned long>, 2>,
>      
> Dune::Functions::PQkNodeFactory<Dune::GridView<Dune::DefaultLeafGridViewTraits<const
>       Dune::YaspGrid<2, Dune::EquidistantCoordinates<double, 2> >,
>       Dune::PartitionIteratorType::All_Partition> >, 1,
>       Dune::ReservedVector<unsigned long, 2>, unsigned long>>, $1 = 0]
>   CompositeNodeFactory(SFArgs&&... sfArgs) :
>   ^~~~~~~~~~~~~~~~~~~~
> /Applications/DUNE/dune-functions/dune/functions/functionspacebases/compositebasis.hh:402:12:
> note: 
>       while substituting deduced template arguments into function template
>       'CompositeNodeFactory' [with SFArgs =
>       <Dune::Functions::PowerNodeFactory<Dune::ReservedVector<unsigned
> long, 2>,
>       Dune::Functions::BasisTags::InterleafedIndex,
>      
> Dune::Functions::PQkNodeFactory<Dune::GridView<Dune::DefaultLeafGridViewTraits<const
>       Dune::YaspGrid<2, Dune::EquidistantCoordinates<double, 2> >,
>       Dune::PartitionIteratorType::All_Partition> >, 2,
>       Dune::ReservedVector<unsigned long, 2>, unsigned long>, 2>,
>      
> Dune::Functions::PQkNodeFactory<Dune::GridView<Dune::DefaultLeafGridViewTraits<const
>       Dune::YaspGrid<2, Dune::EquidistantCoordinates<double, 2> >,
>       Dune::PartitionIteratorType::All_Partition> >, 1,
>       Dune::ReservedVector<unsigned long, 2>, unsigned long>>, $1 = (no
> value),
>       $2 = (no value)]
>     return {SubFactoryTags().template build<MultiIndex, GridView, size_t...
>            ^
> /Applications/DUNE/dune-functions/dune/functions/functionspacebases/defaultglobalbasis.hh:122:31:
> note: 
>       in instantiation of function template specialization
>      
> 'Dune::Functions::BasisBuilder::Imp::CompositeNodeFactoryBuilder<Dune::Functions::BasisTags::BlockedIndex,
>       Dune::Functions::BasisBuilder::Imp::PowerNodeFactoryBuilder<2,
>       Dune::Functions::BasisTags::InterleafedIndex,
>       Dune::Functions::BasisBuilder::Imp::PQkNodeFactoryBuilder<2> >,
>       Dune::Functions::BasisBuilder::Imp::PQkNodeFactoryBuilder<1>
>       >::build<Dune::ReservedVector<unsigned long, 2>,
>       Dune::GridView<Dune::DefaultLeafGridViewTraits<const Dune::YaspGrid<2,
>       Dune::EquidistantCoordinates<double, 2> >,
>       Dune::PartitionIteratorType::All_Partition> >, unsigned long>'
> requested
>       here
>   return {factoryTag.template build<MultiIndex>(gridView)};
>                               ^
> /Applications/DUNE/dune-functions/examples/stokes-taylorhood.cc
> <http://stokes-taylorhood.cc>:282:26: note: 
>       in instantiation of function template specialization
>      
> 'Dune::Functions::BasisBuilder::makeBasis<Dune::GridView<Dune::DefaultLeafGridViewTraits<const
>       Dune::YaspGrid<2, Dune::EquidistantCoordinates<double, 2> >,
>       Dune::PartitionIteratorType::All_Partition> >,
>      
> Dune::Functions::BasisBuilder::Imp::CompositeNodeFactoryBuilder<Dune::Functions::BasisTags::BlockedIndex,
>       Dune::Functions::BasisBuilder::Imp::PowerNodeFactoryBuilder<2,
>       Dune::Functions::BasisTags::InterleafedIndex,
>       Dune::Functions::BasisBuilder::Imp::PQkNodeFactoryBuilder<2> >,
>       Dune::Functions::BasisBuilder::Imp::PQkNodeFactoryBuilder<1> >,
> unsigned
>       long>' requested here
>   auto taylorHoodBasis = makeBasis(
>                          ^
> 1 error generated.
> make[2]: ***
> [examples/CMakeFiles/stokes-taylorhood.dir/stokes-taylorhood.cc.o] Error 1
> make[1]: *** [examples/CMakeFiles/stokes-taylorhood.dir/all] Error 2
> make: *** [all] Error 2
> --- Failed to build dune-functions ---
> Terminating dunecontrol due to previous errors!
> 
> 
> Someone can help here?
> 
> Thank you in advance,
> Francesco
> 
> ___________________________________________
> INVESTI SUL FUTURO, FAI CRESCERE L’UNIVERSITÀ:
> 
> *DONA IL 5 PER MILLE ALLA SAPIENZA*
> 
> CODICE FISCALE *80209930587*
> 
> 
> 
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
> 

-- 
The method has been developed for use on a high-speed electronic
computer and would be impractical for hand-solution purposes.
                                           [Harlow & Welch 1965]

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20160601/ac3b7ece/attachment.sig>


More information about the Dune mailing list