Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Cannot compile under Red Hat Enterprise 4

Help
2010-07-01
2012-09-01
  • Conor Lawless
    Conor Lawless
    2010-07-01

    I want to use JAGS on a fairly old, but large cluster running Red Hat
    Enterprise 4. There are no binaries for that distribution, so I tried to
    compile it myself. I downloaded and extracted the JAGS-2.1.0.tar.gz file, and
    tried to do:

    .\configure

    make

    make install

    .\configure runs without error, but when I try to make I get the cryptic
    messages (below) which might immediately mean something to someone who knows
    JAGS intimately.

    Any ideas about how to get this to compile would be greatly appreciated!

    Regards,

    CONOR.

    Compiler.cc: In static member function `static DistTab& Compiler::distTab()':
    
    Compiler.cc:1105: error: no matching function for call to `DistTab::DistTab()'
    
    ../../../src/include/distribution/DistTab.h:18: note: candidates are:
    DistTab::DistTab(const DistTab&)
    
    Compiler.cc: In static member function `static FuncTab& Compiler::funcTab()':
    
    Compiler.cc:1111: error: no matching function for call to `FuncTab::FuncTab()'
    
    ../../../src/include/function/FuncTab.h:18: note: candidates are:
    FuncTab::FuncTab(const FuncTab&)
    
    Compiler.cc: In static member function `static ObsFuncTab&
    Compiler::obsFuncTab()':
    
    Compiler.cc:1117: error: no matching function for call to
    `ObsFuncTab::ObsFuncTab()'
    
    ../../../src/include/compiler/ObsFuncTab.h:24: note: candidates are:
    ObsFuncTab::ObsFuncTab(const ObsFuncTab&)
    
    make: *** Error 1
    
    make: *** Error 2
    
    make: *** Error 1
    
    make: *** Error 1
    
    make: *** Error 1
    
    make: *** Error 2
    
     
  • Martyn Plummer
    Martyn Plummer
    2010-07-01

    It is because you are using gcc version 3.4, which is a bit old and does not
    sufficiently conform to the C++ standard. I can reproduce the problem using
    gcc 3.4 on Fedora 13.

    These classes have implicit default constructors, which should be declared and
    defined by the compiler (e.g. DistTab::DistTab()). For some reason gcc 3.4
    does not do this but it does implicitly declare a copy constructor (e.g.
    DistTab::DistTab(const DistTab&)) even though these are never needed.

    You could fix this by explicitly declaring and defining the missing
    constructors.

     
  • Conor Lawless
    Conor Lawless
    2010-07-02

    Thanks a lot for the help! I've gotten it to work now.

    For anyone else having this problem, you need to edit 6 files First there are
    3 header files:

    /JAGS2.1.0/src/include/compiler/ObsFuncTab.h

    /JAGS2.1.0/src/include/function/FuncTab.h

    /JAGS2.1.0/src/include/distribution/DistTab.h

    For these header files, simply add the constructor declaration (same as the
    class name) on the line after public. For example, for this snippet from
    ObsFuncTab, I've just added the last line:

    class ObsFuncTab

    {

    std::list<std::pair<DistPtr,FunctionPtr> > _flist;

    FunctionPtr const _nullfun;

    public:

    ObsFuncTab();

    Then you need to add an (empty) function definition in the 3 relevant .cc
    files which are:

    /JAGS2.1.0/src/lib/compiler/ObsFuncTab.cc

    /JAGS2.1.0/src/lib/function/FuncTab.cc

    /JAGS2.1.0/src/lib/distribution/DistTab.cc

    Again, for example, for the ObsFuncTab.cc file, I simply added the function
    definition (same as the class name):

    ObsFuncTab::ObsFuncTab(){}

    Regards,

    CONOR.