compiler cannot create executables

Forum for questions and support relating to the 1.24.x releases only.
Locked
rangerbob
Posts: 61
Joined: Sat Jun 06, 2009 3:40 am

compiler cannot create executables

Post by rangerbob »

I am having trouble getting this to go

Code: Select all

I am running the latest Debian 
# uname -r
2.6.32-5-686-bigmem
I have been attempting what is outlined on this blog
http://churchgoopensource.blogspot.com/ ... u-904.html

Code: Select all

root@:/usr/src/zm# CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure --with-webdir=/var/www/zm --with-cgidir=/usr/lib/cgi-bin --with-ffmpeg=/usr/src/ffmpeg CPPFLAGS="-D__STDC_CONSTANT_MACROS" ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass --enable-debug=yes --with-webgroup=www-data --with-webuser=www-data --with-libarch=lib --enable-mmap=yes --with-mysql=/usr/local --with-webhost=s4.dotcom.com --enable-crashtrace=yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
configure: WARNING: You can call configure with the --with-extralibs option.
    Ordinarily you will need to use this option only when your copy of ffmpeg has been built
    with support for additional formats and you would use this option to detail which additional
    libraries ffmpeg was built with so that it is able to link successfully with ZoneMinder.
    You will need to wrap this option in quotes if it contains any spaces.
    e.g. --with-extralibs="-lmp3lame"
checking for g++... g++
checking whether the C++ compiler works... no
configure: error: in `/usr/src/zm':
configure: error: C++ compiler cannot create executables
See `config.log' for more details.
root@:/usr/src/zm# mc

root@:/usr/src/zm#
config.log

with this... /usr/bin/ld: cannot find -lposix even is..
I installed liblua5.1-posix-dev - posix development files for the Lua language version 5.1
but I still get this in the config.log?

and what configure: exit 77 means

Code: Select all

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

It was created by zm configure 1.24.3, which was
generated by GNU Autoconf 2.65.  Invocation command line was

  $ ./configure --with-webdir=/var/www/zm --with-cgidir=/usr/lib/cgi-bin --with-ffmpeg=/usr/src/ffmpeg CPPFLAGS=-D__STDC_CONSTANT_MACROS ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass --enable-debug=yes --with-webgroup=www-data --with-webuser=www-data --with-libarch=lib --enable-mmap=yes --with-mysql=/usr/local --with-webhost=s4.dotcom.com --enable-crashtrace=yes

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

hostname = s4
uname -m = i686
uname -r = 2.6.32-5-686-bigmem
uname -s = Linux
uname -v = #1 SMP Wed Jan 12 04:40:25 UTC 2011

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

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/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


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

configure:2442: checking for a BSD-compatible install
configure:2510: result: /usr/bin/install -c
configure:2521: checking whether build environment is sane
configure:2571: result: yes
configure:2712: checking for a thread-safe mkdir -p
configure:2751: result: /bin/mkdir -p
configure:2764: checking for gawk
configure:2780: found /usr/bin/gawk
configure:2791: result: gawk
configure:2802: checking whether make sets $(MAKE)
configure:2824: result: yes
configure:3048: WARNING: You can call configure with the --with-extralibs option.
    Ordinarily you will need to use this option only when your copy of ffmpeg has been built
    with support for additional formats and you would use this option to detail which additional
    libraries ffmpeg was built with so that it is able to link successfully with ZoneMinder.
    You will need to wrap this option in quotes if it contains any spaces.
    e.g. --with-extralibs="-lmp3lame"
configure:3293: checking for g++
configure:3309: found /usr/bin/g++
configure:3320: result: g++
configure:3347: checking for C++ compiler version
configure:3356: g++ --version >&5
g++ (Debian 4.4.5-8) 4.4.5
Copyright (C) 2010 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:3367: $? = 0
configure:3356: g++ -v >&5
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.4.5 (Debian 4.4.5-8) 
configure:3367: $? = 0
configure:3356: g++ -V >&5
g++: '-V' option must have argument
configure:3367: $? = 1
configure:3356: g++ -qversion >&5
g++: unrecognized option '-qversion'
g++: no input files
configure:3367: $? = 1
configure:3387: checking whether the C++ compiler works
configure:3409: g++  -I/usr/src/ffmpeg/include -D__STDC_CONSTANT_MACROS -L/usr/src/ffmpeg/lib -L/usr/local/lib/mysql   conftest.cpp -lposix >&5
/usr/bin/ld: cannot find -lposix
collect2: ld returned 1 exit status
configure:3413: $? = 1
configure:3451: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "zm"
| #define PACKAGE_TARNAME "ZoneMinder"
| #define PACKAGE_VERSION "1.24.3"
| #define PACKAGE_STRING "zm 1.24.3"
| #define PACKAGE_BUGREPORT "support@zoneminder.com"
| #define PACKAGE_URL "http://www.zoneminder.com/downloads.html"
| #define PACKAGE "ZoneMinder"
| #define VERSION "1.24.3"
| #define ZM_MEM_MAPPED 1
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3456: error: in `/usr/src/zm':
configure:3460: error: C++ compiler cannot create executables
See `config.log' for more details.

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

ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value=c89
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value=-O2
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=-D__STDC_CONSTANT_MACROS
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_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=set
ac_cv_env_LIBS_value=-lposix
ac_cv_env_ZM_DB_HOST_set=set
ac_cv_env_ZM_DB_HOST_value=localhost
ac_cv_env_ZM_DB_NAME_set=set
ac_cv_env_ZM_DB_NAME_value=zm
ac_cv_env_ZM_DB_PASS_set=set
ac_cv_env_ZM_DB_PASS_value=zmpass
ac_cv_env_ZM_DB_USER_set=set
ac_cv_env_ZM_DB_USER_value=zmuser
ac_cv_env_ZM_LOGDIR_set=
ac_cv_env_ZM_LOGDIR_value=
ac_cv_env_ZM_MYSQL_ENGINE_set=
ac_cv_env_ZM_MYSQL_ENGINE_value=
ac_cv_env_ZM_RUNDIR_set=
ac_cv_env_ZM_RUNDIR_value=
ac_cv_env_ZM_SSL_LIB_set=
ac_cv_env_ZM_SSL_LIB_value=
ac_cv_env_ZM_TMPDIR_set=
ac_cv_env_ZM_TMPDIR_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_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CXX=g++
ac_cv_prog_make_make_set=yes

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

