Re: BRAT compilation problems on RH9

From: Christian Holm Christensen (cholm@hehi03.nbi.dk)
Date: Fri Aug 01 2003 - 08:54:53 EDT

  • Next message: Flemming Videbaek: "Re: BRAT compilation problems on RH9"
    Hi Bjorn,
    
    Bjorn H Samset <bjornhs@rcf2.rhic.bnl.gov> wrote concerning
      BRAT compilation problems on RH9 [Fri, 1 Aug 2003 07:33:50 -0400 (EDT)] 
    ----------------------------------------------------------------------
    > 
    > Hi all.
    > 
    > I've just migrated my laptop to RedHat 9, and in the process of compiling
    > brat I've come across a cople of problems. I'd like some input on the
    > following points/suggestions:
    > 
    
    > * First, the autogen step. As Hiro, Steve and Christian pointed out
    >   some time back, on newer systems we need to do
    >
    >    libtoolize --automake
    >    automake -a
    >    autoconf
    >    ./configure --disable-dependency-tracking
    >    make; make install
    >
    > to compile, which is not what's in the autogen file. 
    
    [I formatted your text, as it makes it easier to read, can't your mail
    client do that? If not, why don't you use Mew in Emacs :-)]
    
    > Is there any reason not to change the autogen? (I.e. will these
    > commands also work for any older systems that we might have?)
    
    No, there's no reason not to put it in.  `libtoolize' has existed for
    may years now, but it was a redundant step previously.  With the
    Autotool paradigm shift, it isn't. 
    
    > Christian: I had to include the --disable-dependency-tracking to compile
    > on a newborn, quite standard RH9 installed from a blank disk - since you
    > asked in an email once.
    > (http://www.sdcc.bnl.gov/brahms/private/list_hyper/brahms-dev-l/2485.html)
    
    I know what the problem is, and it's (again)  related to the Autotools
    paradigm shift.  The problem is, that in config/config.mk, it says
    something like 
    
      $(component)_Dict.cxx $(component)_Dict.h:Include.h LinkDef.h
    		...
    
    with newer Automakes, that results in the dependencies of say
    `module/base/module_base_Dict.cxx' to be written to 
    
      module/base/.deps/$(component)_Dict.Plo 
    
    (the last part `.Plo' may be wrong), instead of 
    
      module/base/.deps/module_base_Dict.Plo 
    
    The fix is, to explicitly list the generated dictionary file in the
    various `_SOURCES' lines of the Makefile.am's.  Flemming, Kris, Hiro,
    and I have discussed these matters at length, and I honestly thought
    either Flemming, Hiro, or Kris had made these fixes (as well as the
    `autogen' fix).  I guess one of them has the fix lying around
    somewhere. 
     
    > * Then, in the file
    > util/BrIostream.h
    >   1) using std::setprecesion;
    >      should be
    >      using std::setprecision;
    >      Typical physicist typo? ;-)
    
    That fortunately not mine :-)
    
    >   2) To compile a number of other classes, I had to add
    >      using std::setw;
    >      using std::cerr;
    >      Should this have been dealt with in another way, or is this a good
    >      place to add them?
    
    The best thing to do with all these namespace qualified names, is to
    consistently use them across the source code.  The next best thing, is
    to put 
    
      using std::cout;
      ...
    
    in all .cxx files that uses these.  The third best thing is to put 
    
      using namespace std;
    
    in all .cxx files that uses these.  The absolutely not to do thing, is
    to put any of the above in header files.  That is, in header files,
    `std::cout' should _always_ be specified as `std::cout' , and so on. 
    
    > * I have multiple instances of files called vector.h around my
    >   system. I therefore had to change a number of #include <vector>'s
    >   to #include "vector.h" to get the right file. Any reason not to
    >   make this change permanent?
    
    _Yes_. The right thing to do, is to put 
    
      #ifndef __VECTOR__
      # include <vector>
      #endif
    
    (do `M-x sys-header-include RET vectorŽ in Emacs) 
    
    And what do you mean that you have "... multiple instances of files
    called vector.h around my system." - that sounds like a sick system to
    me.  Where does all those `vector.h' files come from? (try `rpm -qf
    <file>' to see which package includes what).  Any package that puts a
    file called `vector.h' in a standard include path, has a bug!
    
    > * Finally, I ended up with a line
    >
    >     #include "algorithm.h"
    >
    >   in the auto-generated file modules/util/modules_util_Cint.h
    >   I could't find this file on my system, and removing the include
    >   does not seem to cause problems. Ideas on this?
    
    This is a known problem is previous version of ROOT.  Update your ROOT
    installation.  Maybe you need to clean your BRAT directory of old
    dictionary files too? 
      
    > I'll await some feedback before trying to fix the problems, but note
    > that at least the typo in util/BrIostream.h renders BRAT
    > uncompilable (but easily fixable) at the moment.
    
    There's actually a file called `Riostream.h' in ROOT too.  Why not use
    that if you must.  However, _never_ever_ include that in a header, as
    you'll pollute the users namespace ("go away, your invading my
    space!"). 
     
    > Ping :-)
    
    Pong! 
    
    Yours, 
    
     ___  |  Christian Holm Christensen 
      |_| |	 -------------------------------------------------------------
        | |	 Address: Sankt Hansgade 23, 1. th.  Phone:  (+45) 35 35 96 91
         _|	          DK-2200 Copenhagen N       Cell:   (+45) 24 61 85 91
        _|	          Denmark                    Office: (+45) 353  25 305
     ____|	 Email:   cholm@nbi.dk               Web:    www.nbi.dk/~cholm
     | |
    


    This archive was generated by hypermail 2.1.5 : Fri Aug 01 2003 - 08:55:42 EDT