GNOME Bugzilla – Bug 357691
build failure: error: call of overloaded ‘abs(GParted::Sector&)’ is ambiguous
Last modified: 2006-10-01 13:09:47 UTC
Downstream: http://bugs.gentoo.org/show_bug.cgi?id=149122 GParted_Core.cc: In member function ‘bool GParted::GParted_Core::copy_filesystem(const Glib::ustring&, const Glib::ustring&, GParted::Sector, GParted::Sector, GParted::Sector, GParted::OperationDetail&, bool, GParted::Sector&)’: GParted_Core.cc:1607: error: call of overloaded ‘abs(GParted::Sector&)’ is ambiguous /usr/include/stdlib.h:786: note: candidates are: int abs(int) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cstdlib:143: note: long int std::abs(long int) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:90: note: double std::abs(double) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:94: note: float std::abs(float) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:98: note: long double std::abs(long double) GParted_Core.cc:1651: error: call of overloaded ‘abs(GParted::Sector&)’ is ambiguous /usr/include/stdlib.h:786: note: candidates are: int abs(int) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cstdlib:143: note: long int std::abs(long int) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:90: note: double std::abs(double) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:94: note: float std::abs(float) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:98: note: long double std::abs(long double) GParted_Core.cc: In member function ‘bool GParted::GParted_Core::copy_blocks(const Glib::ustring&, const Glib::ustring&, GParted::Sector, GParted::Sector, GParted::Sector, GParted::Sector, GParted::OperationDetail&, bool, GParted::Sector&)’: GParted_Core.cc:1825: error: call of overloaded ‘abs(GParted::Sector&)’ is ambiguous /usr/include/stdlib.h:786: note: candidates are: int abs(int) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cstdlib:143: note: long int std::abs(long int) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:90: note: double std::abs(double) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:94: note: float std::abs(float) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:98: note: long double std::abs(long double) GParted_Core.cc:1846: error: call of overloaded ‘abs(GParted::Sector&)’ is ambiguous /usr/include/stdlib.h:786: note: candidates are: int abs(int) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cstdlib:143: note: long int std::abs(long int) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:90: note: double std::abs(double) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:94: note: float std::abs(float) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:98: note: long double std::abs(long double) GParted_Core.cc:1861: error: call of overloaded ‘abs(long long int)’ is ambiguous /usr/include/stdlib.h:786: note: candidates are: int abs(int) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cstdlib:143: note: long int std::abs(long int) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:90: note: double std::abs(double) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:94: note: float std::abs(float) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:98: note: long double std::abs(long double) GParted_Core.cc:1880: error: call of overloaded ‘abs(GParted::Sector&)’ is ambiguous /usr/include/stdlib.h:786: note: candidates are: int abs(int) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cstdlib:143: note: long int std::abs(long int) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:90: note: double std::abs(double) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:94: note: float std::abs(float) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:98: note: long double std::abs(long double) GParted_Core.cc:1886: error: call of overloaded ‘abs(GParted::Sector&)’ is ambiguous /usr/include/stdlib.h:786: note: candidates are: int abs(int) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cstdlib:143: note: long int std::abs(long int) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:90: note: double std::abs(double) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:94: note: float std::abs(float) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:98: note: long double std::abs(long double) GParted_Core.cc: In member function ‘bool GParted::GParted_Core::copy_block(PedDevice*, PedDevice*, GParted::Sector, GParted::Sector, GParted::Sector, Glib::ustring&, bool)’: GParted_Core.cc:1915: error: call of overloaded ‘abs(GParted::Sector&)’ is ambiguous /usr/include/stdlib.h:786: note: candidates are: int abs(int) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cstdlib:143: note: long int std::abs(long int) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:90: note: double std::abs(double) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:94: note: float std::abs(float) /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/g++-v4/cmath:98: note: long double std::abs(long double) if powerpc-unknown-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/gtkmm-2.4 -I/usr/lib/gtkmm-2.4/include -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/gdkmm-2.4 -I/usr/lib/gdkmm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/include/atkmm-1.6 -I/usr/include/gtk-2.0 -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I/usr/include/cairomm-1.0 -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/atk-1.0 -DGNOMELOCALEDIR=\""/usr/share/locale"\" -DGNOME_ICONDIR=\""/usr/share/pixmaps"\" -Wall -g -O2 -pipe -mcpu=G4 -mabi=altivec -fno-omit-frame-pointer -MT OperationCopy.o -MD -MP -MF ".deps/OperationCopy.Tpo" \ -c -o OperationCopy.o `test -f 'OperationCopy.cc' || echo './'`OperationCopy.cc; \ then mv -f ".deps/OperationCopy.Tpo" ".deps/OperationCopy.Po"; \ else rm -f ".deps/OperationCopy.Tpo"; exit 1; \ fi make[2]: *** [GParted_Core.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory `/var/tmp/portage/gparted-0.3.1/work/gparted-0.3.1/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/gparted-0.3.1/work/gparted-0.3.1' make: *** [all] Error 2 !!! ERROR: sys-block/gparted-0.3.1 failed. gcc-4.1.1-r1 on ppc-32.
abs takes int or long int, not long long. Perhaps you mean (C) llabs?
Created attachment 73399 [details] [review] long-long-abs.patch
thnx, i knew about this one, but it somehow slipped my mind. I'll apply this as soon as i get home.
in CVS...