[uClibc] gcc 3.3 toolchain + templates
Agust Karlsson
Gusti at pallas.dk
Thu Jul 10 09:52:05 UTC 2003
Hi there.
I have just installed the uClibc (0.9.20) toolchain with gcc-3.3 but have discovered a problem when compiling my old applications.
When I compile with the "plain" gcc-3.3 compiler everything is OK, and it was OK before I upgraded (uClibc 0.9.12 on gcc-3.1).
But when I use the toolchain I get an error (see below).
I have checked that the include files in the toolchain are identical with the ones in the "plain" gcc.
Hope that someone can guide my out of my misery.
Gusti
Here is the listing:
g++ -c -Wall -I../lib -o ph.o ph.cpp
In file included from /usr/local/uclibc-9.20/include/c++/vector:68,
from ../lib/bookkeeper.h:22,
from ../lib/dbmessage.h:10,
from ../lib/tmmessage.h:12,
from ph.h:28,
from ph.cpp:14:
/usr/local/uclibc-9.20/include/c++/bits/stl_alloc.h:382: error: parse error
before `;' token
/usr/local/uclibc-9.20/include/c++/bits/stl_alloc.h:452: error: syntax error
before `<' token
/usr/local/uclibc-9.20/include/c++/bits/stl_alloc.h:452: error: `__threads' was
not declared in this scope
/usr/local/uclibc-9.20/include/c++/bits/stl_alloc.h:452: error: `__inst' was
not declared in this scope
/usr/local/uclibc-9.20/include/c++/bits/stl_alloc.h:452: error: template
argument 1 is invalid
/usr/local/uclibc-9.20/include/c++/bits/stl_alloc.h:452: error: template
argument 2 is invalid
ph.cpp: In member function `void cPH::Go()':
ph.cpp:72: warning: unused variable `termios ts'
/usr/local/uclibc-9.20/include/c++/bits/stl_alloc.h: In static member function
`static void* std::__default_alloc_template<__threads,
__inst>::allocate(unsigned int) [with bool __threads = true, int __inst = 0]
':
/usr/local/uclibc-9.20/include/c++/bits/stl_alloc.h:232: instantiated from `static _Tp* std::__simple_alloc<_Tp, _Alloc>::allocate(unsigned int) [with _Tp = Bookkeeper::Duty, _Alloc = std::__default_alloc_template<true, 0>]'
/usr/local/uclibc-9.20/include/c++/bits/stl_vector.h:127: instantiated from `_Tp* std::_Vector_alloc_base<_Tp, _Allocator, true>::_M_allocate(unsigned int) [with _Tp = Bookkeeper::Duty, _Allocator = std::allocator<Bookkeeper::Duty>]'
/usr/local/uclibc-9.20/include/c++/bits/stl_vector.h:156: instantiated from `std::_Vector_base<_Tp, _Alloc>::_Vector_base(unsigned int, typename std::_Vector_alloc_base<_Tp, _Alloc, std::_Alloc_traits<_Tp, _Allocator>::_S_instanceless>::allocator_type&) [with _Tp = Bookkeeper::Duty, _Alloc = std::allocator<Bookkeeper::Duty>]'
/usr/local/uclibc-9.20/include/c++/bits/stl_vector.h:266: instantiated from `std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = Bookkeeper::Duty, _Alloc = std::allocator<Bookkeeper::Duty>]'
../lib/bookkeeper.h:524: instantiated from here
/usr/local/uclibc-9.20/include/c++/bits/stl_alloc.h:397: error: `__atomic_add'
undeclared (first use this function)
/usr/local/uclibc-9.20/include/c++/bits/stl_alloc.h:397: error: (Each
undeclared identifier is reported only once for each function it appears
in.)
make: *** [ph.o] Error 1
---------------------------
and the ouput from g++ -v
Reading specs from /usr/local/uclibc-9.20/i386-linux/bin/../lib/gcc-lib/i386-linux/3.3/specs
Configured with: /Elan/LogiTux/gcc-3.3/build_i386/gcc-3.3/configure --target=i386-linux --prefix=/usr/local/uclibc-9.20 --exec-prefix=/usr/local/uclibc-9.20 --bindir=/usr/local/uclibc-9.20/bin --sbindir=/usr/local/uclibc-9.20/sbin --sysconfdir=/usr/local/uclibc-9.20/etc --datadir=/usr/local/uclibc-9.20/share --localstatedir=/usr/local/uclibc-9.20/var --mandir=/usr/local/uclibc-9.20/man --infodir=/usr/local/uclibc-9.20/info --with-local-prefix=/usr/local/uclibc-9.20/usr/local --libdir=/usr/local/uclibc-9.20/lib --includedir=/usr/local/uclibc-9.20/include --with-gxx-include-dir=/usr/local/uclibc-9.20/include/c++ --oldincludedir=/usr/local/uclibc-9.20/include --enable-shared --enable-target-optspace --disable-nls --with-gnu-ld --disable-__cxa_atexit --enable-languages=c,c++ --program-prefix=i386-uclibc-
Thread model: posix
gcc version 3.3
--
Agust Karlsson mailto:gusti at pallas.dk
Pallas Informatik A/S http://www.pallas.dk
Allerød Stationsvej 2D Tel.: +45 48 10 24 10
DK-3450 Allerød Fax.: +45 48 10 24 01
More information about the uClibc
mailing list