On my system size_t (as returned by std::vector::size()) is an unsigned long. DBuffer only declares operators for unsigned int. So better declare it ;) I can't tell if it is an 64-bit issue or a gcc-4.4.1 one. But i think its No.1. Reproducible: Always
Created attachment 203670 [details, diff] xmoto-amd64_gcc441.diff patch to build with size_t == unsigned long
I'm having the same problem: x86_64-pc-linux-gnu-g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"xmoto\" -DVERSION=\"0.5.2\" -D_GNU_SOURCE=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DXMOTO_LITTLE_ENDIAN=1 -DHAVE_SQLITE3_H=1 -DHAVE_LIBSQLITE3=1 -DHAVE_LIBZ=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBPNG=1 -DHAVE_LIBBZ2=1 -DHAVE_LIBGLU=1 -DHAVE_ICONV_H=1 -DHAVE_LIBSDL_MIXER=1 -DHAVE_LIBSDL_NET=1 -DHAVE_LIBSDL_TTF=1 -DHAVE_PTHREAD=1 -DHAVE_LUA_H=1 -DHAVE_LIBCURL=1 -DHAVE_VISIBILITY=1 -DHAVE_STDINT_H_WITH_UINTMAX=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DINTDIV0_RAISES_SIGFPE=1 -DHAVE_INTTYPES_H_WITH_UINTMAX=1 -DHAVE_UNSIGNED_LONG_LONG_INT=1 -DHAVE_UNSIGNED_LONG_LONG=1 -DHAVE_UINTMAX_T=1 -DHAVE_INT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_DCGETTEXT=1 -I. -O2 -march=core2 -ggdb -pipe -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DNOMMGR -Wall -DGAMEDATADIR=\"/usr/share/games/xmoto\" -DLOCALESDIR=\"/usr/share/locale\" -DASIAN_TTF_FILE=\"/usr/share/fonts/truetype/wqy/wqy-zenhei.ttf\" -DALLOW_DEV=0 -DCONFIGURE_DEFAULT_THEME=\"Modern\" -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DUSE_OPENGL=1 -DUSE_SDLGFX=0 -D'SVN_REV=""' -O2 -march=core2 -ggdb -pipe -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c -o Replay.o Replay.cpp Replay.cpp: In member function �~@~Xvoid Replay::saveReplay_2(FileHandle*)�~@~Y: Replay.cpp:159: error: ambiguous overload for �~@~Xoperator<<�~@~Y in �~@~Xv_replay << ((Replay*)this)->Replay::m_Chunks.std::vector<_Tp, _Alloc>::size [with _Tp = ReplayStateChunk*, _Alloc = std::allocator<ReplayStateChunk*>]()�~@~Y DBuffer.h:64: note: candidates are: void DBuffer::operator<<(bool) DBuffer.h:66: note: void DBuffer::operator<<(int) DBuffer.h:68: note: void DBuffer::operator<<(unsigned char) DBuffer.h:70: note: void DBuffer::operator<<(unsigned int) DBuffer.h:72: note: void DBuffer::operator<<(float) DBuffer.h:74: note: void DBuffer::operator<<(std::string) <near match>
same here with gcc 4.3.2
Doesn't the proposed patch work for both of you? copy the ebuild from portage to your local overlay, put the patch into the subdirectory "files" and add the following line at the end of the function "src_prepare" epatch "${FILESDIR}/xmoto-amd64_gcc441.diff"
in portage. thanks for the bug report and patch.