We have two GCC versions 4 & 6 however we could see error while installing this. Please help. «
Getting configure: error: C compiler cannot create executables error
cat /etc/redhat-release
CentOS release 6.10 (Final)
uname -a
Linux XXX 2.6.32-754.28.1.el6.x86_64 #1 SMP Wed Mar 11 18:38:45 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
GCC Version :6
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/6.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure
Thread model: posix
gcc version 6.1.0 (GCC)
GCC 4
/usr/bin/gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure —prefix=/usr —mandir=/usr/share/man —infodir=/usr/share/info —with-bugurl=http://bugzilla.redhat.com/bugzilla —enable-bootstrap —enable-shared —enable-threads=posix —enable-checking=release —with-system-zlib —enable-__cxa_atexit —disable-libunwind-exceptions —enable-gnu-unique-object —enable-languages=c,c++,objc,obj-c++,java,fortran,ada —enable-java-awt=gtk —disable-dssi —with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre —enable-libgcj-multifile —enable-java-maintainer-mode —with-ecj-jar=/usr/share/java/eclipse-ecj.jar —disable-libjava-multilib —with-ppl —with-cloog —with-tune=generic —with-arch_32=i686 —build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC)
export RISCV=/usr/bin/riscv
/root/riscv-isa-sim-master/configure —prefix=$RISCV —enable-commitlog —enable-misaligned
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 /usr/local': configure: error: C compiler cannot create executables See
config.log’ for more details
`[root@asic-5 local]# 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 RISC-V ISA Simulator configure ?, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ /root/riscv-isa-sim-master/configure —prefix=/usr/bin/riscv —enable-commitlog —enable-misaligned
———
Platform.
———
hostname = asic-5.enphaseenergy.com
uname -m = x86_64
uname -r = 2.6.32-754.28.1.el6.x86_64
uname -s = Linux
uname -v = #1 SMP Wed Mar 11 18:38:45 UTC 2020
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = x86_64
/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/lib64/qt-3.3/bin
PATH: /usr/share/lsf/9.1/linux2.6-glibc2.3-x86_64/etc
PATH: /usr/share/lsf/9.1/linux2.6-glibc2.3-x86_64/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /sbin
PATH: /bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /opt/dell/srvadmin/bin
PATH: /opt/dell/srvadmin/sbin
PATH: /root/bin
————
Core tests.
————
configure:2127: checking build system type
configure:2141: result: x86_64-unknown-linux-gnu
configure:2161: checking host system type
configure:2174: result: x86_64-unknown-linux-gnu
configure:2393: checking for gcc
configure:2409: found /usr/local/bin/gcc
configure:2420: result: gcc
configure:2649: checking for C compiler version
configure:2658: gcc —version >&5
gcc (GCC) 6.1.0
Copyright (C) 2016 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:2669: $? = 0
configure:2658: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/6.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure
Thread model: posix
gcc version 6.1.0 (GCC)
configure:2669: $? = 0
configure:2658: gcc -V >&5
gcc: error: unrecognized command line option ‘-V’
gcc: fatal error: no input files
compilation terminated.
configure:2669: $? = 1
configure:2658: gcc -qversion >&5
gcc: error: unrecognized command line option ‘-qversion’; did you mean ‘—version’?
gcc: fatal error: no input files
compilation terminated.
configure:2669: $? = 1
configure:2689: checking whether the C compiler works
configure:2711: gcc conftest.c >&5
/usr/bin/ld: crtbegin.o: No such file: No such file or directory
collect2: error: ld returned 1 exit status
configure:2715: $? = 1
configure:2753: result: no
configure: failed program was:
| /* confdefs.h /
| #define PACKAGE_NAME «RISC-V ISA Simulator»
| #define PACKAGE_TARNAME «spike»
| #define PACKAGE_VERSION «?»
| #define PACKAGE_STRING «RISC-V ISA Simulator ?»
| #define PACKAGE_BUGREPORT «Andrew Waterman»
| #define PACKAGE_URL «»
| / end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2758: error: in /usr/local': configure:2760: 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_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=
ac_cv_env_LIBS_value=
ac_cv_env_STOW_PREFIX_set=
ac_cv_env_STOW_PREFIX_value=
ac_cv_env_STOW_ROOT_set=
ac_cv_env_STOW_ROOT_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.
——————
AR=»
CC=’gcc’
CFLAGS=»
CPPFLAGS=»
CXX=»
CXXCPP=»
CXXFLAGS=»
DEFS=»
DTC=»
ECHO_C=»
ECHO_N=’-n’
ECHO_T=»
EGREP=»
EXEEXT=»
GREP=»
HAVE_INT128=»
INSTALL_DATA=»
INSTALL_PROGRAM=»
INSTALL_SCRIPT=»
LDFLAGS=»
LIBOBJS=»
LIBS=»
LTLIBOBJS=»
OBJEXT=»
PACKAGE_BUGREPORT=’Andrew Waterman’
PACKAGE_NAME=’RISC-V ISA Simulator’
PACKAGE_STRING=’RISC-V ISA Simulator ?’
PACKAGE_TARNAME=’spike’
PACKAGE_URL=»
PACKAGE_VERSION=’?’
PATH_SEPARATOR=’:’
RANLIB=»
SHELL=’/bin/sh’
STOW_PREFIX=»
STOW_ROOT=»
ac_ct_CC=’gcc’
ac_ct_CXX=»
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}’
enable_stow=»
exec_prefix=’NONE’
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’
libdir=’${exec_prefix}/lib’
libexecdir=’${exec_prefix}/libexec’
localedir=’${datarootdir}/locale’
localstatedir=’${prefix}/var’
mandir=’${datarootdir}/man’
oldincludedir=’/usr/include’
pdfdir=’${docdir}’
prefix=’/usr/bin/riscv’
program_transform_name=’s,x,x,’
psdir=’${docdir}’
sbindir=’${exec_prefix}/sbin’
sharedstatedir=’${prefix}/com’
subprojects=»
subprojects_enabled=»
sysconfdir=’${prefix}/etc’
target_alias=»
————
confdefs.h.
————
/* confdefs.h */
#define PACKAGE_NAME «RISC-V ISA Simulator»
#define PACKAGE_TARNAME «spike»
#define PACKAGE_VERSION «?»
#define PACKAGE_STRING «RISC-V ISA Simulator ?»
#define PACKAGE_BUGREPORT «Andrew Waterman»
#define PACKAGE_URL «»
configure: exit 77
[root@asic-5 local]#
`
From the output you’ve given, you are trying to compile a 32-bit build of apache on a 64 bit system. This is from the intput to configure here:
--host=x86_32-unknown-linux-gnu host_alias=x86_32-unknown-linux-gnu CFLAGS=-m32 LDFLAGS=-m32
Also see the output lines confirming this:
configure:3629: checking build system type
configure:3643: result: x86_64-unknown-linux-gnu
configure:3663: checking host system type
configure:3676: result: x86_32-unknown-linux-gnu
configure:3696: checking target system type
configure:3709: result: x86_32-unknown-linux-gnu
Here it is using a 64 bit build system but a 32 bit host/target. Further down we see:
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value=-m32
This flag tells gcc to produce 32 bit objects. Your error that the C compiler cannot produce executable is likely caused by not having a 32 bit toolchain present.
Testing your ability to compile 32 bit objects
You can test this by compiling a small C example with the -m32
flag.
// Minimal C example
#include <stdio.h>
int main()
{
printf("This worksn");
return 0;
}
Compiling:
gcc -m32 -o m32test m32test.c
If this command fails, then you have a problem with your compiler being able to build 32 bit objects. The error messages emitted from the compiler may be helpful in remedying this.
Remedies
- Build for a 64 bit target (by removing the configure options forcing a 32 bit build), or
- Install a 32 bit compiler toolchain
The problem seems to be happening in a header file called «confdefs.h»
confdefs.h is produced by the configure script for use in its tests. It is not your problem.
and the config.log file says that the program failed.
More specifically, it tells you exactly what command was run, and it echos the error messages that were produced and the exit status. Specifically, the command was
/usr/local/hdf-4.2.12-linux-centos7-x86_64/bin/h4cc conftest.c >&5
That’s attempting to use the compiler you designated by setting the CC
environment variable when you ran configure
, which it earlier identified as GCC based on the output when run with the --version
option.
And these errors were emitted in the failing compilation:
gcc: error: /mnt/scr1/pre-release/hdf4/v4.2.12/thg-builds/moohan-stati/lib/libmfhdf.a: No such file or directory
gcc: error: /mnt/scr1/pre-release/hdf4/v4.2.12/thg-builds/moohan-static/lib/libdf.a: No such file or directory
Those seem to be emitted every time the designated compiler is run. They are worrisome in part because diagnostics marked as errors are always worrisome, but also specifically because they suggest that the HDF4 package in which the h4cc
script resides is probably incorrectly installed or incorrectly configured.
Moreover, the compiler script exited with exit status 1 (not 0) and, apparently, did not produce a compiled output file. Other outputs suggest that although it is probably a wrapper around gcc
, it has its own set of options that it honors exclusively, rejecting all others, so that it is not a viable general-purpose subtitute for gcc
.
I’m uncertain why you are trying to substitute the h4cc
script for the system’s default compiler, and the most obvious thing to try would be to not do so. If you run the configure script without defining the CC
environment variable, or defining it as the path to the bare gcc
binary, then the configure script should be a lot happier.
Also consult the installation instructions for the package you are trying to build. They very likely have instructions for how to point it to your HDF installation, which is likely one of the intended purposes of h4cc. Any other purposes, such as providing installation-specific compile options, should be subsumed by the build system of the package you are trying to build.
used
./configure DFLAGS="-03"
and this is the 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
my system is ubuntu 14.04 and the system details say the os is 32 bit.
any help would be great as the compiler fails on anytime I try to use it, not just with this install.
config.log output:
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
muru
189k52 gold badges460 silver badges711 bronze badges
asked Jul 12, 2015 at 16:37
10
My guess would be that you have the basic C compiler installed, but not the headers for the standard library. Try:
sudo apt install libc6-dev
[Edit: this produces similar symptoms, but wasn’t the case here. The CFLAGS answers appear to be correct.]
answered Jul 12, 2015 at 17:19
Colin WatsonColin Watson
6,1351 gold badge17 silver badges27 bronze badges
4
From the config.log
:
configure:3478: gcc -03 conftest.c >&5
gcc: error: unrecognized command line option '-03'
The option is -O3
with the letter O
, not the number 0
(zero). So, you should run, as given in the README:
./configure CFLAGS="-O3"
answered Jul 12, 2015 at 18:52
murumuru
189k52 gold badges460 silver badges711 bronze badges
Looks like your CFLAGS has a zero instead of capital O.
That is invalid, and causing the compilation to fail. You can fix it, but really, look for a later version of the package which has been fixed.
answered Jul 12, 2015 at 18:35
ubfan1ubfan1
16.4k4 gold badges35 silver badges45 bronze badges
1
I was having this exact same problem trying to install tivodecode on a base build of Linux Mint 17.3. I tried the:
./configure DFLAGS="-O3"
command but with no effect. So I tried:
sudo apt install libc6-dev
to install the latest C headers. I tried the ./configure
command again with no variables and all went well. The make
and make install
commands also completed successfully. My recommendation is to make sure the latest C headers are installed and then run your ./configure
command.
answered Mar 13, 2016 at 7:07
JohnHJohnH
411 bronze badge
1
You can try to install build-essential
sudo apt-get install build-essential
answered Jun 13, 2021 at 12:52
Модератор: Модераторы разделов
-
Pentium02
- Сообщения: 136
- ОС: Debian lenny
- Контактная информация:
Решено: C compiler cannot create executables
checking for C compiler default output file name… configure: error: C compiler cannot create executables
Ось Ubuntu 7.04
Вот такая ошибка вылазит при попытке что либо сконфигурировать, например apache
Код:
root@pentium02-desktop:/usr/src/httpd-2.2.4# ./configure
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-pc-linux-gnulibc1
Configuring Apache Portable Runtime library ...
checking for APR... reconfig
configuring package in srclib/apr now
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-pc-linux-gnulibc1
Configuring APR library
Platform: i686-pc-linux-gnulibc1
checking for working mkdir -p... yes
APR Version:
checking for chosen layout... apr
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
configure failed for srclib/apr
- Вложения
-
config.log
- (7.53 КБ) 80 скачиваний
Hear this voice from deep inside
It’s a call of your heart
Close your eyes and yo will find
Passage out of the dark
-
Pentium02
- Сообщения: 136
- ОС: Debian lenny
- Контактная информация:
Re: Решено: C compiler cannot create executables
Сообщение
Pentium02 » 03.06.2007 01:54
На си я не пишу, и хелло ворлда не могу написать, но всё что я пробовал компилить, не компилилось вобще нечего. В fstab к разделу noexec не написано
То что я это всё делаю по ssh под рутом роли не играет?
Hear this voice from deep inside
It’s a call of your heart
Close your eyes and yo will find
Passage out of the dark
-
Uncle_Theodore
- Сообщения: 3339
- ОС: Slackware 12.2, ArchLinux 64
Re: Решено: C compiler cannot create executables
Сообщение
Uncle_Theodore » 03.06.2007 02:06
Pentium02 писал(а): ↑
03.06.2007 01:54
На си я не пишу, и хелло ворлда не могу написать, но всё что я пробовал компилить, не компилилось вобще нечего. В fstab к разделу noexec не написано
Прогони вот эти команды
Код: Выделить всё
echo "#include<stdio.h>" > proba.c
echo "int main() {printf("Hello Worldn");}" >> proba.c
gcc proba.c
./a.out
Просто скопируй с экрана. Какие результаты?
То что я это всё делаю по ssh под рутом роли не играет?
Пока не знаю, может, и играет…
-
Pentium02
- Сообщения: 136
- ОС: Debian lenny
- Контактная информация:
Re: Решено: C compiler cannot create executables
Сообщение
Pentium02 » 03.06.2007 02:10
Код: Выделить всё
root@pentium02-desktop:/# echo "#include<stdio.h>" > proba.c
root@pentium02-desktop:/# echo "int main() {printf("Hello Worldn");}" >> proba.c
root@pentium02-desktop:/# gcc proba.c
proba.c:1:19: error: stdio.h: No such file or directory
proba.c: В функции ‘main’
proba.c:2: предупреждение: incompatible implicit declaration of built-in function ‘printf’
root@pentium02-desktop:/# ./a.out
-bash: ./a.out: No such file or directory
root@pentium02-desktop:/#
Hear this voice from deep inside
It’s a call of your heart
Close your eyes and yo will find
Passage out of the dark
-
Minton
- Сообщения: 1588
- Статус: openSUSE Localization Team
- ОС: openSUSE Tumbleweed x86-64
Re: Решено: C compiler cannot create executables
Сообщение
Minton » 03.06.2007 02:27
Сборка исходников под Убунтой — это весьма забавный процесс Поставь пакет automake и все его зависимости как минимум. Может быть, ещё что-то по шаблону *make* и *gcc* придётся поставить, но это уже потом посмотреть надо…
Пытался собрать пакет pekwm, но в процессе сборки выдаёт
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking for C++ compiler default output file name...
configure: error: in `/usr/src/RPM/BUILD/pekwm-0.1.12':
configure: error: C++ compiler cannot create executables
See `config.log' for more details.
error: Bad exit status from /usr/src/tmp/rpm-tmp.31609 (%build)
Поставил в hasher пакеты gcc cpp rpm-utils — результат тот же.
Подскажите, пожалуйста, кто-нибудь что ему нужно!!!
« Последнее редактирование: 08.02.2011 02:07:20 от gBopHuk »
Записан
Пытался собрать пакет pekwm, но в процессе сборки выдаёт
checking for g++... no
checking for c++... no
<..>
configure: error: C++ compiler cannot create executables
See `config.log' for more details.
error: Bad exit status from /usr/src/tmp/rpm-tmp.31609 (%build)
Поставил в hasher пакеты gcc cpp rpm-utils — результат тот же.
Подскажите, пожалуйста, кто-нибудь что ему нужно!!!
gcc-c++
Используйте apt-cache search , пожалуйста, преде чем писать сюда.
Записан
Не подходит ваш вариант. Результат тот же
Записан
lx001
g++ —version что говорит?
Записан
говорит что g++ command not found
а hsh-install ~/hasher gcc говорит что пакет уже installed
Записан
lx001
Типа хинт: gccX.Y и gccX.Y-c++ — разные пакеты. g++ находится в последнем.
Записан
hsh-install ~/hasher gcc4.4-c++
<13>Feb 5 16:16:43 rpmi: gcc-c++-common-1.4.14-alt1 installed
<13>Feb 5 16:16:43 rpmi: libstdc++4.4-4.4.1-alt3 installed
<13>Feb 5 16:16:45 rpmi: libstdc++4.4-devel-4.4.1-alt3 installed
<13>Feb 5 16:16:47 rpmi: gcc4.4-c++-4.4.1-alt3 installed
Записан
Во, каким-то чудом получилось:
.in]$ g++ --version
i586-alt-linux-g++ (GCC) 4.4.1 20090725 (ALT Linux 4.4.1-alt3)
Copyright (C) 2009 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
Но результат тот же
Потом если после неудачной сборки зайти снова в hsh-shell и ввести g++ —version,
hasher снова говорит command not found, если опять сделать hsh-install gcc4.4-c++,
то в hsh-shell снова появляется g++
Я опять ничего не понимаю
Записан
lx001
Почему не собрать для начала без hasher?
Записан
[cas@altair gnupg]$ hsh-install gcc4.4-c++
Сморите config.log на предмет ошибок. Нужно ещё что-то.
<13>Feb 5 16:52:48 rpmi: libstdc++4.4-devel-4.4.5-alt3 installed
<13>Feb 5 16:52:49 rpmi: cpp4.4-4.4.5-alt3 installed
<13>Feb 5 16:52:49 rpmi: gcc4.4-4.4.5-alt3 installed
<13>Feb 5 16:52:50 rpmi: gcc4.4-c++-4.4.5-alt3 installed
[cas@altair gnupg]$ hsh-shell
[builder@altair .in]$ rpm -qf $(which g++)
gcc-c++-common-1.4.14-alt1
Записан
Андрей Черепанов (cas@)
config.log пишет:
configure:2041: result: /bin/install -c
configure:2052: checking whether build environment is sane
configure:2095: result: yes
configure:2222: checking for a thread-safe mkdir -p
configure:2261: result: /bin/mkdir -p
configure:2274: checking for gawk
configure:2290: found /bin/gawk
configure:2301: result: gawk
configure:2312: checking whether make sets $(MAKE)
configure:2334: result: yes
configure:2433: checking for i586-alt-linux-g++
configure:2463: result: no
configure:2433: checking for i586-alt-linux-c++
configure:2463: result: no
configure:2433: checking for i586-alt-linux-gpp
configure:2463: result: no
configure:2433: checking for i586-alt-linux-aCC
configure:2463: result: no
configure:2433: checking for i586-alt-linux-CC
configure:2463: result: no
configure:2433: checking for i586-alt-linux-cxx
configure:2463: result: no
configure:2433: checking for i586-alt-linux-cc++
configure:2463: result: no
configure:2433: checking for i586-alt-linux-cl.exe
configure:2463: result: no
configure:2433: checking for i586-alt-linux-FCC
configure:2463: result: no
configure:2433: checking for i586-alt-linux-KCC
configure:2463: result: no
configure:2433: checking for i586-alt-linux-RCC
configure:2463: result: no
configure:2433: checking for i586-alt-linux-xlC_r
configure:2463: result: no
configure:2433: checking for i586-alt-linux-xlC
configure:2463: result: no
configure:2477: checking for g++
configure:2507: result: no
configure:2477: checking for c++
configure:2507: result: no
configure:2477: checking for gpp
configure:2507: result: no
configure:2477: checking for aCC
configure:2507: result: no
configure:2477: checking for CC
configure:2507: result: no
configure:2477: checking for cxx
configure:2507: result: no
configure:2477: checking for cc++
configure:2507: result: no
configure:2477: checking for cl.exe
configure:2507: result: no
configure:2477: checking for FCC
configure:2507: result: no
configure:2477: checking for KCC
configure:2507: result: no
configure:2477: checking for RCC
configure:2507: result: no
configure:2477: checking for xlC_r
configure:2507: result: no
configure:2477: checking for xlC
configure:2507: result: no
configure:2531: checking for C++ compiler version
configure:2539: g++ --version >&5
./configure: line 2541: g++: command not found
configure:2543: $? = 127
configure:2550: g++ -v >&5
./configure: line 2552: g++: command not found
configure:2554: $? = 127
configure:2561: g++ -V >&5
./configure: line 2563: g++: command not found
configure:2565: $? = 127
configure:2588: checking for C++ compiler default output file name
configure:2610: g++ -pipe -Wall -O2 -march=i586 -mtune=i686 conftest.cpp >&5
./configure: line 2612: g++: command not found
configure:2614: $? = 127
configure:2652: result:
configure: failed program was:
Записан
lx001
Нет у вас ни одного компилятора c++ из проверявшихся: g++, c++, etc.
Записан
Это я тоже понял. А как сделать чтобы появились? Hasher пишет что есть у него такие пакеты , однако собирать не хочет.
Записан
lx001
После hsh-install gcc4.4-c++ зайдите в hsh-shell и проверьте, что говорит g++ —version
P.S. На кой вам hasher, если пакет не будет распространяться? Соберите как обычно: ./configure —prefix=/usr/local && make install
Записан
lx001
...
[cas@altair gnupg]$ hsh-shell
[builder@altair .in]$ rpm -qf $(which g++)
gcc-c++-common-1.4.14-alt1
which g++ недостаточно. gcc-c++-common может стоять без gcc4.4-c++. При этом which g++ вернет /usr/bin/g++, который указывает на gcc_wrapper, но самого компилятора c++ нет.
Записан