checking whether the C compiler works... no

You can get help here if Freeciv doesn't start on your computer, or if you keep getting fatal errors while playing etc.
Post Reply
submij
Posts: 3
Joined: Thu Jun 26, 2014 4:43 am

checking whether the C compiler works... no

Post by submij »

This has got to be an easy fix and it is late and there is a dog curled in my lap, but I'm not seeing it.

I have a freshing installed Mint 17 cinimon set up and just finsihed updating and upgrading all the systems and libraries.

gcc is in the path for me and sudo (/usr/bin/gcc)

and is sufficient version (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) )

but when I ./configure or sudo ./configure I get the following:

Code: Select all

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/jimbus/Downloads/freeciv-2.4.2':
configure: error: C compiler cannot create executables
See `config.log' for more details
Config.log shows

Code: Select all

/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:2804: checking build system type
configure:2818: result: x86_64-unknown-linux-gnu
configure:2838: checking host system type
configure:2851: result: x86_64-unknown-linux-gnu
configure:2919: checking for gcc
configure:2935: found /usr/bin/gcc
configure:2946: result: gcc
configure:3175: checking for C compiler version
configure:3184: gcc --version >&5
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 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:3195: $? = 0
configure:3184: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) 
configure:3195: $? = 0
configure:3184: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3195: $? = 4
configure:3215: checking whether the C compiler works
configure:3237: gcc    conftest.c  >&5
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: cannot find -lc
/usr/bin/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
configure:3241: $? = 1
configure:3279: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "freeciv"
| #define PACKAGE_TARNAME "freeciv"
| #define PACKAGE_VERSION "2.4.2"
| #define PACKAGE_STRING "freeciv 2.4.2"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3284: error: in `/home/jimbus/Downloads/freeciv-2.4.2':
configure:3286: error: C compiler cannot create executables
See `config.log' for more details

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

ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
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_CURL_CFLAGS_set=
ac_cv_env_CURL_CFLAGS_value=
ac_cv_env_CURL_LIBS_set=
ac_cv_env_CURL_LIBS_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_GTHREAD_CFLAGS_set=
ac_cv_env_GTHREAD_CFLAGS_value=
ac_cv_env_GTHREAD_LIBS_set=
ac_cv_env_GTHREAD_LIBS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LUA_CFLAGS_set=
ac_cv_env_LUA_CFLAGS_value=
ac_cv_env_LUA_LIBS_set=
ac_cv_env_LUA_LIBS_value=
ac_cv_env_PKG_CONFIG_set=
ac_cv_env_PKG_CONFIG_value=
ac_cv_env_PNG_CFLAGS_set=
ac_cv_env_PNG_CFLAGS_value=
ac_cv_env_PNG_LIBS_set=
ac_cv_env_PNG_LIBS_value=
ac_cv_env_XMKMF_set=
ac_cv_env_XMKMF_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_host=x86_64-unknown-linux-gnu
ac_cv_prog_ac_ct_CC=gcc

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

ACLOCAL=''
AI_MODULES_FALSE=''
AI_MODULES_TRUE=''
AI_MOD_STATIC_CLASSIC_FALSE=''
AI_MOD_STATIC_CLASSIC_TRUE=''
AI_MOD_STATIC_THREADED_FALSE=''
AI_MOD_STATIC_THREADED_TRUE=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR=''
AM_BACKSLASH=''
AM_DEFAULT_V=''
AM_DEFAULT_VERBOSITY=''
AM_V=''
AR=''
AUDIO_SDL_FALSE=''
AUDIO_SDL_TRUE=''
AUTOCONF=''
AUTOHEADER=''
AUTOMAKE=''
AWK=''
BUG_URL=''
CATALOGS=''
CATOBJEXT=''
CC='gcc'
CCDEPMODE=''
CFLAGS=''
CLIENT_FALSE=''
CLIENT_GUI_BEOS_FALSE=''
CLIENT_GUI_BEOS_TRUE=''
CLIENT_GUI_GTK_2_0_FALSE=''
CLIENT_GUI_GTK_2_0_TRUE=''
CLIENT_GUI_GTK_3_0_FALSE=''
CLIENT_GUI_GTK_3_0_TRUE=''
CLIENT_GUI_QT_FALSE=''
CLIENT_GUI_QT_TRUE=''
CLIENT_GUI_SDL_FALSE=''
CLIENT_GUI_SDL_TRUE=''
CLIENT_GUI_STUB_FALSE=''
CLIENT_GUI_STUB_TRUE=''
CLIENT_GUI_XAW_FALSE=''
CLIENT_GUI_XAW_TRUE=''
CLIENT_LIBS=''
CLIENT_TRUE=''
COMMON_LIBS=''
CONFIGURE_DEPENDENCIES=''
CPP=''
CPPFLAGS=''
CURL_CFLAGS=''
CURL_LIBS=''
CXX=''
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS=''
CYGPATH_W=''
DATADIRNAME=''
DATASUBDIR=''
DEFS=''
DEPDIR=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
EXP_AI_MODULES_FALSE=''
EXP_AI_MODULES_TRUE=''
FCDB_DB_FALSE=''
FCDB_DB_TRUE=''
FCDB_MYSQL_CFLAGS=''
FCDB_MYSQL_FALSE=''
FCDB_MYSQL_LIBS=''
FCDB_MYSQL_TRUE=''
FCDB_POSTGRES_CFLAGS=''
FCDB_POSTGRES_FALSE=''
FCDB_POSTGRES_LIBS=''
FCDB_POSTGRES_TRUE=''
FCDB_SQLITE3_CFLAGS=''
FCDB_SQLITE3_FALSE=''
FCDB_SQLITE3_LIBS=''
FCDB_SQLITE3_TRUE=''
FGREP=''
FT2_CFLAGS=''
FT2_CONFIG=''
FT2_LIBS=''
GGZDMOD_INCLUDES=''
GGZDMOD_LDFLAGS=''
GGZMOD_INCLUDES=''
GGZMOD_LDFLAGS=''
GGZ_CLIENT_FALSE=''
GGZ_CLIENT_TRUE=''
GGZ_CONFIG=''
GGZ_GTK_FALSE=''
GGZ_GTK_INCLUDES=''
GGZ_GTK_LDFLAGS=''
GGZ_GTK_TRUE=''
GGZ_SERVER_FALSE=''
GGZ_SERVER_TRUE=''
GMOFILES=''
GMSGFMT=''
GNULIB_CALLOC_POSIX=''
GNULIB_GETSUBOPT=''
GNULIB_MALLOC_POSIX=''
GNULIB_MKDTEMP=''
GNULIB_MKSTEMP=''
GNULIB_PUTENV=''
GNULIB_REALLOC_POSIX=''
GNULIB_RPMATCH=''
GNULIB_SETENV=''
GNULIB_STRTOD=''
GNULIB_UNSETENV=''
GREP=''
GTHREAD_CFLAGS=''
GTHREAD_LIBS=''
GTK2_CFLAGS=''
GTK2_LIBS=''
GTK3_CFLAGS=''
GTK3_LIBS=''
GUI_beos_CFLAGS=''
GUI_beos_LDFLAGS=''
GUI_beos_LIBS=''
GUI_gtk2_CFLAGS=''
GUI_gtk2_LDFLAGS=''
GUI_gtk2_LIBS=''
GUI_gtk3_CFLAGS=''
GUI_gtk3_LDFLAGS=''
GUI_gtk3_LIBS=''
GUI_qt_CFLAGS=''
GUI_qt_CPPFLAGS=''
GUI_qt_CXXFLAGS=''
GUI_qt_LDFLAGS=''
GUI_qt_LIBS=''
GUI_sdl_CFLAGS=''
GUI_sdl_LDFLAGS=''
GUI_sdl_LIBS=''
GUI_stub_CFLAGS=''
GUI_stub_LDFLAGS=''
GUI_stub_LIBS=''
GUI_xaw_CFLAGS=''
GUI_xaw_LDFLAGS=''
GUI_xaw_LIBS=''
GZIP=''
HAVE_CALLOC_POSIX=''
HAVE_GETSUBOPT=''
HAVE_MALLOC_POSIX=''
HAVE_MKDTEMP=''
HAVE_REALLOC_POSIX=''
HAVE_RPMATCH=''
HAVE_SETENV=''
HAVE_STRTOD=''
HAVE_UNSETENV=''
HOST_PATH_SEPARATOR=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
INSTALL_STRIP_PROGRAM=''
INSTOBJEXT=''
INTLLIBS=''
LD=''
LDFLAGS=''
LIBGGZ_INCLUDES=''
LIBGGZ_LDFLAGS=''
LIBICONV=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIB_GGZ=''
LIB_GGZDMOD=''
LIB_GGZMOD=''
LIB_GGZ_GTK=''
LIPO=''
LN_S=''
LTLIBICONV=''
LTLIBOBJS=''
LUASQL_AS_DEPENDENCY=''
LUASQL_CFLAGS=''
LUASQL_LIBS=''
LUA_CFLAGS=''
LUA_LIBS=''
MAIL_ADDRESS=''
MAJOR_VERSION=''
MAKEINFO=''
MAKE_CLIENT_INCLUDE_FALSE=''
MAKE_CLIENT_INCLUDE_TRUE=''
MAKE_DATA_FALSE=''
MAKE_DATA_TRUE=''
MANIFEST_TOOL=''
MAPIMG_WAND_CFLAGS=''
MAPIMG_WAND_LIBS=''
MINGW32_FALSE=''
MINGW32_TRUE=''
MINOR_VERSION=''
MKDIR_P=''
MKINSTALLDIRS=''
MODINST_FALSE=''
MODINST_TRUE=''
MP_gtk_CFLAGS=''
MP_gtk_LDFLAGS=''
MP_gtk_LIBS=''
MSGFMT=''
MSGFMT_OPTS=''
MYSQL_CFLAGS=''
MYSQL_CONFIG=''
MYSQL_LDFLAGS=''
MYSQL_VERSION=''
NETWORK_CAPSTRING_MANDATORY=''
NETWORK_CAPSTRING_OPTIONAL=''
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME='freeciv'
PACKAGE_STRING='freeciv 2.4.2'
PACKAGE_TARNAME='freeciv'
PACKAGE_URL=''
PACKAGE_VERSION='2.4.2'
PATH_SEPARATOR=':'
PG_CONFIG=''
PKG_CONFIG=''
PNG_CFLAGS=''
PNG_LIBS=''
POFILES=''
POSTGRESQL_CFLAGS=''
POSTGRESQL_LDFLAGS=''
POSTGRESQL_VERSION=''
POSUB=''
PO_IN_DATADIR_FALSE=''
PO_IN_DATADIR_TRUE=''
RANLIB=''
REPLACE_MKSTEMP=''
REPLACE_PUTENV=''
REPLACE_STRTOD=''
SDL_CFLAGS=''
SDL_CONFIG=''
SDL_LIBS=''
SED=''
SERVER_FALSE=''
SERVER_LIBS=''
SERVER_TRUE=''
SET_MAKE=''
SHELL='/bin/bash'
SOUND_CFLAGS=''
SOUND_LIBS=''
SQLITE3_CFLAGS=''
SQLITE3_LDFLAGS=''
SQLITE3_VERSION=''
STRIP=''
SVNREV_FALSE=''
SVNREV_TRUE=''
SYS_LUA_FALSE=''
SYS_LUA_TRUE=''
TOLUA=''
TOLUA_CFLAGS=''
TOLUA_LIBS=''
UNAME=''
USE_NLS=''
UTILITY_LIBS=''
VERSION=''
VERSION_LABEL=''
VERSION_WITHOUT_LABEL=''
VOID_UNSETENV=''
WAND_CFLAGS=''
WAND_LIBS=''
WIKI_URL=''
WINDRES=''
XGETTEXT=''
XMKMF=''
X_CFLAGS=''
X_EXTRA_LIBS=''
X_LIBS=''
X_PRE_LIBS=''
ac_ct_AR=''
ac_ct_CC='gcc'
ac_ct_CXX=''
ac_ct_DUMPBIN=''
aimoduledir=''
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__nodep=''
am__quote=''
am__tar=''
am__untar=''
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='unknown'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
ggz_config=''
ggz_gtk_includes=''
ggz_gtk_libraries=''
ggzdatadir=''
ggzdconfdir=''
ggzddatadir=''
ggzdexecmoddir=''
ggzdexecmodpath=''
ggzdmod_includes=''
ggzdmod_libraries=''
ggzexecmoddir=''
ggzmod_includes=''
ggzmod_libraries=''
ggzmoduleconfdir=''
host='x86_64-unknown-linux-gnu'
host_alias=''
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
libggz_includes=''
libggz_libraries=''
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p=''
oldincludedir='/usr/include'
packagesrcdir=''
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 "freeciv"
#define PACKAGE_TARNAME "freeciv"
#define PACKAGE_VERSION "2.4.2"
#define PACKAGE_STRING "freeciv 2.4.2"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""

configure: exit 77

It seems like some of the options are choking gcc. I changed -V for -V and it's complaining about -qversion

Any thoughts?
cazfi
Elite
Posts: 3105
Joined: Tue Jan 29, 2013 6:54 pm

Re: checking whether the C compiler works... no

Post by cazfi »

I don't think final fialure is related to "-v" option check (that failure is not fatal), but compile test for "checking whether the C compiler works" seems to fail basic linking with standard crt1.o. Can you compile anything with that compiler?

What if you do same test outside configure, i.e., make test.c -file with content:
/* confdefs.h */
#define PACKAGE_NAME "freeciv"
#define PACKAGE_TARNAME "freeciv"
#define PACKAGE_VERSION "2.4.2"
#define PACKAGE_STRING "freeciv 2.4.2"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
/* end confdefs.h. */

int
main ()
{

;
return 0;
}
and compile with "gcc test.c"
submij
Posts: 3
Joined: Thu Jun 26, 2014 4:43 am

Re: checking whether the C compiler works... no

Post by submij »

I added stdio.h and a printf to see what it was doing, but yeah, it worked

Code: Select all

#include <stdio.h>
/* confdefs.h */
#define PACKAGE_NAME "freeciv"
#define PACKAGE_TARNAME "freeciv"
#define PACKAGE_VERSION "2.4.2"
#define PACKAGE_STRING "freeciv 2.4.2"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
/* end confdefs.h. */

int
main ()
{
printf("Hello World\n");
;
return 0;
}

Code: Select all

jimbus@jimbus-Prime ~/Downloads/freeciv-2.4.2 $ gcc test.c
jimbus@jimbus-Prime ~/Downloads/freeciv-2.4.2 $ ./a.out 
Hello World

cazfi
Elite
Posts: 3105
Joined: Tue Jan 29, 2013 6:54 pm

Re: checking whether the C compiler works... no

Post by cazfi »

Googling for "mint /usr/bin/ld: cannot find crt1.o: No such file or directory"

found this: http://forums.linuxmint.com/viewtopic.p ... 9&t=162197
which seems to be about missing libc6-dev (that's where crt1.o lives)
submij
Posts: 3
Joined: Thu Jun 26, 2014 4:43 am

Re: checking whether the C compiler works... no

Post by submij »

looks like it was gcc-multilib... which had a error installing, but seems to be working. The error invovled appear to be a linux version of a library trying to overwrite the ubuntu named version, so I let it go and it seems happy.

I found it here:

http://stackoverflow.com/questions/9807 ... bit-system
Post Reply