web-dev-qa-db-fra.com

comment réparer configure: erreur: le compilateur C ne peut pas créer d'exécutables

utilisé

./configure DFLAGS="-03"

et c'est le config.log

checking build system type... i686-pc-linux-gnu  
checking Host system type... i686-pc-linux-gnu  
checking target system type... i686-pc-linux-gnu  
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  
checking whether make supports nested variables... yes  
checking whether to enable maintainer-specific portions of Makefiles... no  
checking for style of include used by make... GNU  
checking for gcc... gcc  
checking whether the C compiler works... no  
configure: error: in `/home/mike/cpuminer-2.4.2':  
configure: error: C compiler cannot create executables  

mon système est Ubuntu 14.04 et les détails du système indiquent que l'os est en 32 bits. toute aide serait utile car le compilateur échoue chaque fois que j'essaie de l'utiliser, pas seulement avec cette installation.

config.log sortie:

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

It was created by cpuminer configure 2.4.2, which was  
generated by GNU Autoconf 2.69.  Invocation command line was  

  $ ./configure CFLAGS=-03  

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

hostname = mike-Dell-DM051  
uname -m = i686  
uname -r = 3.13.0-57-generic  
uname -s = Linux  
uname -v = #95-Ubuntu SMP Fri Jun 19 09:27:48 UTC 2015  

/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  
PATH: /usr/games  
PATH: /usr/local/game  

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

configure:2336: checking build system type  
configure:2350: result: i686-pc-linux-gnu  
configure:2370: checking Host system type  
configure:2383: result: i686-pc-linux-gnu  
configure:2403: checking target system type  
configure:2416: result: i686-pc-linux-gnu  
configure:2460: checking for a BSD-compatible install  
configure:2528: result: /usr/bin/install -c  
configure:2539: checking whether build environment is sane  
configure:2594: result: yes  
configure:2745: checking for a thread-safe mkdir -p  
configure:2784: result: /bin/mkdir -p  
configure:2791: checking for gawk  
configure:2807: found /usr/bin/gawk  
configure:2818: result: gawk  
configure:2829: checking whether make sets $(MAKE)  
configure:2851: result: yes  
configure:2880: checking whether make supports nested variables  
configure:2897: result: yes  
configure:3026: checking whether to enable maintainer-specific portions of Make$  
configure:3035: result: no  
configure:3061: checking for style of include used by make  
configure:3089: result: GNU  
configure:3160: checking for gcc  
configure:3176: found /usr/bin/gcc  
configure:3187: result: gcc  
configure:3416: checking for C compiler version  
configure:3425: gcc --version >&5  
gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4  
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:3436: $? = 0  
configure:3425: gcc -v >&5  
Using built-in specs.  
COLLECT_GCC=gcc  
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.8/lto-wrapper  
Target: i686-linux-gnu  
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.4-2ubuntu1~1$  
Thread model: posix  
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04)  
configure:3436: $? = 0  
configure:3425: gcc -V >&5  
gcc: error: unrecognized command line option '-qversion'  
gcc: fatal error: no input files  
compilation terminated.  
configure:3436: $? = 4  
configure:3456: checking whether the C compiler works  
configure:3478: gcc -03   conftest.c  >&5  
gcc: error: unrecognized command line option '-03'  
configure:3482: $? = 1  
configure:3520: result: no  
configure: failed program was:  
| /* confdefs.h */  
| #define PACKAGE_NAME "cpuminer"  
| #define PACKAGE_TARNAME "cpuminer"  
| #define PACKAGE_VERSION "2.4.2"  
| #define PACKAGE_STRING "cpuminer 2.4.2"  
| #define PACKAGE_BUGREPORT ""  
| #define PACKAGE_URL ""| #define PACKAGE "cpuminer"  
| #define VERSION "2.4.2"  
| /* end confdefs.h.  */  
|  
| int  
| main ()  
| {  
|  
|   ;  
|   return 0;  
| }  
configure:3525: error: in `/home/mike/cpuminer-2.4.2':  
configure:3527: error: C compiler cannot create executables  
See `config.log' for more details  

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

ac_cv_build=i686-pc-linux-gnu  
ac_cv_env_CCASFLAGS_set=  
ac_cv_env_CCASFLAGS_value=  
ac_cv_env_CCAS_set=  
ac_cv_env_CCAS_value=  
ac_cv_env_CC_set=  
ac_cv_env_CC_value=  
ac_cv_env_CFLAGS_set=set  
ac_cv_env_CFLAGS_value=-03  
ac_cv_env_CPPFLAGS_set=  
ac_cv_env_CPPFLAGS_value=  
ac_cv_env_CPP_set=  
ac_cv_env_CPP_value=  
ac_cv_env_LDFLAGS_set=  
ac_cv_env_LDFLAGS_value=  
ac_cv_env_LIBS_set=  
ac_cv_env_LIBS_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=i686-pc-linux-gnu  
ac_cv_path_install='/usr/bin/install -c'ac_cv_path_mkdir=/bin/mkdir  
ac_cv_prog_AWK=gawk  
ac_cv_prog_ac_ct_CC=gcc  
ac_cv_prog_make_make_set=yes  
ac_cv_target=i686-pc-linux-gnu  
am_cv_make_support_nested_variables=yes  

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

ACLOCAL='${Shell} /home/mike/cpuminer-2.4.2/missing aclocal-1.14'  
ALLOCA=''    
AMDEPBACKSLASH='\'  
AMDEP_FALSE='#'  
AMDEP_TRUE=''  
AMTAR='$${TAR-tar}'  
AM_BACKSLASH='\'  
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'  
AM_DEFAULT_VERBOSITY='1'  
AM_V='$(V)'  
Arch_ARM_FALSE=''Arch_ARM_TRUE=''  
Arch_PPC_FALSE=''  
Arch_PPC_TRUE=''  
Arch_x86_64_FALSE=''  
Arch_x86_64_TRUE=''  
Arch_x86_FALSE=''  
Arch_x86_TRUE=''  
AUTOCONF='${Shell} /home/mike/cpuminer-2.4.2/missing autoconf'  
AUTOHEADER='${Shell} /home/mike/cpuminer-2.4.2/missing autoheader'  
AUTOMAKE='${Shell} /home/mike/cpuminer-2.4.2/missing automake-1.14'  
AWK='gawk'  
CC='gcc'  
CCAS=''  
CCASDEPMODE=''  
CCASFLAGS=''  
CCDEPMODE=''  
CFLAGS='-03'  
CPP=''  
CPPFLAGS=''  
CYGPATH_W='echo'  
DEFS=''  
DEPDIR='.deps'  
ECHO_C=''  
ECHO_N='-n'  
ECHO_T=''  
EGREP=''  
EXEEXT=''  
GREP=''  
HAVE_WINDOWS_FALSE=''  
HAVE_WINDOWS_TRUE=''  
INSTALL_DATA='${INSTALL} -m 644'  
INSTALL_PROGRAM='${INSTALL}'  
INSTALL_SCRIPT='${INSTALL}'  
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'  
JANSSON_LIBS=''  
LDFLAGS=''  
LIBCURL=''  
LIBCURL_CPPFLAGS=''  
LIBOBJS=''  
LIBS=''  
LTLIBOBJS=''  
MAINT='#'  
MAINTAINER_MODE_FALSE=''  
MAINTAINER_MODE_TRUE='#'MAKEINFO='${Shell} /home/mike/cpuminer-2.4.2/missing makeinfo'  
MKDIR_P='/bin/mkdir -p'  
OBJEXT=''  
PACKAGE='cpuminer'  
PACKAGE_BUGREPORT=''  
PACKAGE_NAME='cpuminer'  
PACKAGE_STRING='cpuminer 2.4.2'  
PACKAGE_TARNAME='cpuminer'  
PACKAGE_URL=''  
PACKAGE_VERSION='2.4.2'  
PATH_SEPARATOR=':'  
PTHREAD_FLAGS=''  
PTHREAD_LIBS=''  
RANLIB=''  
SET_MAKE=''  
Shell='/bin/bash'  
STRIP=''  
USE_ASM_FALSE=''  
USE_ASM_TRUE=''  
VERSION='2.4.2'  
WANT_JANSSON_FALSE=''  
WANT_JANSSON_TRUE=''  
S2_LIBS=''  
_libcurl_config=''  
ac_ct_CC='gcc'  
am__EXEEXT_FALSE=''  
am__EXEEXT_TRUE=''  
am__fastdepCCAS_FALSE=''  
am__fastdepCCAS_TRUE=''  
am__fastdepCC_FALSE=''  
am__fastdepCC_TRUE=''  
am__include='include'  
am__isrc=''  
am__leading_dot='.'  
am__nodep='_no'  
am__quote=''  
am__tar='$${TAR-tar} chof - "$$tardir"'  
am__untar='$${TAR-tar} xf -'  
bindir='${exec_prefix}/bin'  
build='i686-pc-linux-gnu'  
build_alias=''  
build_cpu='i686'  
build_os='linux-gnu'  
build_vendor='pc'htmldir='${docdir}'  
includedir='${prefix}/include'  
infodir='${datarootdir}/info'  
install_sh='${Shell} /home/mike/cpuminer-2.4.2/install-sh'  
libdir='${exec_prefix}/lib'  
libexecdir='${exec_prefix}/libexec'  
localedir='${datarootdir}/locale'  
localstatedir='${prefix}/var'  
mandir='${datarootdir}/man'  
mkdir_p='$(MKDIR_P)'  
oldincludedir='/usr/include'  
pdfdir='${docdir}'  
sbindir='${exec_prefix}/sbin'  
sharedstatedir='${prefix}/com'  
sysconfdir='${prefix}/etc'  
target='i686-pc-linux-gnu'  
target_alias=''  
target_cpu='i686'  
target_os='linux-gnu'  
target_vendor='pc'  

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

/* confdefs.h */  
#define PACKAGE_NAME "cpuminer"  
#define PACKAGE_TARNAME "cpuminer"  
#define PACKAGE_VERSION "2.4.2"  
#define PACKAGE_STRING "cpuminer 2.4.2"  
#define PACKAGE_BUGREPORT ""  
#define PACKAGE_URL ""  
#define PACKAGE "cpuminer"  
#define VERSION "2.4.2"  

configure: exit 77  
8
Mike O

À partir du config.log:

configure:3478: gcc -03   conftest.c  >&5  
gcc: error: unrecognized command line option '-03'  

L'option est -O3 avec la lettre O, pas le nombre 0 (zéro). Donc, vous devriez lancer, comme indiqué dans le fichier README:

./configure CFLAGS="-O3"
15
muru

À mon avis, le compilateur C de base est installé, mais pas les en-têtes de la bibliothèque standard. Essayer:

Sudo apt install libc6-dev

[Edit: cela produit des symptômes similaires, mais ce n'était pas le cas ici. Les réponses de CFLAGS semblent être correctes.]

13
Colin Watson

On dirait que votre CFLAGS a un zéro au lieu d'un O majuscule. Ce n'est pas valide et la compilation échoue. Vous pouvez le réparer, mais recherchez une version ultérieure du paquet qui a été corrigée.

4
ubfan1

J'avais exactement le même problème en essayant d'installer tivodecode sur une version de base de Linux Mint 17.3. J'ai essayé le:

./configure DFLAGS="-O3"

commande mais sans effet. Alors j'ai essayé:

Sudo apt install libc6-dev

installer les derniers en-têtes C. J'ai réessayé la commande ./configure sans aucune variable et tout s'est bien passé. Les commandes make et make install ont également abouti. Ma recommandation est de m'assurer que les derniers en-têtes C sont installés, puis exécutez votre commande ./configure.

2
JohnH