Good day,
I am having difficulties compiling the latest ROOT on one of my old linux boxes with Red Hat 7.2, which has g++ 2.96 installed. Is it that support for g++2 was dropped in this release? I have looked into release notes by did not find such a note.
Here are examples of errors. Most of them seem to be in a CINT code.
g++ -O -pipe -Wall -W -Woverloaded-virtual -fPIC -Iinclude -DHAVE_CONFIG -pthread -DINCLUDEDIR="/usr/include" -DOBJSUFFIX=".o" -o build/rmkdepend/mainroot.o -c build/rmkdepend/mainroot.cxx
build/rmkdepend/mainroot.cxx: In function void ROOT_flush ()': build/rmkdepend/mainroot.cxx:49: no matching function for call to
basic_string<char, string_char_traits,
__default_alloc_template >::clear ()’
build/rmkdepend/mainroot.cxx:50: no matching function for call to
`basic_string<char, string_char_traits,
__default_alloc_template >::clear ()’
make: *** [build/rmkdepend/mainroot.o] Error 1
I was able to overcome this with the code like:
- currentFileBase.clear();
- currentDependencies.clear();
- currentFileBase.erase(currentFileBase.begin(),currentFileBase.end());
- currentDependencies.erase(currentDependencies.begin(), currentDependencies.end());
The next one:
g++ -O -pipe -Wall -W -Woverloaded-virtual -fPIC -Iinclude -DHAVE_CONFIG -DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__OSFDLL -DG__ROOT -DG__REDIRECTIO -DG__STD_EXCEPTION -pthread -o cint/src/Api.o -c cint/src/Api.cxx
In file included from cint/src/Api.cxx:21:
include/Api.h:26:19: ostream: No such file or directory
make: *** [cint/src/Api.o] Error 1
This is pretty well fixed with:
-#include
+#include
One more then:
g++ -O -pipe -Wall -W -Woverloaded-virtual -fPIC -Iinclude -DHAVE_CONFIG -DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__OSFDLL -DG__ROOT -DG__REDIRECTIO -DG__STD_EXCEPTION -pthread -o cint/src/Apiif.o -c cint/src/Apiif.cxx
cint/src/Apiif.cxx: In function int G__G__API_72_1_0 (G__value *, const char *, G__param *, int)': <internal>:37: too many arguments to function
void *operator new []
(unsigned int)’
cint/src/Apiif.cxx:37: at this point in file
:43: too many arguments to function void *operator new (unsigned int)' cint/src/Apiif.cxx:43: at this point in file cint/src/Apiif.cxx: In function
int G__G__API_72_2_0 (G__value *,
const char *, G__param *, int)’:
:61: too many arguments to function `void *operator new
(unsigned int)’
…
This is the place where I gave up. Any ideas?
The last version known to compile well is 5.02.00. Don’t know about later releases though.
There is also a problem in RPM spec preparation introduced in build/package/lib/makerpmspec.sh. Some of sed expressions work only with GNU sed 4.x, but not with GNU sed 3.x I have here (I don’t know why). I am attaching a patch that worked for me, for your review.
Thanks,
Denis Stepanov
makerpmspec.sh.patch.gz (440 Bytes)