#432 [Test Suite] fails to compile lrutest
Metadata
Property | Value |
---|---|
Reported by | Elias Pipping (elias.pipping@fu-berlin.de) |
Reported at | Oct 1, 2008 15:27 |
Type | Bug Report |
Version | Git (pre2.4) [autotools] |
Operating System | Mac OS |
Last edited by | Markus Blatt (markus@dr-blatt.de) |
Last edited at | Oct 2, 2008 15:06 |
Closed by | Markus Blatt (markus@dr-blatt.de) |
Closed at | Oct 2, 2008 15:06 |
Closed in version | Unknown |
Resolution | Fixed |
Comment | Fixed in revision 5299 |
Description
I'm here:
pipping@quicksand $ pwd /Users/pipping/Desktop/dune-common/common/test
This is what I'd like to do:
pipping@quicksand $ make -n lrutest g++ -DHAVE_CONFIG_H -I. -I../.. -I../.. -g -O2 -Wall -MT lrutest.o -MD -MP -MF .deps/lrutest.Tpo -c -o lrutest.o lrutest.cc mv -f .deps/lrutest.Tpo .deps/lrutest.Po rm -f lrutest /bin/sh ../../libtool --tag=CXX --mode=link g++ -g -O2 -Wall ../../common/libcommon.la -o lrutest lrutest.o -lm
(usually, make check
does that, but since the rest of make check
compiles and runs fine I've singled out this particular target).
With a g++ other than Apple's in (/Developer)/usr/bin, this will just work[1]:
pipping@quicksand $ g++ -dumpversion; g++ -dumpmachine
4.2.4
i686-apple-darwin9
pipping@quicksand $ make lrutest g++ -DHAVE_CONFIG_H -I. -I../.. -I../.. -g -O2 -Wall -MT lrutest.o -MD -MP -MF .deps/lrutest.Tpo -c -o lrutest.o lrutest.cc mv -f .deps/lrutest.Tpo .deps/lrutest.Po /bin/sh ../../libtool --tag=CXX --mode=link g++ -g -O2 -Wall ../../common/libcommon.la -o lrutest lrutest.o -lm libtool: link: g++ -g -O2 -Wall -o lrutest lrutest.o ../../common/.libs/libcommon.a -lm
It will not, however work with apple's g++ (be it 4.0.1 or 4.2.1 -- they both use the same libstdc++ from my understanding).
pipping@quicksand $ /usr/bin/g++ -dumpversion; /usr/bin/g++ -dumpmachine 4.0.1 i686-apple-darwin9
pipping@quicksand $ make lrutest CXX=/usr/bin/g++ /usr/bin/g++ -DHAVE_CONFIG_H -I. -I../.. -I../.. -g -O2 -Wall -MT lrutest.o -MD -MP -MF .deps/lrutest.Tpo -c -o lrutest.o lrutest.cc /usr/include/c++/4.0.0/bits/stl_tree.h: In member function ‘void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::destroy_node(std::_Rb_tree_node<_Val>*) [with _Key = int, _Val = std::pair<const int, std::_List_iterator<std::pair<int, double> > >, _KeyOfValue = std::_Select1st<std::pair<const int, std::_List_iterator<std::pair<int, double> > > >, _Compare = std::less, _Alloc = std::allocator]’: /usr/include/c++/4.0.0/bits/stl_tree.h:1058: instantiated from ‘void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_erase(std::_Rb_tree_node<_Val>*) [with _Key = int, _Val = std::pair<const int, std::_List_iterator<std::pair<int, double> > >, _KeyOfValue = std::_Select1st<std::pair<const int, std::_List_iterator<std::pair<int, double> > > >, _Compare = std::less, _Alloc = std::allocator]’ /usr/include/c++/4.0.0/bits/stl_tree.h:570: instantiated from ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::~_Rb_tree() [with _Key = int, _Val = std::pair<const int, std::_List_iterator<std::pair<int, double> > >, _KeyOfValue = std::_Select1st<std::pair<const int, std::_List_iterator<std::pair<int, double> > > >, _Compare = std::less, _Alloc = std::allocator]’ /usr/include/c++/4.0.0/bits/stl_map.h:92: instantiated from here /usr/include/c++/4.0.0/bits/stl_tree.h:389: error: no matching function for call to ‘std::allocator::destroy(std::pair<const int, std::_List_iterator<std::pair<int, double> > >*)’ /usr/include/c++/4.0.0/ext/new_allocator.h:107: note: candidates are: void __gnu_cxx::new_allocator<_Tp>::destroy(_Tp*) [with _Tp = double] /usr/include/c++/4.0.0/bits/stl_tree.h: In member function ‘std::_Rb_tree_node<_Val>* std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_create_node(const _Val&) [with _Key = int, _Val = std::pair<const int, std::_List_iterator<std::pair<int, double> > >, _KeyOfValue = std::_Select1st<std::pair<const int, std::_List_iterator<std::pair<int, double> > > >, _Compare = std::less, _Alloc = std::allocator]’: /usr/include/c++/4.0.0/bits/stl_tree.h:789: instantiated from ‘typename std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, const _Val&) [with _Key = int, _Val = std::pair<const int, std::_List_iterator<std::pair<int, double> > >, _KeyOfValue = std::_Select1st<std::pair<const int, std::_List_iterator<std::pair<int, double> > > >, _Compare = std::less, _Alloc = std::allocator]’ /usr/include/c++/4.0.0/bits/stl_tree.h:903: instantiated from ‘typename std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::insert_unique(std::_Rb_tree_iterator<_Val>, const _Val&) [with _Key = int, _Val = std::pair<const int, std::_List_iterator<std::pair<int, double> > >, _KeyOfValue = std::_Select1st<std::pair<const int, std::_List_iterator<std::pair<int, double> > > >, _Compare = std::less, _Alloc = std::allocator]’ /usr/include/c++/4.0.0/bits/stl_map.h:384: instantiated from ‘typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::insert(typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, _Alloc>::iterator, const std::pair<const _Key, _Tp>&) [with _Key = int, _Tp = std::_List_iterator<std::pair<int, double> >, _Compare = std::less, _Alloc = std::allocator]’ /usr/include/c++/4.0.0/bits/stl_map.h:339: instantiated from ‘_Tp& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const _Key&) [with _Key = int, _Tp = std::_List_iterator<std::pair<int, double> >, _Compare = std::less, _Alloc = std::allocator]’ ../../dune/common/lru.hh:151: instantiated from ‘typename _Traits::allocator::reference Dune::lru<_Key, _Tp, _Traits>::insert(const typename _Traits::key_type&, typename _Traits::allocator::const_reference) [with _Key = int, _Tp = double, _Traits = Dune::_lru_default_traits<int, double, std::allocator >]’ lrutest.cc:10: instantiated from here /usr/include/c++/4.0.0/bits/stl_tree.h:367: error: no matching function for call to ‘std::allocator::construct(std::pair<const int, std::_List_iterator<std::pair<int, double> > >*, const std::pair<const int, std::_List_iterator<std::pair<int, double> > >&)’ /usr/include/c++/4.0.0/ext/new_allocator.h:103: note: candidates are: void __gnu_cxx::new_allocator<_Tp>::construct(_Tp*, const _Tp&) [with _Tp = double] make: *** [lrutest.o] Error 1
Looks like it's a problem not with the dune's code but with the compiler.
The particular build I've tried this with is
pipping@quicksand $ /usr/bin/g++ --version | head -n1 i686-apple-darwin9-g++-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5488)
from v3.1.1 of the Developer Tools (hence, the latest official release).
[1] I've installed gcc 4.2.4 via Portage Prefix[2]. [2] http://www.gentoo.org/proj/en/gentoo-alt/prefix/index.xml