stl_unit_test fails with mingw-g++-4.2.1-dw2

Help
2007-09-08
2013-05-13
  • archimed7592

    archimed7592 - 2007-09-08

    I tried to build STLport-5.1.3 with <a href="http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=241304&release_id=532060">mingw technology preview gcc-4.2.1-dw2-2</a>.
    After creating NTFS junction for libstdc++ include folder with name "4.2.1" STLport successfuly built(library and tests) with some warnings like these:
    c++ -Wall -Wsign-promo -Wcast-qual -fexceptions -fident -mthreads -g -fno-inline -D_STLP_DEBUG -I../../stlport  -c -o obj/gcc/so_stlg/strstream.o ../../src/strstream.cpp
    In file included from ../../stlport/iosfwd:37,
                     from ../../stlport/stl/_string_fwd.h:23,
                     from ../../stlport/stl/_stdexcept_base.h:36,
                     from ../../stlport/stl/_ios_base.h:22,
                     from ../../stlport/stl/_streambuf.h:22,
                     from ../../stlport/stl/_strstream.h:22,
                     from ../../stlport/strstream:39,
                     from ../../src/strstream.cpp:27:
    ../../stlport/stl/_iosfwd.h:103: warning: attributes ignored on template instantiation
    ../../stlport/stl/_iosfwd.h:104: warning: attributes ignored on template instantiation
    ../../stlport/stl/_iosfwd.h:105: warning: attributes ignored on template instantiation
    ../../stlport/stl/_iosfwd.h:106: warning: attributes ignored on template instantiation
    ../../stlport/stl/_iosfwd.h:109: warning: attributes ignored on template instantiation
    ../../stlport/stl/_iosfwd.h:110: warning: attributes ignored on template instantiation
    ../../stlport/stl/_iosfwd.h:111: warning: attributes ignored on template instantiation
    ../../stlport/stl/_iosfwd.h:112: warning: attributes ignored on template instantiation
    ../../stlport/stl/debug/_iterator.h: In constructor 'stlp_priv::_DBG_iter_base<_Container>::_DBG_iter_base(const stlp_priv::__owned_list*, const typename _Container::const_iterator&) [with _Container = stlp_priv::_NonDbg_str<char, stlpd_std::char_traits<char>, stlpd_std::allocator<char> >]':
    ../../stlport/stl/debug/_iterator.h:197:   instantiated from 'stlp_priv::_DBG_iter_mid<_Container, _Traits>::_DBG_iter_mid(const stlp_priv::__owned_list*, const typename _Container::const_iterator&) [with _Container = stlp_priv::_NonDbg_str<char, stlpd_std::char_traits<char>, stlpd_std::allocator<char> >, _Traits = stlp_priv::_DbgTraits<stlpd_std::_Nonconst_traits<char> >]'
    ../../stlport/stl/debug/_iterator.h:227:   instantiated from 'stlp_priv::_DBG_iter<_Container, _Traits>::_DBG_iter(const stlp_priv::__owned_list*, const typename stlp_priv::_DBG_iter_base<_Container>::_Const_iterator&) [with _Container = stlp_priv::_NonDbg_str<char, stlpd_std::char_traits<char>, stlpd_std::allocator<char> >, _Traits = stlp_priv::_DbgTraits<stlpd_std::_Nonconst_traits<char> >]'
    ../../stlport/stl/debug/_string.h:181:   instantiated from 'stlp_priv::_DBG_iter<stlp_priv::_NonDbg_str<_CharT, _Traits, _Alloc>, stlp_priv::_DbgTraits<stlpd_std::_Nonconst_traits<typename stlp_priv::_NonDbg_str<_CharT, _Traits, _Alloc>::value_type> > > stlpd_std::basic_string<_CharT, _Traits, _Alloc>::begin() [with _CharT = char, _Traits = stlpd_std::char_traits<char>, _Alloc = stlpd_std::allocator<char>]'
    ../../stlport/stl/debug/_string.h:328:   instantiated from 'void stlpd_std::basic_string<_CharT, _Traits, _Alloc>::_M_check_assign(typename stlp_priv::_NonDbg_str<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char, _Traits = stlpd_std::char_traits<char>, _Alloc = stlpd_std::allocator<char>]'
    ../../stlport/stl/debug/_string.h:334:   instantiated from 'stlpd_std::basic_string<_CharT, _Traits, _Alloc>& stlpd_std::basic_string<_CharT, _Traits, _Alloc>::assign(const stlpd_std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = stlpd_std::char_traits<char>, _Alloc = stlpd_std::allocator<char>]'
    ../../stlport/stl/debug/_string.h:165:   instantiated from 'stlpd_std::basic_string<_CharT, _Traits, _Alloc>& stlpd_std::basic_string<_CharT, _Traits, _Alloc>::operator=(const stlpd_std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = stlpd_std::char_traits<char>, _Alloc = stlpd_std::allocator<char>]'
    ../../stlport/stl/_ios.c:77:   instantiated from 'stlpd_std::locale stlpd_std::basic_ios<_CharT, _Traits>::imbue(const stlpd_std::locale&) [with _CharT = char, _Traits = stlpd_std::char_traits<char>]'
    ../../stlport/stl/_ios.c:101:   instantiated from 'void stlpd_std::basic_ios<_CharT, _Traits>::init(stlpd_std::basic_streambuf<_CharT, _Traits>*) [with _CharT = char, _Traits = stlpd_std::char_traits<char>]'
    ../../src/strstream.cpp:295:   instantiated from here
    ../../stlport/stl/debug/_iterator.h:145: warning: cast from type 'const char* const*' to type 'char* const*' casts away constness

    OK. I tried to run stl_unit_test. I recieved this output:
    $ stl_unit_test.exe
    AccumTest::accum1
    AccumTest::accum2
    AdjTest::adjfind0
    AdjTest::adjfind1
    AdjTest::adjfind2
    AdjTest::adjdiff0
    AdjTest::adjdiff1
    AdjTest::adjdiff2
    AdvanceTest::adv
    AlgTest::min_max
    AlgTest::count_test
    AlgTest::sort_test
    AlgTest::search_n_test
    AlgTest::find_first_of_test
    AllocatorTest::zero_allocation
    AllocatorTest::bad_alloc_test
    BcomposTest::bcompos1
    BcomposTest::bcompos2
    BindTest::bind1st1
    BindTest::bind2nd1
    BindTest::bind2nd2
    BindTest::bind2nd3
    BindTest::bind_memfn
    BinsertTest::binsert1
    BinsertTest::binsert2
    BitsetTest::bitset1
    BnegateTest::bnegate1
    BnegateTest::bnegate2
    BoundTest::lwrbnd1
    BoundTest::lwrbnd2
    BoundTest::uprbnd1
    BoundTest::uprbnd2
    BsearchTest::bsearch1
    BsearchTest::bsearch2
    BvectorTest::bvec1
    CMathTest::test
    CodecvtTest::variable_encoding
    ConfigTest::placement_new_bug
    ConfigTest::endianess
    ConfigTest::template_function_partial_ordering
    CopyTest::copy_array
    CopyTest::copy_vector
    CopyTest::copy_insert
    CopyTest::copy_back
    CopyTest::copy_back_array
    CountTest::count0
    CountTest::count1
    CountTest::countif1
    DequeTest::deque1
    DequeTest::atterminate called after throwing an instance of 'stlp_std::out_of_range'
      what():  deque

    This application has requested the Runtime to terminate it in an unusual way.
    Please contact the application's support team for more information.

    Any ideas?

     
    • Petr Ovtchenkov

      Petr Ovtchenkov - 2007-09-08

      > This application has requested the Runtime to terminate it in an unusual way.
      > Please contact the application's support team for more information.
      >
      > Any ideas? 

      Follow instructions. Contact with Bill Gates first, and then with MinGW team: looks like exceptions are buggy in this OE.

       
    • Francois Dumont

      Francois Dumont - 2007-09-10

      AFAIR, I had found in MinGW doc something saying that to throw exceptions accross dlls bounderies users had to use the -mthread option. This is what STLport use, is it still supported with latest gcc version ?

      For me it is not a build system bug, it is simply not correctly configured for this beta gcc version. Maybe with final release it will work without any modification...

       
      • archimed7592

        archimed7592 - 2007-09-10

        Solution was given by Danny(MinGW developer, AFAICS).
        > Date: 2007-09-09 13:54
        > Sender: dannysmith
        > Logged In: YES
        > user_id=11494
        > Originator: NO
        >
        > If you want to throw exceptions across a dll boundary you need to build
        > dll and client exe  with --shared-libgcc.   Or port the mingw-specific
        > gcc-3.4.5 -win32-shared-ptr patches to gcc 4.x
        >
        > Danny
        On response for my bug-report here:
        https://sourceforge.net/tracker/index.php?func=detail&aid=1790974&group_id=2435&atid=102435

        Fix: Not --shared-libgcc. -shared-libgcc(only one heading '-').

         
    • Francois Dumont

      Francois Dumont - 2007-09-20

      I check your bug report on MinGW project. I am almost sure that the -win32-shared-ptr patch is the one that activate the -mthread option. We will wait for official MinGW gcc release to see if this patch is finally ported and integrated in gcc 4. If so we won't have to touch to STLport build system.

       

Log in to post a comment.