ACLOCAL='${SHELL} /usr/src/zm/missing --run aclocal-1.11'
ALLOCA=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='${SHELL} /usr/src/zm/missing --run tar'
AUTOCONF='${SHELL} /usr/src/zm/missing --run autoconf'
AUTOHEADER='${SHELL} /usr/src/zm/missing --run autoheader'
AUTOMAKE='${SHELL} /usr/src/zm/missing --run automake-1.11'
AWK='gawk'
BINDIR=''
CC='c89'
CCDEPMODE=''
CFLAGS='-I/usr/src/ffmpeg/include -O2'
CGI_PREFIX='/usr/lib/cgi-bin'
CPPFLAGS='-I/usr/src/ffmpeg/include -D__STDC_CONSTANT_MACROS'
CXX='g++'
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
ENABLE_MMAP='yes'
EXEEXT=''
EXTRA_LIBS=''
EXTRA_PERL_LIB=''
FFMPEG_CFLAGS='-I/usr/src/ffmpeg/include'
FFMPEG_LIBS='-L/usr/src/ffmpeg/lib'
FFMPEG_PREFIX='/usr/src/ffmpeg'
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LDFLAGS='-L/usr/src/ffmpeg/lib -L/usr/local/lib/mysql  '
LIBDIR=''
LIBOBJS=''
LIBS='-lposix'
LIB_ARCH='lib'
LN_S=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /usr/src/zm/missing --run makeinfo'
MKDIR_P='/bin/mkdir -p'
MYSQL_CFLAGS='-I/usr/local/include'
MYSQL_LIBS='-L/usr/local/lib/mysql'
MYSQL_PREFIX='/usr/local'
OBJEXT=''
OPT_FFMPEG=''
OPT_NETPBM=''
PACKAGE='ZoneMinder'
PACKAGE_BUGREPORT='support@zoneminder.com'
PACKAGE_NAME='zm'
PACKAGE_STRING='zm 1.24.3'
PACKAGE_TARNAME='ZoneMinder'
PACKAGE_URL='http://www.zoneminder.com/downloads.html'
PACKAGE_VERSION='1.24.3'
PATH_BUILD='/usr/src/zm'
PATH_FFMPEG=''
PATH_NETPBM=''
PATH_SEPARATOR=':'
PERL=''
PERL_MM_PARMS=''
POW_LIB=''
RANLIB=''
SET_MAKE=''
SHELL='/bin/bash'
STRIP=''
SYSCONFDIR=''
TIME_BUILD='1299107928'
VERSION='1.24.3'
WEB_GROUP='www-data'
WEB_HOST='s4.dotcom.com'
WEB_PREFIX='/var/www/zm'
WEB_USER='www-data'
ZM_CONFIG=''
ZM_DB_HOST='localhost'
ZM_DB_NAME='zm'
ZM_DB_PASS='zmpass'
ZM_DB_USER='zmuser'
ZM_HAS_V4L1=''
ZM_HAS_V4L2=''
ZM_HAS_V4L=''
ZM_LOGDIR='/var/log/zm'
ZM_MYSQL_ENGINE='MyISAM'
ZM_PCRE=''
ZM_PID=''
ZM_RUNDIR='/var/run/zm'
ZM_SSL_LIB='gnutls'
ZM_TMPDIR='/tmp/zm'
ac_ct_CC=''
ac_ct_CXX='g++'
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include=''
am__isrc=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /usr/src/zm/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='/bin/mkdir -p'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

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

/* confdefs.h */
#define PACKAGE_NAME "zm"
#define PACKAGE_TARNAME "ZoneMinder"
#define PACKAGE_VERSION "1.24.3"
#define PACKAGE_STRING "zm 1.24.3"
#define PACKAGE_BUGREPORT "support@zoneminder.com"
#define PACKAGE_URL "http://www.zoneminder.com/downloads.html"
#define PACKAGE "ZoneMinder"
#define VERSION "1.24.3"
#define ZM_MEM_MAPPED 1

configure: exit 77
ruehlchr
Posts: 12
Joined: Fri Feb 18, 2011 2:14 am
Location: Hong Kong

Post by ruehlchr »

rangerbob,

try (as root or use sudo):
aptitude update
aptitude install build-essential
aptitude install g++

that might fix your problem.

regs.
Chris
If you wondering why your PC is so slow, try Linux instead!
Locked