PDA

View Full Version : CppUnit on Ubuntu



Hani Ayoub
January 31st, 2008, 01:58 PM
I'm trying to build the CppUnit over Ubuntu but i get an error while running the file ./configure.

Is any one did it before? did you faced any obstacles while building and compiling your own Unit tests?

the config.log file :



This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.59. Invocation command line was

$ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = HWS907
uname -m = i686
uname -r = 2.6.22-14-generic
uname -s = Linux
uname -v = #1 SMP Sun Oct 14 23:05:12 GMT 2007

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/X11R6/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1579: checking for a BSD-compatible install
configure:1634: result: /usr/bin/install -c
configure:1645: checking whether build environment is sane
configure:1688: result: yes
configure:1753: checking for gawk
configure:1782: result: no
configure:1753: checking for mawk
configure:1769: found /usr/bin/mawk
configure:1779: result: mawk
configure:1789: checking whether make sets $(MAKE)
configure:1809: result: yes
configure:1982: checking whether make sets $(MAKE)
configure:2002: result: yes
configure:2024: checking for a BSD-compatible install
configure:2079: result: /usr/bin/install -c
configure:2142: checking for gcc
configure:2158: found /usr/bin/gcc
configure:2168: result: gcc
configure:2412: checking for C compiler version
configure:2415: gcc --version </dev/null >&5
gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2418: $? = 0
configure:2420: gcc -v </dev/null >&5
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
configure:2423: $? = 0
configure:2425: gcc -V </dev/null >&5
gcc: '-V' option must have argument
configure:2428: $? = 1
configure:2451: checking for C compiler default output file name
configure:2454: gcc conftest.c >&5
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:2457: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "cppunit"
| #define VERSION "1.12.0"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2496: error: C compiler cannot create executables
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_F77_set=
ac_cv_env_F77_value=
ac_cv_env_FFLAGS_set=
ac_cv_env_FFLAGS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=mawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /home/ubuntu-devel/cppunit-1.12.0/config/missing --run aclocal-1.9'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='${SHELL} /home/ubuntu-devel/cppunit-1.12.0/config/missing --run tar'
AR=''
AS=''
AUTOCONF='${SHELL} /home/ubuntu-devel/cppunit-1.12.0/config/missing --run autoconf'
AUTOHEADER='${SHELL} /home/ubuntu-devel/cppunit-1.12.0/config/missing --run autoheader'
AUTOMAKE='${SHELL} /home/ubuntu-devel/cppunit-1.12.0/config/missing --run automake-1.9'
AWK='mawk'
CC='gcc'
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CPPUNIT_BINARY_AGE='0'
CPPUNIT_INTERFACE_AGE='0'
CPPUNIT_MAJOR_VERSION='1'
CPPUNIT_MICRO_VERSION='0'
CPPUNIT_MINOR_VERSION='12'
CPPUNIT_VERSION='1.12.0'
CXX=''
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
DLLTOOL=''
DOC_FALSE=''
DOC_TRUE=''
DOT=''
DOXYGEN=''
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
F77=''
FFLAGS=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
LDFLAGS=''
LIBADD_DL=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S=''
LTLIBOBJS=''
LT_AGE='0'
LT_CURRENT='0'
LT_RELEASE='1.12'
LT_REVISION='0'
MAKEINFO='${SHELL} /home/ubuntu-devel/cppunit-1.12.0/config/missing --run makeinfo'
OBJDUMP=''
OBJEXT=''
PACKAGE='cppunit'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB=''
SET_MAKE=''
SHELL='/bin/bash'
STRIP=''
VERSION='1.12.0'
ac_ct_AR=''
ac_ct_AS=''
ac_ct_CC='gcc'
ac_ct_CXX=''
ac_ct_DLLTOOL=''
ac_ct_F77=''
ac_ct_OBJDUMP=''
ac_ct_RANLIB=''
ac_ct_STRIP=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${prefix}/share'
enable_dot=''
enable_html_docs=''
enable_latex_docs=''
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
includedir='${prefix}/include'
infodir='${prefix}/info'
install_sh='/home/ubuntu-devel/cppunit-1.12.0/config/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
mkdir_p='mkdir -p --'
oldincludedir='/usr/include'
prefix='NONE'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE "cppunit"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME ""
#define PACKAGE_STRING ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define VERSION "1.12.0"

configure: exit 77




Please reply if you have any idea.
Thanks!

stroyan
January 31st, 2008, 07:19 PM
The error message indicates that you don't have the libc6-dev package installed.
You can get that and a few other initial development packages by installing the 'build-essential' package.

sudo apt-get install build-essential
Perhaps you really want to install the libcppunit-dev package.
That replaces the cppunit package.

If you really want to build the latest CppUnit from source then
you will probably need all the same packages that are installed by

sudo apt-get build-dep libcppunit-dev