I didn't mean this bug report as a complaint. It could be a chance to solve issues with a compiler that's just around the corner before people who, contrary to me, actually try to get stuff done with dune. Personally, I'm just toying around and sharing oddities that I come across.
As dune-2.0.x will be the official realease for quite a while and linux distributions with gcc-4.5 as standard compiler will appear soon (e.g. OpenSUSE 11.3 in July) ignoring gcc-4.5 is IMHO not a good idea. If there are known problems we should try to fix them in 2.0.x.
In that case I suggest to setup automatic testing using gcc-4.5 (so that we know where the problems are). Moreover, this is an entirely different suggestion from this bug report.
pipping@bogus ~/Downloads/dune-grid-2.0/dune/grid/common/test $ make checkrefnumbering
g++-4.5 -std=c++0x -DHAVE_CONFIG_H -I. -I../../../.. -I/usr/include -I../../../.. -g -O2 -MT checkrefnumbering.o -M
mv -f .deps/checkrefnumbering.Tpo .deps/checkrefnumbering.Po
/bin/sh ../../../../libtool --tag=CXX --mode=link g++-4.5 -std=c++0x -g -O2 -o checkrefnumbering checkrefnumbering.o ../../../../dune/grid/libgrid.la -L/usr/lib -ldunecommon -lm
libtool: link: g++-4.5 -std=c++0x -g -O2 -o checkrefnumbering checkrefnumbering.o ../../../../dune/grid/.libs/libgrid.a -L/usr/lib /usr/lib64/libdunecommon.so /usr/lib64/../lib64/libstdc++.so -lm -Wl,-rpath -Wl,/usr/lib64/../lib64 -Wl,-rpath -Wl,/usr/lib64 -Wl,-rpath -Wl,/usr/lib64/../lib64 -Wl,-rpath -Wl,/usr/lib64
checkrefnumbering.o: In function ReferenceElements<1>::get(Dune::GeometryType const&)': /home/pipping/Downloads/dune-grid-2.0/dune/grid/common/test/checkrefnumbering.cc:44: undefined reference to Dune::ReferenceElements<double, 1>::general'
/home/pipping/Downloads/dune-grid-2.0/dune/grid/common/test/checkrefnumbering.cc:44: undefined reference to Dune::ReferenceElements<double, 1>::general' checkrefnumbering.o: In function ReferenceElements<2>::get(Dune::GeometryType const&)':
/home/pipping/Downloads/dune-grid-2.0/dune/grid/common/test/checkrefnumbering.cc:44: undefined reference to Dune::ReferenceElements<double, 2>::general' /home/pipping/Downloads/dune-grid-2.0/dune/grid/common/test/checkrefnumbering.cc:44: undefined reference to Dune::ReferenceElements<double, 2>::general'
checkrefnumbering.o: In function ReferenceElements<3>::get(Dune::GeometryType const&)': /home/pipping/Downloads/dune-grid-2.0/dune/grid/common/test/checkrefnumbering.cc:44: undefined reference to Dune::ReferenceElements<double, 3>::general'
/home/pipping/Downloads/dune-grid-2.0/dune/grid/common/test/checkrefnumbering.cc:44: undefined reference to Dune::ReferenceElements<double, 3>::general' /home/pipping/Downloads/dune-grid-2.0/dune/grid/common/test/checkrefnumbering.cc:44: undefined reference to Dune::ReferenceElements<double, 3>::general'
/home/pipping/Downloads/dune-grid-2.0/dune/grid/common/test/checkrefnumbering.cc:44: undefined reference to Dune::ReferenceElements<double, 3>::general' checkrefnumbering.o: In function ReferenceElements<1>::get(Dune::GeometryType const&)':
/home/pipping/Downloads/dune-grid-2.0/dune/grid/common/test/checkrefnumbering.cc:44: undefined reference to Dune::ReferenceElements<double, 1>::general' checkrefnumbering.o: In function ReferenceElements<2>::get(Dune::GeometryType const&)':
/home/pipping/Downloads/dune-grid-2.0/dune/grid/common/test/checkrefnumbering.cc:44: undefined reference to Dune::ReferenceElements<double, 2>::general' checkrefnumbering.o: In function ReferenceElements<3>::get(Dune::GeometryType const&)':
/home/pipping/Downloads/dune-grid-2.0/dune/grid/common/test/checkrefnumbering.cc:44: undefined reference to Dune::ReferenceElements<double, 3>::general' checkrefnumbering.o: In function ReferenceElements<1>::get(Dune::GeometryType const&)':
/home/pipping/Downloads/dune-grid-2.0/dune/grid/common/test/checkrefnumbering.cc:44: undefined reference to Dune::ReferenceElements<double, 1>::general' checkrefnumbering.o: In function ReferenceElements<2>::get(Dune::GeometryType const&)':
/home/pipping/Downloads/dune-grid-2.0/dune/grid/common/test/checkrefnumbering.cc:44: undefined reference to Dune::ReferenceElements<double, 2>::general' checkrefnumbering.o: In function ReferenceElements<1>::get(Dune::GeometryType const&)':
/home/pipping/Downloads/dune-grid-2.0/dune/grid/common/test/checkrefnumbering.cc:44: undefined reference to Dune::ReferenceElements<double, 1>::general' checkrefnumbering.o: In function ReferenceElements<0>::get(Dune::GeometryType const&)':
/home/pipping/Downloads/dune-grid-2.0/dune/grid/common/test/checkrefnumbering.cc:44: undefined reference to Dune::ReferenceElements<double, 0>::general' /home/pipping/Downloads/dune-grid-2.0/dune/grid/common/test/checkrefnumbering.cc:44: undefined reference to Dune::ReferenceElements<double, 0>::general'
/home/pipping/Downloads/dune-grid-2.0/dune/grid/common/test/checkrefnumbering.cc:44: undefined reference to `Dune::ReferenceElements<double, 0>::general'
collect2: ld returned 1 exit status
make: *** [checkrefnumbering] Error 1
pipping@bogus ~/Downloads/dune-grid-2.0 $ nm -C dune/grid/common/referenceelements.o |grep general
0000000000000000 V guard variable for Dune::ReferenceElements<double, 0>::general
0000000000000000 V guard variable for Dune::ReferenceElements<double, 1>::general
0000000000000000 V guard variable for Dune::ReferenceElements<double, 2>::general
0000000000000000 V guard variable for Dune::ReferenceElements<double, 3>::general
0000000000000000 V guard variable for Dune::ReferenceElements<float, 0>::general
0000000000000000 V guard variable for Dune::ReferenceElements<float, 1>::general
0000000000000000 V guard variable for Dune::ReferenceElements<float, 2>::general
0000000000000000 V guard variable for Dune::ReferenceElements<float, 3>::general
0000000000000000 u Dune::ReferenceElements<double, 0>::general
0000000000000000 u Dune::ReferenceElements<double, 1>::general
0000000000000000 u Dune::ReferenceElements<double, 2>::general
0000000000000000 u Dune::ReferenceElements<double, 3>::general
0000000000000000 u Dune::ReferenceElements<float, 0>::general
0000000000000000 u Dune::ReferenceElements<float, 1>::general
0000000000000000 u Dune::ReferenceElements<float, 2>::general
0000000000000000 u Dune::ReferenceElements<float, 3>::general
pipping@bogus ~/Downloads/dune-grid-2.0 $ nm -C dune/grid/.libs/libgrid.a |grep general
0000000000000000 V guard variable for Dune::ReferenceElements<double, 0>::general
0000000000000000 V guard variable for Dune::ReferenceElements<double, 1>::general
0000000000000000 V guard variable for Dune::ReferenceElements<double, 2>::general
0000000000000000 V guard variable for Dune::ReferenceElements<double, 3>::general
0000000000000000 V guard variable for Dune::ReferenceElements<float, 0>::general
0000000000000000 V guard variable for Dune::ReferenceElements<float, 1>::general
0000000000000000 V guard variable for Dune::ReferenceElements<float, 2>::general
0000000000000000 V guard variable for Dune::ReferenceElements<float, 3>::general
0000000000000000 u Dune::ReferenceElements<double, 0>::general
0000000000000000 u Dune::ReferenceElements<double, 1>::general
0000000000000000 u Dune::ReferenceElements<double, 2>::general
0000000000000000 u Dune::ReferenceElements<double, 3>::general
0000000000000000 u Dune::ReferenceElements<float, 0>::general
0000000000000000 u Dune::ReferenceElements<float, 1>::general
0000000000000000 u Dune::ReferenceElements<float, 2>::general
0000000000000000 u Dune::ReferenceElements<float, 3>::general
pipping@bogus ~/Downloads/dune-grid-2.0 $ grep DUNE_ENABLE_OLD_NUMBERING config.h
#define DUNE_ENABLE_OLD_NUMBERING 1
pipping@bogus ~/Downloads/dune-grid-2.0 $
I just gave it a shot (using svn version of the release). After disabling alberta (whose lib does not compile for gcc-4.5), it compiled and linked out of the box. Can you help reproducing the error?
A very incomplete list of questions could be:
Do I need the tarball or does it happen in the svn version, too?
Does it happen in 2.0.1, too?
Does it happen for other compilers (e.g., gcc-4.4 or gcc-4.3)?
Are the compiler flags important (i.e., does it happen without optimization)?
And of course, you should answer the obvious questions (maybe I just missed the ansers):
What is your linux distribution?
What is the architecture (i.e., i386 or amd64)?
How did you obtain this compiler (i.e., package or compiled by hand)?
What do you configure DUNE with?
Maybe someone else could also try to reproduce this "bug"?
Since the stuff is in the lib we can try to reduce the testcase. Could you try if the attached example compiles in dune-grid with one of the following:
That's strange. One possible reason for failed linking if the symbol is defined is a wrong linking order. Although the order should be correct you could try to reverse it:
You can also allow an arbitrary order. To this end use the collect2 command printed by the last command and enclose the above lib and object file with --start-group and --end-group.
U std::basic_ios<char, std::char_traits<char> >::~basic_ios() U std::basic_ios<char, std::char_traits<char> >::init(std::basic_streambuf<char, std::char_traits<char> >*)
U std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) U std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) U std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream()
U std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const U std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string() U std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) U std::ios_base::Init::~Init() U std::ios_base::Init::Init()
U std::ios_base::~ios_base() U std::ios_base::ios_base() U std::locale::~locale() U std::locale::locale() U std::string::assign(std::string const&) U std::string::_Rep::_M_destroy(std::allocator<char> const&)
U std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) U std::string::_Rep::_S_empty_rep_storage
U std::string::swap(std::string&) U std::terminate()
U std::__throw_logic_error(char const*) U _Unwind_Resume U vtable for __cxxabiv1::__class_type_info U vtable for __cxxabiv1::__si_class_type_info
@@ -42,35 +71,6 @@
U vtable for std::basic_streambuf<char, std::char_traits >
U vtable for std::basic_stringbuf<char, std::char_traits, std::allocator >
U VTT for std::basic_ostringstream<char, std::char_traits, std::allocator >
-V Dune::ReferenceElements<double, 0>::cube
-V Dune::ReferenceElements<double, 0>::general
-V Dune::ReferenceElements<double, 0>::simplices
-V Dune::ReferenceElements<double, 1>::cube
-V Dune::ReferenceElements<double, 1>::general
-V Dune::ReferenceElements<double, 1>::simplices
-V Dune::ReferenceElements<double, 2>::cube
-V Dune::ReferenceElements<double, 2>::general
-V Dune::ReferenceElements<double, 2>::simplices
-V Dune::ReferenceElements<double, 3>::cube
-V Dune::ReferenceElements<double, 3>::general
-V Dune::ReferenceElements<double, 3>::prism
-V Dune::ReferenceElements<double, 3>::pyramid
-V Dune::ReferenceElements<double, 3>::simplices
-V Dune::ReferenceElements<float, 0>::cube
-V Dune::ReferenceElements<float, 0>::general
-V Dune::ReferenceElements<float, 0>::simplices
-V Dune::ReferenceElements<float, 1>::cube
-V Dune::ReferenceElements<float, 1>::general
-V Dune::ReferenceElements<float, 1>::simplices
-V Dune::ReferenceElements<float, 2>::cube
-V Dune::ReferenceElements<float, 2>::general
-V Dune::ReferenceElements<float, 2>::simplices
-V Dune::ReferenceElements<float, 3>::cube
-V Dune::ReferenceElements<float, 3>::general
-V Dune::ReferenceElements<float, 3>::prism
-V Dune::ReferenceElements<float, 3>::pyramid
-V Dune::ReferenceElements<float, 3>::simplices
-V guard variable for Dune::operator<<(std::ostream&, Dune::PartitionIteratorType const&)::name
V guard variable for Dune::ReferenceElements<double, 0>::cube
V guard variable for Dune::ReferenceElements<double, 0>::general
V guard variable for Dune::ReferenceElements<double, 0>::simplices
@@ -99,7 +99,6 @@
V guard variable for Dune::ReferenceElements<float, 3>::prism
V guard variable for Dune::ReferenceElements<float, 3>::pyramid
V guard variable for Dune::ReferenceElements<float, 3>::simplices
-V guard variable for Dune::SmallObjectPool::instance()::inst
V typeinfo for Dune::Exception
V typeinfo for Dune::GridError
V typeinfo for Dune::RangeError
@@ -230,7 +229,10 @@
V vtable for Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 1> >
V vtable for Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 2> >
V vtable for Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 3> >
+W char* std::string::_S_construct<char*>(char*, char*, std::allocator const&, std::forward_iterator_tag)
W Dune::GridError::~GridError()
+W Dune::GridError::~GridError()
+W Dune::RangeError::~RangeError()
W Dune::RangeError::~RangeError()
W Dune::ReferenceCube<double, 1>::generate(int, int, Dune::FieldVector<int, 1>&)
W Dune::ReferenceCube<double, 1>::generatesub(int, int, Dune::FieldVector<int, 1>&, Dune::FieldVector<int, 1>&, int)
@@ -245,32 +247,53 @@
W Dune::ReferenceCube<float, 3>::generate(int, int, Dune::FieldVector<int, 3>&)
W Dune::ReferenceCube<float, 3>::generatesub(int, int, Dune::FieldVector<int, 3>&, Dune::FieldVector<int, 3>&, int)
W Dune::ReferenceElementContainer<double, 0>::~ReferenceElementContainer()
+W Dune::ReferenceElementContainer<double, 0>::~ReferenceElementContainer()
W Dune::ReferenceElementContainer<double, 1>::~ReferenceElementContainer()
+W Dune::ReferenceElementContainer<double, 1>::~ReferenceElementContainer()
+W Dune::ReferenceElementContainer<double, 2>::~ReferenceElementContainer()
W Dune::ReferenceElementContainer<double, 2>::~ReferenceElementContainer()
W Dune::ReferenceElementContainer<double, 3>::~ReferenceElementContainer()
+W Dune::ReferenceElementContainer<double, 3>::~ReferenceElementContainer()
+W Dune::ReferenceElementContainer<double, 3>::ReferenceElementContainer()
+W Dune::ReferenceElementContainer<double, 3>::ReferenceElementContainer()
+W Dune::ReferenceElementContainer<float, 0>::~ReferenceElementContainer()
W Dune::ReferenceElementContainer<float, 0>::~ReferenceElementContainer()
W Dune::ReferenceElementContainer<float, 1>::~ReferenceElementContainer()
+W Dune::ReferenceElementContainer<float, 1>::~ReferenceElementContainer()
W Dune::ReferenceElementContainer<float, 2>::~ReferenceElementContainer()
+W Dune::ReferenceElementContainer<float, 2>::~ReferenceElementContainer()
+W Dune::ReferenceElementContainer<float, 3>::~ReferenceElementContainer()
W Dune::ReferenceElementContainer<float, 3>::~ReferenceElementContainer()
+W Dune::ReferenceElementContainer<float, 3>::ReferenceElementContainer()
+W Dune::ReferenceElementContainer<float, 3>::ReferenceElementContainer()
W Dune::ReferenceElement<double, 0>::~ReferenceElement()
W Dune::ReferenceElement<double, 0>::~ReferenceElement()
+W Dune::ReferenceElement<double, 0>::~ReferenceElement()
+W Dune::ReferenceElement<double, 1>::~ReferenceElement()
W Dune::ReferenceElement<double, 1>::~ReferenceElement()
W Dune::ReferenceElement<double, 1>::~ReferenceElement()
W Dune::ReferenceElement<double, 2>::~ReferenceElement()
W Dune::ReferenceElement<double, 2>::~ReferenceElement()
+W Dune::ReferenceElement<double, 2>::~ReferenceElement()
W Dune::ReferenceElement<double, 3>::~ReferenceElement()
W Dune::ReferenceElement<double, 3>::~ReferenceElement()
+W Dune::ReferenceElement<double, 3>::~ReferenceElement()
+W Dune::ReferenceElement<float, 0>::~ReferenceElement()
W Dune::ReferenceElement<float, 0>::~ReferenceElement()
W Dune::ReferenceElement<float, 0>::~ReferenceElement()
W Dune::ReferenceElement<float, 1>::~ReferenceElement()
W Dune::ReferenceElement<float, 1>::~ReferenceElement()
+W Dune::ReferenceElement<float, 1>::~ReferenceElement()
+W Dune::ReferenceElement<float, 2>::~ReferenceElement()
W Dune::ReferenceElement<float, 2>::~ReferenceElement()
W Dune::ReferenceElement<float, 2>::~ReferenceElement()
W Dune::ReferenceElement<float, 3>::~ReferenceElement()
W Dune::ReferenceElement<float, 3>::~ReferenceElement()
+W Dune::ReferenceElement<float, 3>::~ReferenceElement()
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 0> >::position(int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 0> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 0> >::~ReferenceElementWrapper()
+W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 0> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 0> >::size(int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 0> >::size(int, int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 0> >::subEntity(int, int, int, int) const
@@ -279,6 +302,7 @@
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 1> >::position(int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 1> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 1> >::~ReferenceElementWrapper()
+W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 1> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 1> >::size(int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 1> >::size(int, int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 1> >::subEntity(int, int, int, int) const
@@ -287,6 +311,7 @@
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 2> >::position(int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 2> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 2> >::~ReferenceElementWrapper()
+W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 2> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 2> >::size(int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 2> >::size(int, int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 2> >::subEntity(int, int, int, int) const
@@ -295,6 +320,7 @@
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 3> >::position(int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 3> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 3> >::~ReferenceElementWrapper()
+W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 3> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 3> >::size(int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 3> >::size(int, int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<double, 3> >::subEntity(int, int, int, int) const
@@ -303,6 +329,7 @@
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 0> >::position(int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 0> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 0> >::~ReferenceElementWrapper()
+W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 0> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 0> >::size(int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 0> >::size(int, int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 0> >::subEntity(int, int, int, int) const
@@ -311,6 +338,7 @@
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 1> >::position(int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 1> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 1> >::~ReferenceElementWrapper()
+W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 1> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 1> >::size(int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 1> >::size(int, int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 1> >::subEntity(int, int, int, int) const
@@ -319,6 +347,7 @@
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 2> >::position(int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 2> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 2> >::~ReferenceElementWrapper()
+W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 2> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 2> >::size(int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 2> >::size(int, int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 2> >::subEntity(int, int, int, int) const
@@ -327,6 +356,7 @@
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 3> >::position(int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 3> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 3> >::~ReferenceElementWrapper()
+W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 3> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 3> >::size(int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 3> >::size(int, int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceCube<float, 3> >::subEntity(int, int, int, int) const
@@ -335,6 +365,7 @@
W Dune::ReferenceElementWrapper<Dune::ReferencePrism<double, 3> >::position(int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferencePrism<double, 3> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferencePrism<double, 3> >::~ReferenceElementWrapper()
+W Dune::ReferenceElementWrapper<Dune::ReferencePrism<double, 3> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferencePrism<double, 3> >::size(int) const
W Dune::ReferenceElementWrapper<Dune::ReferencePrism<double, 3> >::size(int, int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferencePrism<double, 3> >::subEntity(int, int, int, int) const
@@ -343,6 +374,7 @@
W Dune::ReferenceElementWrapper<Dune::ReferencePrism<float, 3> >::position(int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferencePrism<float, 3> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferencePrism<float, 3> >::~ReferenceElementWrapper()
+W Dune::ReferenceElementWrapper<Dune::ReferencePrism<float, 3> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferencePrism<float, 3> >::size(int) const
W Dune::ReferenceElementWrapper<Dune::ReferencePrism<float, 3> >::size(int, int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferencePrism<float, 3> >::subEntity(int, int, int, int) const
@@ -351,6 +383,7 @@
W Dune::ReferenceElementWrapper<Dune::ReferencePyramid<double, 3> >::position(int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferencePyramid<double, 3> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferencePyramid<double, 3> >::~ReferenceElementWrapper()
+W Dune::ReferenceElementWrapper<Dune::ReferencePyramid<double, 3> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferencePyramid<double, 3> >::size(int) const
W Dune::ReferenceElementWrapper<Dune::ReferencePyramid<double, 3> >::size(int, int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferencePyramid<double, 3> >::subEntity(int, int, int, int) const
@@ -359,6 +392,7 @@
W Dune::ReferenceElementWrapper<Dune::ReferencePyramid<float, 3> >::position(int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferencePyramid<float, 3> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferencePyramid<float, 3> >::~ReferenceElementWrapper()
+W Dune::ReferenceElementWrapper<Dune::ReferencePyramid<float, 3> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferencePyramid<float, 3> >::size(int) const
W Dune::ReferenceElementWrapper<Dune::ReferencePyramid<float, 3> >::size(int, int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferencePyramid<float, 3> >::subEntity(int, int, int, int) const
@@ -367,6 +401,7 @@
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 0> >::position(int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 0> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 0> >::~ReferenceElementWrapper()
+W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 0> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 0> >::size(int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 0> >::size(int, int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 0> >::subEntity(int, int, int, int) const
@@ -375,6 +410,7 @@
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 1> >::position(int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 1> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 1> >::~ReferenceElementWrapper()
+W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 1> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 1> >::size(int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 1> >::size(int, int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 1> >::subEntity(int, int, int, int) const
@@ -383,6 +419,7 @@
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 2> >::position(int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 2> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 2> >::~ReferenceElementWrapper()
+W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 2> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 2> >::size(int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 2> >::size(int, int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 2> >::subEntity(int, int, int, int) const
@@ -391,6 +428,7 @@
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 3> >::position(int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 3> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 3> >::~ReferenceElementWrapper()
+W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 3> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 3> >::size(int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 3> >::size(int, int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<double, 3> >::subEntity(int, int, int, int) const
@@ -399,6 +437,7 @@
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 0> >::position(int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 0> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 0> >::~ReferenceElementWrapper()
+W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 0> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 0> >::size(int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 0> >::size(int, int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 0> >::subEntity(int, int, int, int) const
@@ -407,6 +446,7 @@
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 1> >::position(int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 1> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 1> >::~ReferenceElementWrapper()
+W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 1> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 1> >::size(int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 1> >::size(int, int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 1> >::subEntity(int, int, int, int) const
@@ -415,6 +455,7 @@
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 2> >::position(int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 2> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 2> >::~ReferenceElementWrapper()
+W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 2> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 2> >::size(int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 2> >::size(int, int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 2> >::subEntity(int, int, int, int) const
@@ -423,24 +464,17 @@
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 3> >::position(int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 3> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 3> >::~ReferenceElementWrapper()
+W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 3> >::~ReferenceElementWrapper()
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 3> >::size(int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 3> >::size(int, int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 3> >::subEntity(int, int, int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 3> >::type(int, int) const
W Dune::ReferenceElementWrapper<Dune::ReferenceSimplex<float, 3> >::volume() const
-W Dune::ReferencePrism<double, 3>::prism_entities(int)
W Dune::ReferencePrism<double, 3>::type(int, int) const
-W Dune::ReferencePrism<float, 3>::prism_entities(int)
W Dune::ReferencePrism<float, 3>::type(int, int) const
-W Dune::ReferencePyramid<double, 3>::pyramid_entities(int)
W Dune::ReferencePyramid<double, 3>::type(int, int) const
-W Dune::ReferencePyramid<float, 3>::pyramid_entities(int)
W Dune::ReferencePyramid<float, 3>::type(int, int) const
-W Dune::ReferenceSimplex<double, 1>::entity_details(int)
-W Dune::ReferenceSimplex<double, 2>::entity_details(int)
-W Dune::ReferenceSimplex<double, 3>::entity_details(int)
-W Dune::ReferenceSimplex<float, 1>::entity_details(int)
-W Dune::ReferenceSimplex<float, 2>::entity_details(int)
-W Dune::ReferenceSimplex<float, 3>::entity_details(int)
w pthread_cancel
W std::basic_stringbuf<char, std::char_traits, std::allocator >::~basic_stringbuf()
+W std::basic_stringbuf<char, std::char_traits, std::allocator >::~basic_stringbuf()
+W std::basic_stringbuf<char, std::char_traits, std::allocator >::~basic_stringbuf()
pipping@bogus ~/Downloads/dune-grid-2.0 $
The second variant was meant to be 'ar qs ...' which should add a symbole table. However it seems to be there even without the 's' (see nm l-4.5.a)
Please try the following to see if the lib is processed:
g++-4.5 -t linktest.o l-4.5.a
Regarding the weak symbols: As far as I can see the symbols are 'unique' with g++-4.5 and V-weak with g++4.4. Following 'man nm' the 'unique' flag is a GNU extension to elf. Could it be possible that your linker doesn't recognize this correctly?
pipping@bogus ~/Downloads/dune-grid-2.0 $ g++-4.5 -t linktest.o l-4.5.a
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.0/../../../../x86_64-pc-linux-gnu/bin/ld: mode elf_x86_64
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.0/../../../../lib64/crt1.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.0/../../../../lib64/crti.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.0/crtbegin.o
linktest.o
-lstdc++ (/usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.0/../../../../lib64/libstdc++.so)
-lm (/usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.0/../../../../lib64/libm.so)
-lgcc_s (/usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.0/../../../../lib64/libgcc_s.so)
/lib64/libc.so.6
(/usr/lib64/libc_nonshared.a)elf-init.oS
/lib64/ld-linux-x86-64.so.2
-lgcc_s (/usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.0/../../../../lib64/libgcc_s.so)
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.0/crtend.o
/usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.0/../../../../lib64/crtn.o
linktest.o: In function T.319': linktest.cc:(.text+0x66): undefined reference to Dune::ReferenceElements<double, 1>::general'
linktest.cc:(.text+0x231): undefined reference to Dune::ReferenceElements<double, 1>::general' /usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.0/../../../../x86_64-pc-linux-gnu/bin/ld: link errors found, deleting executable a.out'
collect2: ld returned 1 exit status
pipping@bogus ~/Downloads/dune-grid-2.0 $
Regarding the weak symbols: As far as I can see the symbols are 'unique' with g++-4.5 and V-weak with g++4.4. Following 'man nm' the 'unique' flag is a GNU extension to elf. Could it be possible that your linker doesn't recognize this correctly?
Indeed they are. Since it doesn't work with ld(1) either, I doubt it's the linker's fault, though (I'm on binutils 2.20.1-r2)
As far as I understand the linker will include all symbols from object files and only those that are used from archives. With the above option it will include all of them.
The question is why it does not recognize and use the symbol in the archive automatically. Perhaps this is related to the different way gcc-4.5 uses weak symbols in combination with our singleton-implementation.
What's the symbol type of '...::general' in linktest.o?