Compiling from source, 64 bit Ubuntu

Help
Anonymous
2010-12-20
2013-04-25

  • Anonymous
    2010-12-20

    Hi

    I am running into the error "checking for C++ compiler default output file name… configure: C++ compiler cannot create executables" when tying to build gsdl 2.83

    I am on Ubuntu 10.04 64 bit. I have installed build-essential and also ia-32 libs

    Any ideas? Can post configure.log, but not sure how to find relevant section.

     
  • ak19
    ak19
    2011-01-07

    Hello,
    Sorry for the late reply, we were on holiday.

    Greenstone 2.83 (gsdl 2.83) was not coded for 64 bit machines. However, there is source code that's targeted at 64 bit machines which you can get from Greenstone's SVN (SVN is a version control system).

    The URL is:
    http://svn.greenstone.org/main/branches/64_bit_Greenstone/greenstone2

    And if you want GLI as well, then after checking out the above, you want to go into the greenstone2 folder that you just checked out and checkout GLI here from the URL:
    http://svn.greenstone.org/main/branches/64_bit_Greenstone/gli

    Finally, to compile, you would run the following 3 commands:
    ./configure -enable-apache-httpd
    make
    make install

     

  • Anonymous
    2011-02-14

    I followed the guide above but have met a sumbling block:

    checking "whether STL library has known faults"... "yes"
    configure: error: "STL Broken - Obtain newer version of GNU C Compiler"
    

    I have the newest version, afaik. What gives?

     
  • ak19
    ak19
    2012-11-20

    Very late response, but we hadn't encountered this issue until today.

    The issue is: 64 bit Ubuntu where the compilation step (the 'ant install' step) results in the error message that the person above documented:

    checking "whether STL library has known faults"… "yes"
    configure: error: "STL Broken - Obtain newer version of GNU C Compiler"

    We encountered this problem for the first time just now, with a student trying it out on their 64 bit Ubuntu.

    Two things to try that we did here. You may perhaps only need the first, or perhaps you need to carry out both of the following:

    1. Get the latest g++ compiler installed on your Ubuntu

    2. What seems to work (for now?) is to bypass the error checking that generates this error. There are 3 different configure.in files in your Greenstone installation that check for this error. Bypassing this test allowed compilation to succeed on the Ubuntu machine of the student here, and the GS3 server ran successfully thereafter. (Perhaps this is because GNU's C compiler is now beyond requiring this error check? Or perhaps we've merely deferred the actual problem that the error check was trying to highlight.)

    1. The 3 configure.in files that need changing are in the following locations of your Greenstone 3 installation:

    gs2build/configure.in, gs2build/common-src/configure.in, gs2build/build-src/configure.in

    2. Open each of the files above and, in each file, comment out or delete the section that does the STL test:

    dnl
    dnl Check if the STL library has any known faults;
    dnl In GCC 2.7.2.x series, some STL library headers are missing
    dnl a file called "new" which is referred to by other headers
    dnl (eg. vector/vector.h); if this applies, then all use of the
    dnl STL will cause a compile fail, so we'd better let the user
    dnl know now, before things really go wrong!
    dnl
    success=no
    AC_MSG_CHECKING("whether STL library has known faults")

    dnl - first shot, try simple good old vector on its own
    AC_TRY_COMPILE(
    [#include <vector>
    ],
    ,
    success=yes,
    )

    dnl - try using the .h equivalent
    if test $success = "no"; then
    AC_TRY_COMPILE(
    [#include <vector.h>
    ],
    ,
    success="yes",
    )
    fi

    dnl - now try for the objectspace headers
    if test $success = "no"; then
    AC_TRY_COMPILE(
    [#include <ospace\\std\\vector>
    ],
    ,
    success="yes",
    )
    fi

    if test $success = yes; then
    AC_MSG_RESULT("no")
    else
    AC_MSG_RESULT("yes")
    AC_MSG_ERROR("STL Broken - Obtain newer version of GNU C Compiler")
    fi

    3. With that configuration code now inactive in all 3 files, you next need to run the "autoconf" command in the 3 locations to re-generate the "configure" files from their configure.in files:

    gs3> cd gs2build
    gs3/gs2build> autoconf
    > cd build-src
    gs3/gs2build/build-src> autoconf
    > cd common-src
    gs3/gs2build/common-src> autoconf

    4. Now try running the "ant install" command and see if the configuration and compilation succeeds until the end.