Problems installing CUnit

Help
Carl
2012-10-07
2012-10-25
  • Carl
    Carl
    2012-10-07

    Hi,

    I'm running Ubuntu 12.04.

    I'm trying to install CUnit. I try to follow the instructions in README, but
    I'm running into problems and 'make' generates an error. I have pasted the
    terminal session below. The commands are run in the CUnit install dir,
    CUnit-2.1-2 (the dir containing README, make, Makefile etc.).

    I wish to install in /opt/CUnit/ (is this typical? Or what would you
    recommend? I try not to have installed applications in my user dir.). My user
    doesn't have write access to /opt/, but using 'sudo automake', 'sudo make'
    etc. generates the same errors.

    Thanks,
    Carl

    (I replaced the name of my home dir with "<user-dir>".)

    $ aclocal
    $ autoconf
    $ automake
    CUnit/Sources/Automated/Makefile.am:3: Libtool library used but `LIBTOOL' is undefined
    CUnit/Sources/Automated/Makefile.am:3:   The usual way to define `LIBTOOL' is to add `LT_INIT'
    CUnit/Sources/Automated/Makefile.am:3:   to `configure.in' and run `aclocal' and `autoconf' again.
    CUnit/Sources/Automated/Makefile.am:3:   If `LT_INIT' is in `configure.in', make sure
    CUnit/Sources/Automated/Makefile.am:3:   its definition is in aclocal's search path.
    CUnit/Sources/Basic/Makefile.am:3: Libtool library used but `LIBTOOL' is undefined
    CUnit/Sources/Basic/Makefile.am:3:   The usual way to define `LIBTOOL' is to add `LT_INIT'
    CUnit/Sources/Basic/Makefile.am:3:   to `configure.in' and run `aclocal' and `autoconf' again.
    CUnit/Sources/Basic/Makefile.am:3:   If `LT_INIT' is in `configure.in', make sure
    CUnit/Sources/Basic/Makefile.am:3:   its definition is in aclocal's search path.
    CUnit/Sources/Console/Makefile.am:3: Libtool library used but `LIBTOOL' is undefined
    CUnit/Sources/Console/Makefile.am:3:   The usual way to define `LIBTOOL' is to add `LT_INIT'
    CUnit/Sources/Console/Makefile.am:3:   to `configure.in' and run `aclocal' and `autoconf' again.
    CUnit/Sources/Console/Makefile.am:3:   If `LT_INIT' is in `configure.in', make sure
    CUnit/Sources/Console/Makefile.am:3:   its definition is in aclocal's search path.
    CUnit/Sources/Curses/Makefile.am:3: Libtool library used but `LIBTOOL' is undefined
    CUnit/Sources/Curses/Makefile.am:3:   The usual way to define `LIBTOOL' is to add `LT_INIT'
    CUnit/Sources/Curses/Makefile.am:3:   to `configure.in' and run `aclocal' and `autoconf' again.
    CUnit/Sources/Curses/Makefile.am:3:   If `LT_INIT' is in `configure.in', make sure
    CUnit/Sources/Curses/Makefile.am:3:   its definition is in aclocal's search path.
    CUnit/Sources/Framework/Makefile.am:18: `%'-style pattern rules are a GNU make extension
    CUnit/Sources/Framework/Makefile.am:28: library used but `RANLIB' is undefined
    CUnit/Sources/Framework/Makefile.am:28:   The usual way to define `RANLIB' is to add `AC_PROG_RANLIB'
    CUnit/Sources/Framework/Makefile.am:28:   to `configure.in' and run `autoconf' again.
    CUnit/Sources/Framework/Makefile.am:10: Libtool library used but `LIBTOOL' is undefined
    CUnit/Sources/Framework/Makefile.am:10:   The usual way to define `LIBTOOL' is to add `LT_INIT'
    CUnit/Sources/Framework/Makefile.am:10:   to `configure.in' and run `aclocal' and `autoconf' again.
    CUnit/Sources/Framework/Makefile.am:10:   If `LT_INIT' is in `configure.in', make sure
    CUnit/Sources/Framework/Makefile.am:10:   its definition is in aclocal's search path.
    CUnit/Sources/Makefile.am:74: library used but `RANLIB' is undefined
    CUnit/Sources/Makefile.am:74:   The usual way to define `RANLIB' is to add `AC_PROG_RANLIB'
    CUnit/Sources/Makefile.am:74:   to `configure.in' and run `autoconf' again.
    CUnit/Sources/Makefile.am:67: Libtool library used but `LIBTOOL' is undefined
    CUnit/Sources/Makefile.am:67:   The usual way to define `LIBTOOL' is to add `LT_INIT'
    CUnit/Sources/Makefile.am:67:   to `configure.in' and run `aclocal' and `autoconf' again.
    CUnit/Sources/Makefile.am:67:   If `LT_INIT' is in `configure.in', make sure
    CUnit/Sources/Makefile.am:67:   its definition is in aclocal's search path.
    Examples/Makefile.am:26: library used but `RANLIB' is undefined
    Examples/Makefile.am:26:   The usual way to define `RANLIB' is to add `AC_PROG_RANLIB'
    Examples/Makefile.am:26:   to `configure.in' and run `autoconf' again.
    $ 
    $ 
    $ 
    $ 
    $ ./configure --prefix /opt/CUnit/
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    /home/<user-dir>/misc/c_test/CUnit-2.1-2/missing: Unknown `--run' option
    Try `/home/<user-dir>/misc/c_test/CUnit-2.1-2/missing --help' for more information
    configure: WARNING: `missing' script is too old or missing
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... no
    checking for mawk... mawk
    checking whether make sets $(MAKE)... yes
    ---------- Disabling debug mode compilation.
    ++++++++++ Enabling automated(XML) mode compilation
    ++++++++++ Enabling basic mode compilation
    ++++++++++ Enabling console mode compilation
    ---------- Disabling curses mode compilation
    ---------- Disabling examples mode compilation
    ---------- Disabling test mode compilation
    ---------- Disabling memtrace functionality at compile time
    ---------- Disabling use of deprecated v1.1 names
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables... 
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking for style of include used by make... GNU
    checking dependency style of gcc... gcc3
    checking whether make sets $(MAKE)... (cached) yes
    ./configure: line 3881: AC_PROG_LIBTOOL: command not found
    checking for main in -lc... yes
    checking for malloc... yes
    checking for free... yes
    checking for calloc... yes
    checking for realloc... yes
    checking for strcpy... yes
    checking for strerror... yes
    checking for fopen... yes
    checking for fclose... yes
    checking for fprintf... yes
    checking for setvbuf... yes
    checking for time... yes
    checking for ctime... yes
    checking how to run the C preprocessor... gcc -E
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking assert.h usability... yes
    checking assert.h presence... yes
    checking for assert.h... yes
    checking ctype.h usability... yes
    checking ctype.h presence... yes
    checking for ctype.h... yes
    checking math.h usability... yes
    checking math.h presence... yes
    checking for math.h... yes
    checking file.h usability... no
    checking file.h presence... no
    checking for file.h... no
    checking stdio.h usability... yes
    checking stdio.h presence... yes
    checking for stdio.h... yes
    checking for stdlib.h... (cached) yes
    checking for string.h... (cached) yes
    checking for an ANSI C-conforming const... yes
    configure: creating ./config.status
    config.status: creating Jamrules
    config.status: creating Makefile
    config.status: creating CUnit.spec
    config.status: creating cunit.pc
    config.status: creating CUnit/Makefile
    config.status: creating CUnit/Headers/Makefile
    config.status: creating CUnit/Headers/CUnit.h
    config.status: creating CUnit/Sources/Makefile
    config.status: creating CUnit/Sources/Framework/Makefile
    config.status: creating CUnit/Sources/Automated/Makefile
    config.status: creating CUnit/Sources/Basic/Makefile
    config.status: creating CUnit/Sources/Console/Makefile
    config.status: creating CUnit/Sources/Curses/Makefile
    config.status: creating CUnit/Sources/Test/Makefile
    config.status: creating doc/Makefile
    config.status: creating doc/headers/Makefile
    config.status: creating Examples/Makefile
    config.status: creating Examples/AutomatedTest/Makefile
    config.status: creating Examples/BasicTest/Makefile
    config.status: creating Examples/ConsoleTest/Makefile
    config.status: creating Examples/CursesTest/Makefile
    config.status: creating Man/Makefile
    config.status: creating Man/man3/Makefile
    config.status: creating Share/Makefile
    config.status: creating config.h
    config.status: config.h is unchanged
    config.status: executing depfiles commands
    $ 
    $ 
    $ 
    $ sudo make
    [sudo] password for carl: 
     cd . && automake-1.11 --gnu
    CUnit/Sources/Automated/Makefile.am:3: Libtool library used but `LIBTOOL' is undefined
    CUnit/Sources/Automated/Makefile.am:3:   The usual way to define `LIBTOOL' is to add `LT_INIT'
    CUnit/Sources/Automated/Makefile.am:3:   to `configure.in' and run `aclocal' and `autoconf' again.
    CUnit/Sources/Automated/Makefile.am:3:   If `LT_INIT' is in `configure.in', make sure
    CUnit/Sources/Automated/Makefile.am:3:   its definition is in aclocal's search path.
    CUnit/Sources/Basic/Makefile.am:3: Libtool library used but `LIBTOOL' is undefined
    CUnit/Sources/Basic/Makefile.am:3:   The usual way to define `LIBTOOL' is to add `LT_INIT'
    CUnit/Sources/Basic/Makefile.am:3:   to `configure.in' and run `aclocal' and `autoconf' again.
    CUnit/Sources/Basic/Makefile.am:3:   If `LT_INIT' is in `configure.in', make sure
    CUnit/Sources/Basic/Makefile.am:3:   its definition is in aclocal's search path.
    CUnit/Sources/Console/Makefile.am:3: Libtool library used but `LIBTOOL' is undefined
    CUnit/Sources/Console/Makefile.am:3:   The usual way to define `LIBTOOL' is to add `LT_INIT'
    CUnit/Sources/Console/Makefile.am:3:   to `configure.in' and run `aclocal' and `autoconf' again.
    CUnit/Sources/Console/Makefile.am:3:   If `LT_INIT' is in `configure.in', make sure
    CUnit/Sources/Console/Makefile.am:3:   its definition is in aclocal's search path.
    CUnit/Sources/Curses/Makefile.am:3: Libtool library used but `LIBTOOL' is undefined
    CUnit/Sources/Curses/Makefile.am:3:   The usual way to define `LIBTOOL' is to add `LT_INIT'
    CUnit/Sources/Curses/Makefile.am:3:   to `configure.in' and run `aclocal' and `autoconf' again.
    CUnit/Sources/Curses/Makefile.am:3:   If `LT_INIT' is in `configure.in', make sure
    CUnit/Sources/Curses/Makefile.am:3:   its definition is in aclocal's search path.
    CUnit/Sources/Framework/Makefile.am:18: `%'-style pattern rules are a GNU make extension
    CUnit/Sources/Framework/Makefile.am:28: library used but `RANLIB' is undefined
    CUnit/Sources/Framework/Makefile.am:28:   The usual way to define `RANLIB' is to add `AC_PROG_RANLIB'
    CUnit/Sources/Framework/Makefile.am:28:   to `configure.in' and run `autoconf' again.
    CUnit/Sources/Framework/Makefile.am:10: Libtool library used but `LIBTOOL' is undefined
    CUnit/Sources/Framework/Makefile.am:10:   The usual way to define `LIBTOOL' is to add `LT_INIT'
    CUnit/Sources/Framework/Makefile.am:10:   to `configure.in' and run `aclocal' and `autoconf' again.
    CUnit/Sources/Framework/Makefile.am:10:   If `LT_INIT' is in `configure.in', make sure
    CUnit/Sources/Framework/Makefile.am:10:   its definition is in aclocal's search path.
    CUnit/Sources/Makefile.am:74: library used but `RANLIB' is undefined
    CUnit/Sources/Makefile.am:74:   The usual way to define `RANLIB' is to add `AC_PROG_RANLIB'
    CUnit/Sources/Makefile.am:74:   to `configure.in' and run `autoconf' again.
    CUnit/Sources/Makefile.am:67: Libtool library used but `LIBTOOL' is undefined
    CUnit/Sources/Makefile.am:67:   The usual way to define `LIBTOOL' is to add `LT_INIT'
    CUnit/Sources/Makefile.am:67:   to `configure.in' and run `aclocal' and `autoconf' again.
    CUnit/Sources/Makefile.am:67:   If `LT_INIT' is in `configure.in', make sure
    CUnit/Sources/Makefile.am:67:   its definition is in aclocal's search path.
    Examples/Makefile.am:26: library used but `RANLIB' is undefined
    Examples/Makefile.am:26:   The usual way to define `RANLIB' is to add `AC_PROG_RANLIB'
    Examples/Makefile.am:26:   to `configure.in' and run `autoconf' again.
    make: *** [Makefile.in] Error 1
    $
    
     
  • Carl
    Carl
    2012-10-07

    I solved it.

    I installed libtools. When running make, I then got:

    mv: cannot stat `.deps/CUError.Tpo': No such file or directory
    

    After some googling I tried running autoreconf before make, and then it
    worked.