AFit - problem with cwchar

Hello,

I am currently trying to compile AFit with ROOT v5.22/00 and I get this error output:

In file included from /usr/include/c++/4.3/bits/postypes.h:47,
                 from /usr/include/c++/4.3/bits/char_traits.h:47,
                 from /usr/include/c++/4.3/string:47,
                 from /usr/local/include/root/TSchemaHelper.h:7,
                 from /usr/local/include/root/TGenericClassInfo.h:16,
                 from /usr/local/include/root/Rtypes.h:259,
                 from /usr/local/include/root/TObject.h:31,
                 from tmp//AFit/AFitAbsPdfBuilder.hh:12,
                 from AFitAbsPdfBuilder.cc:31:
/usr/local/lib/root/cint/cint/include/cwchar:9:20: error: cwchar.h: Aucun fichier ou dossier de ce type
In file included from /usr/local/include/root/TObject.h:31,
                 from tmp//AFit/AFitAbsPdfBuilder.hh:12,
                 from AFitAbsPdfBuilder.cc:31:
/usr/local/include/root/Rtypes.h:151: erreur: ‘size_t’ does not name a type
In file included from /usr/include/c++/4.3/vector:66,
                 from /usr/local/include/root/TGenericClassInfo.h:15,
                 from /usr/local/include/root/Rtypes.h:259,
                 from /usr/local/include/root/TObject.h:31,
                 from tmp//AFit/AFitAbsPdfBuilder.hh:12,
                 from AFitAbsPdfBuilder.cc:31:
/usr/include/c++/4.3/bits/stl_algobase.h: In static member function ‘static bool std::__lexicographical_compare<true>::__lc(const _Tp*, const _Tp*, const _Up*, const _Up*)’:
/usr/include/c++/4.3/bits/stl_algobase.h:901: erreur: ‘size_t’ does not name a type
/usr/include/c++/4.3/bits/stl_algobase.h:902: erreur: ‘size_t’ does not name a type
/usr/include/c++/4.3/bits/stl_algobase.h:904: erreur: ‘__len1’ was not declared in this scope
/usr/include/c++/4.3/bits/stl_algobase.h:904: erreur: ‘__len2’ was not declared in this scope
In file included from /usr/local/lib/root/cint/cint/include/new:9,
                 from /usr/include/c++/4.3/ext/new_allocator.h:37,
                 from /usr/include/c++/4.3/i486-linux-gnu/bits/c++allocator.h:39,
                 from /usr/include/c++/4.3/bits/allocator.h:53,
                 from /usr/include/c++/4.3/vector:67,
                 from /usr/local/include/root/TGenericClassInfo.h:15,
                 from /usr/local/include/root/Rtypes.h:259,
                 from /usr/local/include/root/TObject.h:31,
                 from tmp//AFit/AFitAbsPdfBuilder.hh:12,
                 from AFitAbsPdfBuilder.cc:31:
/usr/local/lib/root/cint/cint/include/new.h: At global scope:
/usr/local/lib/root/cint/cint/include/new.h:17: erreur: ‘size_t’ was not declared in this scope
/usr/local/lib/root/cint/cint/include/new.h:17: erreur: expected ‘,’ or ‘;’ before ‘{’ token
In file included from /usr/include/c++/4.3/i486-linux-gnu/bits/c++allocator.h:39,
                 from /usr/include/c++/4.3/bits/allocator.h:53,
                 from /usr/include/c++/4.3/vector:67,
                 from /usr/local/include/root/TGenericClassInfo.h:15,
                 from /usr/local/include/root/Rtypes.h:259,
                 from /usr/local/include/root/TObject.h:31,
                 from tmp//AFit/AFitAbsPdfBuilder.hh:12,
                 from AFitAbsPdfBuilder.cc:31:
/usr/include/c++/4.3/ext/new_allocator.h:43: erreur: ‘std::size_t’ has not been declared
/usr/include/c++/4.3/ext/new_allocator.h:57: erreur: ‘size_t’ does not name a type
/usr/include/c++/4.3/ext/new_allocator.h:87: erreur: ‘size_type’ has not been declared
/usr/include/c++/4.3/ext/new_allocator.h:97: erreur: ‘size_type’ has not been declared
/usr/include/c++/4.3/ext/new_allocator.h:100: erreur: ‘size_type’ does not name a type
In file included from /usr/include/c++/4.3/vector:67,
                 from /usr/local/include/root/TGenericClassInfo.h:15,
                 from /usr/local/include/root/Rtypes.h:259,
                 from /usr/local/include/root/TObject.h:31,
                 from tmp//AFit/AFitAbsPdfBuilder.hh:12,
                 from AFitAbsPdfBuilder.cc:31:
/usr/include/c++/4.3/bits/allocator.h:65: erreur: ‘size_t’ does not name a type
/usr/include/c++/4.3/bits/allocator.h:86: erreur: ‘size_t’ does not name a type
In file included from /usr/include/c++/4.3/vector:70,
                 from /usr/local/include/root/TGenericClassInfo.h:15,
                 from /usr/local/include/root/Rtypes.h:259,
                 from /usr/local/include/root/TObject.h:31,
                 from tmp//AFit/AFitAbsPdfBuilder.hh:12,
                 from AFitAbsPdfBuilder.cc:31:
/usr/include/c++/4.3/bits/stl_vector.h:114: erreur: expected `)' before ‘__n’
/usr/include/c++/4.3/bits/stl_vector.h:143: erreur: expected ‘;’ before ‘(’ token
/usr/include/c++/4.3/bits/stl_vector.h:146: erreur: expected `;' before ‘void’
/usr/include/c++/4.3/bits/stl_vector.h:147: erreur: ‘size_t’ has not been declared
/usr/include/c++/4.3/bits/stl_vector.h:197: erreur: ‘size_t’ does not name a type
/usr/include/c++/4.3/bits/stl_vector.h:233: erreur: expected `)' before ‘__n’
/usr/include/c++/4.3/bits/stl_vector.h:343: erreur: ‘size_type’ has not been declared
/usr/include/c++/4.3/bits/stl_vector.h:483: erreur: ‘size_type’ does not name a type
/usr/include/c++/4.3/bits/stl_vector.h:488: erreur: ‘size_type’ does not name a type
/usr/include/c++/4.3/bits/stl_vector.h:504: erreur: ‘size_type’ has not been declared
/usr/include/c++/4.3/bits/stl_vector.h:516: erreur: ‘size_type’ does not name a type
/usr/include/c++/4.3/bits/stl_vector.h:547: erreur: ‘size_type’ has not been declared
/usr/include/c++/4.3/bits/stl_vector.h:562: erreur: ‘size_type’ has not been declared
/usr/include/c++/4.3/bits/stl_vector.h:577: erreur: ‘size_type’ has not been declared
/usr/include/c++/4.3/bits/stl_vector.h:583: erreur: ‘size_type’ has not been declared
/usr/include/c++/4.3/bits/stl_vector.h:602: erreur: ‘size_type’ has not been declared
/usr/include/c++/4.3/bits/stl_vector.h:620: erreur: ‘size_type’ has not been declared

etc

The point is that cwchar contains the line:
#include <cwchar.h>
But cwchar.h isn’t a standard header in C++/C (wchar.h is) and this file is not in the tar archive. And changing cwchar.h for wchar.h doesn’t solve the problem. So if someone knows how to handle this, I will be glad to hear his solution.

Hi,

Your -I flag is wrong, it must not include /usr/local/lib/root/cint/cint/include.

Cheers, Axel.