Hello List,
Problem:
I recently updated the CVS trunk and successfully built (userlevel)
Click. When attempting to `make clean install` on the Clicky
application, I receive errors.
Quick synopsis:
The errors are a result of an overloaded swap() function defined in
include/click/algorithim.hh. Buried in the gcc compiler, there is an
ambiguous call to swap() causing the compiler confusion. I was unable
to track down the culprit and ask for mailinglist help.
Pedigree:
Fedora 9
Intel quad Zeon
Kernel 2.6.27.24
gcc 4.3.0
I have attached a copy of the errors for reference.
Thank you,
Derek
g++ -W -Wall -DHAVE_CONFIG_H -I. -I..
-DPACKAGE_DATA_DIR=\""$HOME/click/clickbin/share"\"
-DPACKAGE_LOCALE_DIR=\""$HOME/click/clickbin//locale"\" -I/usr/include/gtk-2.0
-I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1
`$HOME/click/clickbin/bin/click-buildtool --toolcflags` -g -O2 -MT
wdiagram.o -MD -MP -MF .deps/wdiagram.Tpo -c -o wdiagram.o wdiagram.cc
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/bits/stl_algobase.h:
In static member function âstatic void
std::__iter_swap<true>::iter_swap(_ForwardIterator1, _ForwardIterator2) [with
_ForwardIterator1 = __gnu_cxx::__normal_iterator<clicky::dwidget**,
std::vector<clicky::dwidget*, std::allocator<clicky::dwidget*> > >,
_ForwardIterator2 = __gnu_cxx::__normal_iterator<clicky::dwidget**,
std::vector<clicky::dwidget*, std::allocator<clicky::dwidget*> > >]â:
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/bits/stl_algobase.h:142:
instantiated from âvoid std::iter_swap(_ForwardIterator1,
_ForwardIterator2) [with _ForwardIterator1 =
__gnu_cxx::__normal_iterator<clicky::dwidget**, std::vector<clicky::dwidget*,
std::allocator<clicky::dwidget*> > >, _ForwardIterator2 =
__gnu_cxx::__normal_iterator<clicky::dwidget**, std::vector<clicky::dwidget*,
std::allocator<clicky::dwidget*> > >]â
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/bits/stl_algo.h:1888:
instantiated from â_RandomAccessIterator
std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, _Tp,
_Compare) [with _RandomAccessIterator =
__gnu_cxx::__normal_iterator<clicky::dwidget**, std::vector<clicky::dwidget*,
std::allocator<clicky::dwidget*> > >, _Tp = clicky::dwidget*, _Compare = bool
(*)(const clicky::dwidget*, const clicky::dwidget*)]â
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/bits/stl_algo.h:1952:
instantiated from âvoid std::__introsort_loop(_RandomAccessIterator,
_RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator =
__gnu_cxx::__normal_iterator<clicky::dwidget**, std::vector<clicky::dwidget*,
std::allocator<clicky::dwidget*> > >, _Size = int, _Compare = bool (*)(const
clicky::dwidget*, const clicky::dwidget*)]â
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/bits/stl_algo.h:4820:
instantiated from âvoid std::sort(_RAIter, _RAIter, _Compare) [with
_RAIter = __gnu_cxx::__normal_iterator<clicky::dwidget**,
std::vector<clicky::dwidget*, std::allocator<clicky::dwidget*> > >, _Compare =
bool (*)(const clicky::dwidget*, const clicky::dwidget*)]â
wdiagram.cc:67: instantiated from here
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/bits/stl_algobase.h:106:
error: call of overloaded âswap(clicky::dwidget*&, clicky::dwidget*&)â is
ambiguous
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/bits/stl_move.h:80:
note: candidates are: void std::swap(_Tp&, _Tp&) [with _Tp = clicky::dwidget*]
$HOME/click/clickbin/include/click/algorithm.hh:33: note: void
swap(T&, T&) [with T = clicky::dwidget*]
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/bits/stl_algobase.h:
In static member function âstatic void
std::__iter_swap<true>::iter_swap(_ForwardIterator1, _ForwardIterator2) [with
_ForwardIterator1 = __gnu_cxx::__normal_iterator<std::pair<clicky::dconn*,
int>*, std::vector<std::pair<clicky::dconn*, int>,
std::allocator<std::pair<clicky::dconn*, int> > > >, _ForwardIterator2 =
__gnu_cxx::__normal_iterator<std::pair<clicky::dconn*, int>*,
std::vector<std::pair<clicky::dconn*, int>,
std::allocator<std::pair<clicky::dconn*, int> > > >]â:
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/bits/stl_algobase.h:142:
instantiated from âvoid std::iter_swap(_ForwardIterator1,
_ForwardIterator2) [with _ForwardIterator1 =
__gnu_cxx::__normal_iterator<std::pair<clicky::dconn*, int>*,
std::vector<std::pair<clicky::dconn*, int>,
std::allocator<std::pair<clicky::dconn*, int> > > >, _ForwardIterator2 =
__gnu_cxx::__normal_iterator<std::pair<clicky::dconn*, int>*,
std::vector<std::pair<clicky::dconn*, int>,
std::allocator<std::pair<clicky::dconn*, int> > > >]â
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/bits/stl_algo.h:1867:
instantiated from â_RandomAccessIterator
std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, _Tp)
[with _RandomAccessIterator =
__gnu_cxx::__normal_iterator<std::pair<clicky::dconn*, int>*,
std::vector<std::pair<clicky::dconn*, int>,
std::allocator<std::pair<clicky::dconn*, int> > > >, _Tp =
std::pair<clicky::dconn*, int>]â
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/bits/stl_algo.h:1919:
instantiated from âvoid std::__introsort_loop(_RandomAccessIterator,
_RandomAccessIterator, _Size) [with _RandomAccessIterator =
__gnu_cxx::__normal_iterator<std::pair<clicky::dconn*, int>*,
std::vector<std::pair<clicky::dconn*, int>,
std::allocator<std::pair<clicky::dconn*, int> > > >, _Size = int]â
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/bits/stl_algo.h:4783:
instantiated from âvoid std::sort(_RAIter, _RAIter) [with _RAIter =
__gnu_cxx::__normal_iterator<std::pair<clicky::dconn*, int>*,
std::vector<std::pair<clicky::dconn*, int>,
std::allocator<std::pair<clicky::dconn*, int> > > >]â
wdiagram.cc:525: instantiated from here
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/bits/stl_algobase.h:106:
error: call of overloaded âswap(std::pair<clicky::dconn*, int>&,
std::pair<clicky::dconn*, int>&)â is ambiguous
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/bits/stl_move.h:80:
note: candidates are: void std::swap(_Tp&, _Tp&) [with _Tp =
std::pair<clicky::dconn*, int>]
$HOME/click/clickbin/include/click/algorithm.hh:33: note: void
swap(T&, T&) [with T = std::pair<clicky::dconn*, int>]
make[1]: *** [wdiagram.o]
Error 1
make[1]:
Leaving directory `$HOME/click/apps/clicky/src'
_______________________________________________
click mailing list
[email protected]
https://amsterdam.lcs.mit.edu/mailman/listinfo/click