[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#178525: looking for help building xdelta2 with g++ 3.3



retitle 178525 xdelta2 cannot build with current tools
tags 178525 help
thanks

Since the sfs-dev issue is so simple compared to the g++ issues, I'll
keep just this bugreport instead of oppening a new one.

I've attempted to look at the problem, but there is a crucial build
problem which I could not fix or work around.  That failure is:

| In file included from xdfs_cpp.h:81,
|                  from admin.cc:45:
| ehashmap.h:130: error: parse error before `>' token

It refers to the following template definition:

| template <class T, int offset, class H, class E, class A = alloc>
| class ehash_map

Where "alloc" is not known.  Probably g++ changed its way of working
since 2.95, and "alloc" is being resolved in the context where the
word appears, instead of where the template is expanded.

I could not find where the template gets expanded, due to the complex
relationships between templates and classes in the code.

The "alloc" class does not appear to come from xdelta2 source.  I
could only assume it comes from the standard libraries, and could even
find a similar decl in /usr/include/g++-3/std/bastring.h:

| // NOTE : This does NOT conform to the draft standard and is likely to change
| #include <alloc.h>
| [...]
| template <class charT, class traits = string_char_traits<charT>,
|           class Allocator = alloc >

Unfortunately adding this include in ehashmap.h does not help, and
playing with namespaces did not help either.  I even tried issue a
forward declaration for an "alloc" class (even in the std namespace),
but that did not seem correct to the compiler either.

I have exhausted the resources relative to my limited knowledge of
modern C++, and I'm looking for help on this issue.

-- 
Yann Dirson    <ydirson@altern.org> |    Why make M$-Bill richer & richer ?
Debian-related: <dirson@debian.org> |   Support Debian GNU/Linux:
Pro:    <yann.dirson@fr.alcove.com> |  Freedom, Power, Stability, Gratuity
     http://ydirson.free.fr/        | Check <http://www.debian.org/>



Reply to: