Compilation errors with stl map in uclibc++

Karthik Vadambacheri Manian karthikvm.uc at gmail.com
Mon May 24 21:33:50 CEST 2010


Hi Adam,

I tried to compile the c++ program using stl map class with only uclibc++
libraries outside the l4env and got the same compilation error. I have
posted the compilation error both from l4env and non l4env below.

=================================================================================================================================
1) Compilation error from non l4env compilation (i.e just compiling on a
linux box with uclibc++ libraries only and excluding the standard c++
libraries)

$ make mymap.o
g++ -m64 -c -DUSE_UCLIBC=y -DRAM_BASE=0x0    -DSYSTEM_amd64_686_l4v2
-DARCH_amd64 -DCPUTYPE_686 -DL4API_l4v2 -DCONFIG_L4_CALL_SYSCALLS
-DCONFIG_L4_ABS_SYSCALLS -nostdinc
-I/home/karthik/Research/tudos/ubuild/include/amd64/uclibc
-I/home/karthik/Research/tudos/ubuild/include/uclibc
-I/home/karthik/Research/tudos/ubuild/include/uclibc++
-I/usr/lib/gcc/x86_64-linux-gnu/4.4.1/include
-I/usr/lib/gcc/x86_64-linux-gnu/4.4.1/include-fixed -gstabs+ -g -O2
-fno-strict-aliasing -mno-red-zone -Wall -fno-common -fno-stack-protector
mymap.cc -o mymap.o

/home/karthik/Research/tudos/ubuild/include/uclibc++/map: In constructor
‘std::map<Key, T, Compare, Allocator>::map(const Compare&, const Allocator&)
[with Key = std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, T = int, Compare = std::less<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >, Allocator =
std::allocator<int>]’:
mymap.cc:10:   instantiated from here
/home/karthik/Research/tudos/ubuild/include/uclibc++/map:108: error: invalid
conversion from ‘const std::basic_string<char, std::char_traits<char>,
std::allocator<char> > (*)(std::pair<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, int>)’ to
‘std::basic_string<char, std::char_traits<char>, std::allocator<char> >
(*)(std::pair<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, int>)’
/home/karthik/Research/tudos/ubuild/include/uclibc++/map:108: error:
initializing argument 3 of ‘std::__single_associative<Key, ValueType,
Compare, Allocator>::__single_associative(const Compare&, const Allocator&,
typename std::__base_associative<Key, ValueType, Compare,
Allocator>::key_type (*)(typename std::__base_associative<Key, ValueType,
Compare, Allocator>::value_type)) [with Key = std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, ValueType =
std::pair<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, int>, Compare = std::less<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >, Allocator =
std::allocator<int>]’
/home/karthik/Research/tudos/ubuild/include/uclibc++/associative_base: In
constructor ‘std::__base_associative<Key, ValueType, Compare,
Allocator>::__base_associative(const Compare&, const Allocator&, Key
(*)(ValueType)) [with Key = std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, ValueType = std::pair<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, int>, Compare =
std::less<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > >, Allocator = std::allocator<int>]’:
/home/karthik/Research/tudos/ubuild/include/uclibc++/associative_base:502:
instantiated from ‘std::__single_associative<Key, ValueType, Compare,
Allocator>::__single_associative(const Compare&, const Allocator&, typename
std::__base_associative<Key, ValueType, Compare, Allocator>::key_type
(*)(typename std::__base_associative<Key, ValueType, Compare,
Allocator>::value_type)) [with Key = std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, ValueType =
std::pair<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, int>, Compare = std::less<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >, Allocator =
std::allocator<int>]’
/home/karthik/Research/tudos/ubuild/include/uclibc++/map:108:   instantiated
from ‘std::map<Key, T, Compare, Allocator>::map(const Compare&, const
Allocator&) [with Key = std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, T = int, Compare = std::less<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >, Allocator =
std::allocator<int>]’
mymap.cc:10:   instantiated from here
/home/karthik/Research/tudos/ubuild/include/uclibc++/associative_base:78:
error: invalid conversion from ‘std::basic_string<char,
std::char_traits<char>, std::allocator<char> >
(*)(std::pair<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, int>)’ to ‘const std::basic_string<char,
std::char_traits<char>, std::allocator<char> >
(*)(std::pair<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, int>)’
make: *** [mymap.o] Error 1
=================================================================================================================================

2) Compilation error from l4env compilation (i.e normal compilation during
the creation of l4 packge in tudos/l4/pkg). I have shown only the
compilation error from the long log file.

