This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: STL/thread-safe/template problem on Alpha.
- To: "Wegher, Jeff" <JWegher at neonsoft dot com>
- Subject: Re: STL/thread-safe/template problem on Alpha.
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 10 Sep 1998 03:49:01 z
- Cc: "'egcs-bugs at cygnus dot com'" <egcs-bugs at cygnus dot com>
- References: <B1771D049899D011926500A024CA914F01092494@MERCURY>
Wegher, Jeff <JWegher@neonsoft.com> writes:
> (alphaev56-dec-osf4.0b) with the 1.1a (egcs-2.91.57)
> #include <list>
> int main() { list<int> aList; return 0; }
> g++ -D__STL_PTHREADS -D_REENTRANT testList.cpp -lpthread
> /usr/bin/ld:
> Unresolved:
> __default_alloc_template<1, 0>::end_free
> __default_alloc_template<1, 0>::start_free
> __default_alloc_template<1, 0>::heap_size
> __default_alloc_template<1, 0>::free_list
> __default_alloc_template<1, 0>::__node_allocator_lock
> collect2: ld returned 1 exit status
> Any ideas/workarounds?
Compiling with the template repository (-frepo) works. Another option
is explicit instantiation of the symbols that are not automatically
instantiated for some reason (lack of GNU ld?):
template char*__default_alloc_template<1, 0>::end_free;
template char*__default_alloc_template<1, 0>::start_free;
template size_t __default_alloc_template<1, 0>::heap_size;
template __default_alloc_template<1, 0>::obj * volatile __default_alloc_template<1, 0>::free_list[];
template pthread_mutex_t __default_alloc_template<1, 0>::__node_allocator_lock;
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil