SVN trunk

In

core/utils/src/rlibmap.cxx, line 134

there is a call ‘isalnum’ - but rlibmap.cxx does not include required header.
So, I cannot compile trunk without modifications.

which compiler?

Rene

Does not matter.
Hint:

#include <ctype.h>

or

#include //std::isalnum

we do not see this problem anywhere. What is special in your configuration? OS ?

Rene

[quote=“brun”]we do not see this problem anywhere. What is special in your configuration? OS ?

Rene[/quote]

Rene, if you use std::cout you have to include , if you use isalnum - you need . I have slc3 and gcc 3.2.3, but
it’s not important. You simply use implicit inclusion everywhere and it does not work.

[quote]I have slc3 and gcc 3.2.3, but it’s not important. [/quote]Actually it might be. rlibmap.cxx compile on all the platform we do have. And even though adding the #include will remove the symptom of the problem; it might not solved the real cause of the issue; You may (or may not) have a configuration problem (or maybe we do). This is the reason we are trying to understand why it works in our case(s) but not in yours.

Cheers,
Philippe.

[quote]Actually it might be. rlibmap.cxx compile on all the platform we do have. And even though adding the #include will remove the symptom of the problem; it might not solved the real cause of the issue; You may (or may not) have a configuration problem (or maybe we do). This is the reason we are trying to understand why it works in our case(s) but not in yours.
Cheers,
Philippe.[/quote]

IMHO it’s not too difficult to understand - on versions newer than 3.2.3 you have implicit inclusion of cctype that’s why you can compile it.
For example, with gcc 3.4.6 and slc 4 I can compile root, and if I generate rlibmap.d file there are dependencies on cctype and ctype.h - so they are included indirectly by one of headers included in rlibmap.cxx

But … in ANY case, the REAL solution is to have explicit include for declarations you need (isalnum), never relying on implicit inclusion, that’s all.
Of course, if you have guarantee that b.h includes a.h and this will not change in future you can include only b.h instead of a.h and b.h. But that’s not the case with and isalnum.

Hi,

Apparently g++'s iosfwd header is including cctype since gcc v3.3.
I will add the #include for backward compatibility with gcc 3.2

Cheers,
Philippe.

Hi.

Thank you.

Do you really think that C++ standard require iosfwd to include cctype?
If not, why are you talking about “backward compatibility” ? It’s not backward compatibility, it’s a fix for ill-formed program.

Timur,

before talking about ill formed programs, I strongly suggest you move to a version of a compiler more recent than the perestroiska, and you will save us some time too ::slight_smile:

Rene

[quote]
before talking about ill formed programs, I strongly suggest you move to a version of a compiler more recent than the perestroiska, and you will save us some time too
Rene[/quote]

I have to repeat my question: do you really think, that you have any guarantee , that iosfwd always includes cctype?
Or now ROOT only gcc >= 3.4.x bound?

Just FYI I use several compilers: Intel C++ compiler, Comeau C++ compiler, microsoft C++ compiler, and several versions of gcc/g++ on linux, MacOS X and win32. And I’m NOT GOING to re-install g++ on each machine I have to install ROOT, just because it’s TOO DIFFICULT for ROOT team to fix such a PRIMITIVE bug.

And … yes, this is my last post in ROOT talk about any problems, as soon as these problems seem to be more important for me, than for ROOT’s developers.

Hi,

[quote]Do you really think that C++ standard require iosfwd to include cctype? [/quote]It is not guaranteed by the standard (hence the addition of the include to rlibmap.cxx).

Cheers,
Philippe

Hi,

I get the same error
using g++ 3.2.3 on a Red Hat Linux 3.2.3-52
The ROOT version I tried to install is 5.20.
Is this problem fixed in development v.5.21?

Thanks

Yes, it has been fixed in v5.21/04

Cheers,
Philippe

Hi,

I tried to compile the new version root_v5.21.04.source.tar.gz.
I now get a different error. I have configured like this:
./configure --enable-python --enable-soversion

and after make -j2 I get:

g++ -O2 -pipe -m32 -Wall -W -Woverloaded-virtual -fPIC -Iinclude -pthread -o cint/reflex/src/NamespaceBuilder.o -c cint/reflex/src/NamespaceBuilder.cxx
cint/reflex/src/NameLookup.cxx: In member function T Reflex::NameLookup::Lookup(bool) [with T = Reflex::Type]': cint/reflex/src/NameLookup.cxx:41: instantiated from here cint/reflex/src/NameLookup.cxx:145: no matching function for call to
Reflex::NameLookup::Lookup(bool)'
cint/reflex/src/NameLookup.cxx: In member function T Reflex::NameLookup::Lookup(bool) [with T = Reflex::Scope]': cint/reflex/src/NameLookup.cxx:50: instantiated from here cint/reflex/src/NameLookup.cxx:145: no matching function for call to
Reflex::NameLookup::Lookup(bool)'
make: *** [cint/reflex/src/NameLookup.o] Error 1
make: *** Waiting for unfinished jobs…
rm core/utils/src/RStl_tmp.cxx core/utils/src/rootcint_tmp.cxx

Unless you need it specific, you could try to disable reflex (–disable-reflex).

Cheers,
Philippe

I disabled reflex with ./configure --disable-reflex
but it still breaks with the error below

Thanks

make
bin/rmkdepend -R -fcint/cintex/src/CINTClassBuilder.d -Y -w 1000 – -pipe -m32 -Wall -W -Woverloaded-virtual -fPIC -Iinclude -pthread -Iinclude/cint -D__cplusplus – cint/cintex/src/CINTClassBuilder.cxx
g++ -O2 -pipe -m32 -Wall -W -Woverloaded-virtual -fPIC -Iinclude -pthread -Iinclude/cint -o cint/cintex/src/CINTClassBuilder.o -c cint/cintex/src/CINTClassBuilder.cxx
cint/cintex/src/CINTClassBuilder.cxx:12:27: Reflex/Reflex.h: No such file or directory
cint/cintex/src/CINTClassBuilder.cxx:13:26: Reflex/Tools.h: No such file or directory
In file included from cint/cintex/src/CINTClassBuilder.cxx:14:
include/Cintex/Cintex.h:15:29: Reflex/Callback.h: No such file or directory
include/Cintex/Cintex.h:16:25: Reflex/Type.h: No such file or directory
include/Cintex/Cintex.h:17:27: Reflex/Member.h: No such file or directory
In file included from cint/cintex/src/CINTClassBuilder.cxx:14:
include/Cintex/Cintex.h:27: Reflex' is not a class or namespace include/Cintex/Cintex.h:27:ICallback’ is not a class or namespace
include/Cintex/Cintex.h:29: no class template named Reflex' inROOT’
include/Cintex/Cintex.h:29: syntax error before &' token include/Cintex/Cintex.h:30: no class template namedReflex’ in ROOT' include/Cintex/Cintex.h:30: syntax error before&’ token
include/Cintex/Cintex.h:30: virtual void ROOT::Cintex::Callback::operator()(...)' andvirtual void
ROOT::Cintex::Callback::operator()(…)’ cannot be overloaded
include/Cintex/Cintex.h:33: no class template named Reflex' inROOT’
include/Cintex/Cintex.h:33: syntax error before *' token In file included from cint/cintex/src/CINTClassBuilder.cxx:15: cint/cintex/src/CINTdefs.h:47: no class template namedReflex’ in `ROOT’

You also need --disable-cintex

Cheers,
Philippe.

Ok I’ll try it.
for cleaning up everything is “make distclean” enough?

Yes.

Philippe.