.................
.................
make[1]: Entering directory
`/home/karthik/Research/tudos/ubuild/pkg/testmap/server/src/OBJ-amd64_686-l4v2'
  ... Compiling mymap.o
LD_PRELOAD=/home/karthik/Research/tudos/ubuild/tool/gendep/libgendep.so
GENDEP_TARGET=mymap.o GENDEP_BINARY=cc1plus   g++ -m64 -c     -DUSE_UCLIBC=y
-DRAM_BASE=0x0    -DSYSTEM_amd64_686_l4v2 -DARCH_amd64 -DCPUTYPE_686
-DL4API_l4v2 -DCONFIG_L4_CALL_SYSCALLS -DCONFIG_L4_ABS_SYSCALLS
-I/home/karthik/Research/tudos/ubuild/pkg/testmap/idl/OBJ-amd64-l4v2
-I/home/karthik/Research/tudos/ubuild/include/amd64/l4v2
-I/home/karthik/Research/tudos/ubuild/include/l4v2
-I/home/karthik/Research/tudos/ubuild/include/amd64
-I/home/karthik/Research/tudos/ubuild/include
-I/home/karthik/Research/tudos/l4/../dice/include
-I/home/drops/include/amd64/l4v2 -I/home/drops/include/l4v2
-I/home/drops/include/amd64 -I/home/drops/include -nostdinc
-I/home/karthik/Research/tudos/ubuild/include/amd64/uclibc
-I/home/karthik/Research/tudos/ubuild/include/uclibc
-I/home/karthik/Research/tudos/ubuild/include/uclibc++
-I/home/drops/include/amd64/uclibc -I/home/drops/include/uclibc
-I/home/drops/include/uclibc++ -I/usr/lib/gcc/x86_64-linux-gnu/4.4.1/include
-I/usr/lib/gcc/x86_64-linux-gnu/4.4.1/include-fixed -gstabs+        -g -O2
-fno-strict-aliasing -mno-red-zone  -Wall -fno-common -fno-stack-protector
/home/karthik/Research/tudos/l4/pkg/testmap/server/src/mymap.cc -o mymap.o

/home/karthik/Research/tudos/ubuild/include/uclibc++/map: In constructor
‘std::map<Key, T, Compare, Allocator>::map(const Compare&, const Allocator&)
[with Key = std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, T = int, Compare = std::less<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >, Allocator =
std::allocator<int>]’:
/home/karthik/Research/tudos/l4/pkg/testmap/server/src/mymap.cc:10:
instantiated from here
/home/karthik/Research/tudos/ubuild/include/uclibc++/map:108: error: invalid
conversion from ‘const std::basic_string<char, std::char_traits<char>,
std::allocator<char> > (*)(std::pair<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, int>)’ to
‘std::basic_string<char, std::char_traits<char>, std::allocator<char> >
(*)(std::pair<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, int>)’
/home/karthik/Research/tudos/ubuild/include/uclibc++/map:108: error:
initializing argument 3 of ‘std::__single_associative<Key, ValueType,
Compare, Allocator>::__single_associative(const Compare&, const Allocator&,
typename std::__base_associative<Key, ValueType, Compare,
Allocator>::key_type (*)(typename std::__base_associative<Key, ValueType,
Compare, Allocator>::value_type)) [with Key = std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, ValueType =
std::pair<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, int>, Compare = std::less<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >, Allocator =
std::allocator<int>]’
/home/karthik/Research/tudos/ubuild/include/uclibc++/associative_base: In
constructor ‘std::__base_associative<Key, ValueType, Compare,
Allocator>::__base_associative(const Compare&, const Allocator&, Key
(*)(ValueType)) [with Key = std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, ValueType = std::pair<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, int>, Compare =
std::less<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > >, Allocator = std::allocator<int>]’:
/home/karthik/Research/tudos/ubuild/include/uclibc++/associative_base:502:
instantiated from ‘std::__single_associative<Key, ValueType, Compare,
Allocator>::__single_associative(const Compare&, const Allocator&, typename
std::__base_associative<Key, ValueType, Compare, Allocator>::key_type
(*)(typename std::__base_associative<Key, ValueType, Compare,
Allocator>::value_type)) [with Key = std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, ValueType =
std::pair<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, int>, Compare = std::less<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >, Allocator =
std::allocator<int>]’
/home/karthik/Research/tudos/ubuild/include/uclibc++/map:108:   instantiated
from ‘std::map<Key, T, Compare, Allocator>::map(const Compare&, const
Allocator&) [with Key = std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, T = int, Compare = std::less<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >, Allocator =
std::allocator<int>]’
/home/karthik/Research/tudos/l4/pkg/testmap/server/src/mymap.cc:10:
instantiated from here
/home/karthik/Research/tudos/ubuild/include/uclibc++/associative_base:78:
error: invalid conversion from ‘std::basic_string<char,
std::char_traits<char>, std::allocator<char> >
(*)(std::pair<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, int>)’ to ‘const std::basic_string<char,
std::char_traits<char>, std::allocator<char> >
(*)(std::pair<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, int>)’
Makefile.inc:14: *** [mymap.o] Error 1

=================================================================================================================================

>From the logs I think the error is due to uclibc++ library than l4Env. It
would be great it if you could give me some pointers on what is going wrong
there. The source file is the same mymap.cc file discussed in the previous
posts.

Thanks for your time,
karthik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20100524/a93db6df/attachment.html>


More information about the l4-hackers mailing list