Re: [ROOT] How to specify the compiler

From: Brett Viren (bv@bnl.gov)
Date: Fri Aug 30 2002 - 18:27:23 MEST


Christian Holm Christensen writes:
 > If the compiler can link :-) 

Sure.  But, with GCC compiled code, it is necessary as g++ sets up
some things that ld won't (eg. exception handling object code).

 > and h2root too right?  :-) 

Nope.  h2root has a proper C++ main() function (main/src/h2root.cxx).
g2root has a fortran PROGRAM "main" (main/src/g2root.f) and thus must
get its main() from somewhere.  Older libg2c's used to contain this
main(), which is linked in by ROOT's makefile, but in GCC 3.2 on
Debian (at least) it has been moved to libfrtbegin.

 > BTW, most systems do not have G++ installed as `g++-XXX' but rather as
 > `g++' (On Red Hat 7.3, GCC 3.0 is installed as `g++3').  Brett likes
 > to live dangerously and runs Debian GNU/Linux testing (or is it
 > unstable?) which I for one don't have the guts to do. 

It is a mix of stable, testing and unstable.  Guts or stupidity, I'm
not sure....

I have GCC's 2.95.4, 3.0.4, 3.1.1 and 3.2 all with correspondingly
compiled versions of ROOT and our experiments code code built.

And, ironically, out of all those compilers I don't have a single
correctly working set of software.  The first 2 have compiler bugs
(which can be worked around by turning off optimization for certain
libraries) and the latter two, (which are almost identical, btw),
gives rootcint problems with some STL templates.  See recent email to
this list if interested.

 > Another way to specify the GCC version to use, is to use the `-V'
 > option to `gcc' & co., like 
 > 
 >   > gcc -V egcs-2.91.66
 >   > gcc -V 2.95.4 
 >   > gcc -V 3.02.4 
 >   > gcc -V 2.96 
 > 
 > This works for all proper installations of GCC, not just Debian.

Hey, cool, didn't know about this.  I learn something new every day.

-Brett.



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:06 MET