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


Cannot compile under Red Hat Enterprise 4

  • Conor Lawless
    Conor Lawless

    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:



    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!



    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.cc:1117: error: no matching function for call to
    ../../../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

    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

  • Conor Lawless
    Conor Lawless

    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:




    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;



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




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