[Trilinos-Users] [12.2.1] compiler error with Teuchos on Clang

Denis Davydov davydden at gmail.com
Thu Aug 13 10:47:18 EDT 2015


Dear all, 

the most recent version of Trilinos does not seem to like Clang at all and supposedly wasn’t tested with Apple’s compiler.
The error is below.

Kind regards,
Denis 

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:1594:25: error: no member named 'max_size' in 'Teuchos::Details::Allocator<int>'
            {return __a.max_size();}
                    ~~~ ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:1491:17: note: in instantiation of member function 'std::__1::allocator_traits<Teuchos::Details::Allocator<int> >::__max_size' requested here
        {return __max_size(__has_max_size<const allocator_type>(), __a);}
                ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:934:50: note: in instantiation of member function 'std::__1::allocator_traits<Teuchos::Details::Allocator<int> >::max_size' requested here
    return _VSTD::min<size_type>(__alloc_traits::max_size(this->__alloc()), numeric_limits<size_type>::max() / 2);  // end() >= begin(), always
                                                 ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:911:15: note: in instantiation of member function 'std::__1::vector<int, Teuchos::Details::Allocator<int> >::max_size' requested here
    if (__n > max_size())
              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:1070:9: note: in instantiation of member function 'std::__1::vector<int, Teuchos::Details::Allocator<int> >::allocate' requested here
        allocate(__n);
        ^
/Users/davydden/Downloads/trilinos-12.2.1-Source/packages/teuchos/core/test/Allocator/Allocator.cpp:217:38: note: in instantiation of member function 'std::__1::vector<int, Teuchos::Details::Allocator<int> >::vector' requested here
    std::vector<int, int_alloc_type> intVec (numEntries);
                                     ^
In file included from /Users/davydden/Downloads/trilinos-12.2.1-Source/packages/teuchos/core/test/Allocator/Allocator.cpp:42:
In file included from /Users/davydden/Downloads/trilinos-12.2.1-Source/packages/teuchos/core/src/Teuchos_Details_Allocator.hpp:53:
In file included from /Users/davydden/Downloads/trilinos-12.2.1-Source/packages/teuchos/core/src/Teuchos_ConfigDefs.hpp:85:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:439:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:628:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:1594:25: error: no member named 'max_size' in 'Teuchos::Details::Allocator<double>'
            {return __a.max_size();}
                    ~~~ ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:1491:17: note: in instantiation of member function 'std::__1::allocator_traits<Teuchos::Details::Allocator<double> >::__max_size' requested here
        {return __max_size(__has_max_size<const allocator_type>(), __a);}
                ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:934:50: note: in instantiation of member function 'std::__1::allocator_traits<Teuchos::Details::Allocator<double> >::max_size' requested here
    return _VSTD::min<size_type>(__alloc_traits::max_size(this->__alloc()), numeric_limits<size_type>::max() / 2);  // end() >= begin(), always
                                                 ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:911:15: note: in instantiation of member function 'std::__1::vector<double, Teuchos::Details::Allocator<double> >::max_size' requested here
    if (__n > max_size())
              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:1070:9: note: in instantiation of member function 'std::__1::vector<double, Teuchos::Details::Allocator<double> >::allocate' requested here
        allocate(__n);
        ^
/Users/davydden/Downloads/trilinos-12.2.1-Source/packages/teuchos/core/test/Allocator/Allocator.cpp:220:44: note: in instantiation of member function 'std::__1::vector<double, Teuchos::Details::Allocator<double> >::vector' requested here
    std::vector<double, double_alloc_type> dblVec (numEntries);
                                           ^
In file included from /Users/davydden/Downloads/trilinos-12.2.1-Source/packages/teuchos/core/test/Allocator/Allocator.cpp:42:
In file included from /Users/davydden/Downloads/trilinos-12.2.1-Source/packages/teuchos/core/src/Teuchos_Details_Allocator.hpp:53:
In file included from /Users/davydden/Downloads/trilinos-12.2.1-Source/packages/teuchos/core/src/Teuchos_ConfigDefs.hpp:85:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:439:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:628:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:1594:25: error: no member named 'max_size' in 'Teuchos::Details::Allocator<std::__1::basic_string<char> >'
            {return __a.max_size();}
                    ~~~ ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:1491:17: note: in instantiation of member function 'std::__1::allocator_traits<Teuchos::Details::Allocator<std::__1::basic_string<char> > >::__max_size'
      requested here
        {return __max_size(__has_max_size<const allocator_type>(), __a);}
                ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:934:50: note: in instantiation of member function 'std::__1::allocator_traits<Teuchos::Details::Allocator<std::__1::basic_string<char> > >::max_size' requested
      here
    return _VSTD::min<size_type>(__alloc_traits::max_size(this->__alloc()), numeric_limits<size_type>::max() / 2);  // end() >= begin(), always
                                                 ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:911:15: note: in instantiation of member function 'std::__1::vector<std::__1::basic_string<char>, Teuchos::Details::Allocator<std::__1::basic_string<char> >
      >::max_size' requested here
    if (__n > max_size())
              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:1070:9: note: in instantiation of member function 'std::__1::vector<std::__1::basic_string<char>, Teuchos::Details::Allocator<std::__1::basic_string<char> >
      >::allocate' requested here
        allocate(__n);
        ^
/Users/davydden/Downloads/trilinos-12.2.1-Source/packages/teuchos/core/test/Allocator/Allocator.cpp:269:49: note: in instantiation of member function 'std::__1::vector<std::__1::basic_string<char>, Teuchos::Details::Allocator<std::__1::basic_string<char> > >::vector'
      requested here
    std::vector<std::string, string_alloc_type> vec (numEntries);
                                                ^
3 errors generated.
make[2]: *** [packages/teuchos/core/test/Allocator/CMakeFiles/TeuchosCore_Allocator_UnitTest.dir/Allocator.cpp.o] Error 1
make[1]: *** [packages/teuchos/core/test/Allocator/CMakeFiles/TeuchosCore_Allocator_UnitTest.dir/all] Error 2
make: *** [all] Error 2



More information about the Trilinos-Users mailing list