Why do I get "configure:error: no acceptable C compiler found in $PATH" when installing GCC on my Apache server? - apache

I'm attempting to install GCC 4.5.1 on my Apache server, but it says there is no acceptable C compiler found in $PATH. Any suggestions on what to do would be greatly appreciated.
When I use echo $PATH it prints:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/:/var/lib/:/usr/share/
These are the commands I used to configure GCC:
sudo mkdir /usr/bin/gcc/
cd /usr/bin/gcc/
sudo /gcc-4.5.1/configure
These are the results of those commands:
checking build system type...
x86_64-unknown-linux-gnu checking
host system type...
x86_64-unknown-linux-gnu checking
target system type...
x86_64-unknown-linux-gnu checking
for a BSD-compatible install...
/usr/bin/install -c checking
whether ln works... yes checking
whether ln -s works... yes
checking for a sed that does not
truncate output... /bin/sed
checking for gawk... no checking
for mawk... mawk checking for
gcc... no checking for cc...
no checking for cl.exe... no
configure: error: in
'/usr/bin/gcc:'` configure: error:
no acceptable C compiler found in
$PATH See 'config.log' for more
details.
The file config.log contains:
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.64.
Invocation command line was
$ /gcc-4.5.1/configure
---------
Platform.
---------
hostname = wordpress-juicesite uname
-m = x86_64 uname -r = 2.6.31-302-rs uname -s = Linux uname -v = #7 SMP Thu
Oct 29 22:57:03 UTC 2009
/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/X11R6/bin
-----------
Core tests.
-----------
configure:2429: checking build system
type configure:2443: result:
x86_64-unknown-linux-gnu
configure:2490: checking host system
type configure:2503: result:
x86_64-unknown-linux-gnu
configure:2523: checking target system
type configure:2536: result:
x86_64-unknown-linux-gnu
configure:2590: checking for a
BSD-compatible install configure:2658:
result: /usr/bin/install -c
configure:2669: checking whether ln
works configure:2691: result: yes
configure:2695: checking whether ln -s
works configure:2699: result: yes
configure:2706: checking for a sed
that does not truncate output
configure:2770: result: /bin/sed
configure:2779: checking for gawk
configure:2809: result: no
configure:2779: checking for mawk
configure:2795: found /usr/bin/mawk
configure:2806: result: mawk
configure:4039: checking for gcc
configure:4069: result: no
configure:4132: checking for cc
configure:4179: result: no
configure:4235: checking for cl.exe
configure:4265: result: no
configure:4289: error: in
/usr/bin/gcc': configure:4292: error:
no acceptable C compiler found in
$PATH Seeconfig.log' for more
details.
----------------
Cache variables.
----------------
ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_env_AR_FOR_TARGET_set=
ac_cv_env_AR_FOR_TARGET_value=
ac_cv_env_AR_set= ac_cv_env_AR_value=
ac_cv_env_AS_FOR_TARGET_set=
ac_cv_env_AS_FOR_TARGET_value=
ac_cv_env_AS_set= ac_cv_env_AS_value=
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_FOR_TARGET_set=
ac_cv_env_CC_FOR_TARGET_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_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_FOR_TARGET_set=
ac_cv_env_CXX_FOR_TARGET_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_DLLTOOL_FOR_TARGET_set=
ac_cv_env_DLLTOOL_FOR_TARGET_value=
ac_cv_env_DLLTOOL_set=
ac_cv_env_DLLTOOL_value=
ac_cv_env_GCC_FOR_TARGET_set=
ac_cv_env_GCC_FOR_TARGET_value=
ac_cv_env_GCJ_FOR_TARGET_set=
ac_cv_env_GCJ_FOR_TARGET_value=
ac_cv_env_GFORTRAN_FOR_TARGET_set=
ac_cv_env_GFORTRAN_FOR_TARGET_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LD_FOR_TARGET_set=
ac_cv_env_LD_FOR_TARGET_value=
ac_cv_env_LD_set= ac_cv_env_LD_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LIPO_FOR_TARGET_set=
ac_cv_env_LIPO_FOR_TARGET_value=
ac_cv_env_LIPO_set=
ac_cv_env_LIPO_value=
ac_cv_env_NM_FOR_TARGET_set=
ac_cv_env_NM_FOR_TARGET_value=
ac_cv_env_NM_set= ac_cv_env_NM_value=
ac_cv_env_OBJCOPY_set=
ac_cv_env_OBJCOPY_value=
ac_cv_env_OBJDUMP_FOR_TARGET_set=
ac_cv_env_OBJDUMP_FOR_TARGET_value=
ac_cv_env_OBJDUMP_set=
ac_cv_env_OBJDUMP_value=
ac_cv_env_RANLIB_FOR_TARGET_set=
ac_cv_env_RANLIB_FOR_TARGET_value=
ac_cv_env_RANLIB_set=
ac_cv_env_RANLIB_value=
ac_cv_env_STRIP_FOR_TARGET_set=
ac_cv_env_STRIP_FOR_TARGET_value=
ac_cv_env_STRIP_set=
ac_cv_env_STRIP_value=
ac_cv_env_WINDMC_FOR_TARGET_set=
ac_cv_env_WINDMC_FOR_TARGET_value=
ac_cv_env_WINDMC_set=
ac_cv_env_WINDMC_value=
ac_cv_env_WINDRES_FOR_TARGET_set=
ac_cv_env_WINDRES_FOR_TARGET_value=
ac_cv_env_WINDRES_set=
ac_cv_env_WINDRES_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_path_SED=/bin/sed
ac_cv_path_install='/usr/bin/install
-c' ac_cv_prog_AWK=mawk ac_cv_target=x86_64-unknown-linux-gnu
acx_cv_prog_LN=ln
-----------------
Output variables.
-----------------
AR='' AR_FOR_BUILD='$(AR)'
AR_FOR_TARGET='' AS=''
AS_FOR_BUILD='$(AS)' AS_FOR_TARGET=''
AWK='mawk' BISON='' BUILD_CONFIG=''
CC='' CC_FOR_BUILD='$(CC)'
CC_FOR_TARGET='' CFLAGS=''
CFLAGS_FOR_BUILD=''
CFLAGS_FOR_TARGET=''
COMPILER_AS_FOR_TARGET=''
COMPILER_LD_FOR_TARGET=''
COMPILER_NM_FOR_TARGET=''
CONFIGURE_GDB_TK='' CPP='' CPPFLAGS=''
CXX='' CXXFLAGS=''
CXXFLAGS_FOR_BUILD=''
CXXFLAGS_FOR_TARGET=''
CXX_FOR_BUILD='$(CXX)'
CXX_FOR_TARGET=''
DEBUG_PREFIX_CFLAGS_FOR_TARGET=''
DEFS='' DLLTOOL=''
DLLTOOL_FOR_BUILD='$(DLLTOOL)'
DLLTOOL_FOR_TARGET='' ECHO_C=''
ECHO_N='-n' ECHO_T='' EGREP=''
EXEEXT='' EXPECT=''
FLAGS_FOR_TARGET='' FLEX=''
GCC_FOR_TARGET='' GCC_SHLIB_SUBDIR=''
GCJ_FOR_BUILD='$(GCJ)'
GCJ_FOR_TARGET='' GDB_TK=''
GFORTRAN_FOR_BUILD='$(GFORTRAN)'
GFORTRAN_FOR_TARGET='' GNATBIND=''
GNATMAKE='' GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_GDB_TK=''
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}' LD=''
LDFLAGS='' LDFLAGS_FOR_BUILD=''
LD_FOR_BUILD='$(LD)' LD_FOR_TARGET=''
LEX='' LIBOBJS='' LIBS='' LIPO=''
LIPO_FOR_TARGET='' LN='ln' LN_S='ln
-s' LTLIBOBJS='' M4='' MAINT='' MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='' MAKEINFO=''
NM='' NM_FOR_BUILD='$(NM)'
NM_FOR_TARGET='' OBJCOPY='' OBJDUMP=''
OBJDUMP_FOR_TARGET='' OBJEXT=''
PACKAGE_BUGREPORT='' PACKAGE_NAME=''
PACKAGE_STRING='' PACKAGE_TARNAME=''
PACKAGE_URL='' PACKAGE_VERSION=''
PATH_SEPARATOR=':' RANLIB=''
RANLIB_FOR_BUILD='$(RANLIB)'
RANLIB_FOR_TARGET=''
RAW_CXX_FOR_TARGET='' RPATH_ENVVAR=''
RUNTEST='' SED='/bin/sed'
SHELL='/bin/bash' STRIP=''
STRIP_FOR_TARGET=''
SYSROOT_CFLAGS_FOR_TARGET=''
TOPLEVEL_CONFIGURE_ARGUMENTS='/gcc-4.5.1/configure'
WINDMC='' WINDMC_FOR_BUILD='$(WINDMC)'
WINDMC_FOR_TARGET='' WINDRES=''
WINDRES_FOR_BUILD='$(WINDRES)'
WINDRES_FOR_TARGET='' YACC=''
ac_ct_CC='' ac_ct_CXX=''
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias='' build_configargs=''
build_configdirs='build-libiberty
build-texinfo build-byacc build-flex
build-bison build-m4
build-fixincludes' build_cpu='x86_64'
build_libsubdir='build-x86_64-unknown-linux-gnu'
build_noncanonical='x86_64-unknown-linux-gnu'
build_os='linux-gnu'
build_subdir='build-x86_64-unknown-linux-gnu'
build_tooldir=''
build_vendor='unknown' clooginc=''
clooglibs='' compare_exclusions=''
config_shell='/bin/bash'
configdirs='intl mmalloc libiberty
opcodes bfd readline tcl tk itcl
libgui zlib libcpp libdecnumber gmp
mpfr mpc ppl cloog libelf libiconv
texinfo byacc flex bison binutils gas
ld fixincludes gcc cgen sid sim gdb
make patch prms send-pr gprof etc
expect dejagnu ash bash bzip2 m4
autoconf automake libtool diff rcs
fileutils shellutils time textutils
wdiff find uudecode hello tar gzip
indent recode release sed utils guile
perl gawk findutils gettext zip
fastjar gnattools'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
do_compare=''
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}' exec_prefix='NONE'
extra_host_libiberty_configure_flags=''
extra_mpc_gmp_configure_flags=''
extra_mpc_mpfr_configure_flags=''
extra_mpfr_configure_flags=''
gmpinc='' gmplibs=''
host='x86_64-unknown-linux-gnu'
host_alias='' host_configargs=''
host_cpu='x86_64'
host_noncanonical='x86_64-unknown-linux-gnu'
host_os='linux-gnu' host_subdir='.'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libelfinc='' libelflibs=''
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
poststage1_ldflags=''
poststage1_libs='' pplinc=''
ppllibs='' prefix='NONE'
program_transform_name='s,y,y,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
stage1_cflags='' stage1_checking=''
stage1_languages='' stage1_ldflags=''
stage1_libs='' stage2_werror_flag=''
sysconfdir='${prefix}/etc'
target='x86_64-unknown-linux-gnu'
target_alias='' target_configargs=''
target_configdirs='target-libgcc
target-libiberty target-libgloss
target-newlib target-libgomp
target-libstdc++-v3 target-libmudflap
target-libssp target-libgfortran
target-boehm-gc target-libffi
target-zlib target-qthreads
target-libjava target-libobjc
target-libada target-examples
target-groff target-gperf target-rda'
target_cpu='x86_64'
target_noncanonical='x86_64-unknown-linux-gnu'
target_os='linux-gnu'
target_subdir='x86_64-unknown-linux-gnu'
target_vendor='unknown' tooldir=''
-------------------
File substitutions.
-------------------
alphaieee_frag=''
host_makefile_frag='/dev/null'
ospace_frag=''
serialization_dependencies=''
target_makefile_frag=''
-----------
confdefs.h.
-----------
/* confdefs.h */
define PACKAGE_NAME ""
define PACKAGE_TARNAME ""
define PACKAGE_VERSION ""
define PACKAGE_STRING ""
define PACKAGE_BUGREPORT ""
define PACKAGE_URL ""
configure: exit 1

Are you trying to build gcc from source ? Then you need a compiler to compile it.. (that's a Catch 22...).
Can't you install a binary package with the compiler already compiled ?

Related

configure: error: cannot run C compiled programs while installing HPCToolkit with Spack

I was tring installing HPCToolkit following this tutorial:
http://hpctoolkit.org/software-instructions.html#Prerequisites
and, after entering "Spack install hpctoolkit" I got some error messages
2 errors found in build log:
10 checking whether make supports nested variables... yes
11 checking whether make sets $(MAKE)... (cached) yes
12 checking for x86_64-conda-linux-gnu-gcc... /home/ncaa/spack/lib/spack/env/gcc/gcc
13 checking whether the C compiler works... yes
14 checking for C compiler default output file name... a.out
15 checking for suffix of executables...
>> 16 checking whether we are cross compiling... configure: error: in `/tmp/ncaa/spack-stage/spack-stage-libiconv-1.16-e7emipnlb4kfxggwdzwb7fgpbu5hpupy/spack-src':
>> 17 configure: error: cannot run C compiled programs.
18 If you meant to cross compile, use `--host'.
19 See `config.log' for more details
See build log for details:
/tmp/ncaa/spack-stage/spack-stage-libiconv-1.16-e7emipnlb4kfxggwdzwb7fgpbu5hpupy/spack-build-out.txt
spack-build-out.txt:
==> libiconv: Executing phase: 'autoreconf'
==> libiconv: Executing phase: 'configure'
==> [2021-03-13-20:45:16.501013] Copying ./build-aux/config.guess to libcharset/build-aux/config.guess
==> [2021-03-13-20:45:16.510159] '/tmp/ncaa/spack-stage/spack-stage-libiconv-1.16-e7emipnlb4kfxggwdzwb7fgpbu5hpupy/spack-src/configure' '--prefix=/home/ncaa/spack/opt/spack/linux-centos7-x86_64/gcc-8.4.0/libiconv-1.16-e7emipnlb4kfxggwdzwb7fgpbu5hpupy' '--enable-extra-encodings'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make sets $(MAKE)... (cached) yes
checking for x86_64-conda-linux-gnu-gcc... /home/ncaa/spack/lib/spack/env/gcc/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/tmp/ncaa/spack-stage/spack-stage-libiconv-1.16-e7emipnlb4kfxggwdzwb7fgpbu5hpupy/spack-src':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
config.log (on OneDrive):https://1drv.ms/u/s!Ah8JdDB38REth3K7XSgq6TZQ46eV?e=4z2bQI
my platform and user environment
(env0) [ncaa#localhost ~]$ uname -a
Linux localhost.localdomain 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
(env0) [ncaa#localhost ~]$ cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)
(env0) [ncaa#localhost ~]$ gcc --version
gcc (crosstool-NG 1.24.0.133_b0863d8_dirty) 8.4.0
Copyright (C) 2018 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.
(env0) [ncaa#localhost ~]$ rpm -qa | grep glibc
glibc-2.17-157.el7_3.2.i686
compat-glibc-headers-2.12-4.el7.centos.x86_64
glibc-common-2.17-157.el7_3.2.x86_64
glibc-devel-2.17-157.el7_3.2.i686
compat-glibc-2.12-4.el7.centos.x86_64
glibc-2.17-157.el7_3.2.x86_64
glibc-devel-2.17-157.el7_3.2.x86_64
glibc-headers-2.17-157.el7_3.2.x86_64
(env0) [ncaa#localhost ~]$ spack config get compilers
compilers:
- compiler:
spec: gcc#8.4.0
paths:
cc: /home/ncaa/anaconda3/envs/env0/bin/gcc
cxx: /home/ncaa/anaconda3/envs/env0/bin/g++
f77:
fc:
flags: {}
operating_system: centos7
target: x86_64
modules: []
environment: {}
extra_rpaths: []
config.yaml (on OneDrive):https://1drv.ms/u/s!Ah8JdDB38REth3P-jV-PP9P-bSjS?e=6ucN9e
packages.yaml (on OneDrive):https://1drv.ms/u/s!Ah8JdDB38REth3RTTTJGckufGQVT?e=fFs2YH
running "spack install xz" gives:
(env0) [ncaa#localhost ~]$ spack install xz
==> Installing xz-5.2.5-ilny777kxpjghq6abvl7hv5skt5sxo3k
==> No binary for xz-5.2.5-ilny777kxpjghq6abvl7hv5skt5sxo3k found: installing from source
==> Using cached archive: /home/ncaa/spack/var/spack/cache/_source-cache/archive/51/5117f930900b341493827d63aa910ff5e011e0b994197c3b71c08a20228a42df.tar.bz2
==> No patches needed for xz
==> xz: Executing phase: 'autoreconf'
==> xz: Executing phase: 'configure'
==> Error: ProcessError: Command exited with status 1:
'/tmp/ncaa/spack-stage/spack-stage-xz-5.2.5-ilny777kxpjghq6abvl7hv5skt5sxo3k/spack-src/configure' '--prefix=/home/ncaa/spack/opt/spack/linux-centos7-x86_64/gcc-8.4.0/xz-5.2.5-ilny777kxpjghq6abvl7hv5skt5sxo3k'
2 errors found in build log:
34 checking whether ln -s works... yes
35 checking whether make supports the include directive... yes (GNU style)
36 checking for x86_64-conda-linux-gnu-gcc... /home/ncaa/spack/lib/spack/env/gcc/gcc
37 checking whether the C compiler works... yes
38 checking for C compiler default output file name... a.out
39 checking for suffix of executables...
>> 40 checking whether we are cross compiling... configure: error: in `/tmp/ncaa/spack-stage/spack-stage-xz-5.2.5-ilny777kxpjghq6abvl7hv5skt5sxo3k/spack-src':
>> 41 configure: error: cannot run C compiled programs.
42 If you meant to cross compile, use `--host'.
43 See `config.log' for more details
See build log for details:
/tmp/ncaa/spack-stage/spack-stage-xz-5.2.5-ilny777kxpjghq6abvl7hv5skt5sxo3k/spack-build-out.txt
It seems the problem has something to do with cross compiling check
switching gcc version to 7.3.0 fixed this problem. The cross compiling check get result "no" now.

Phalcon installation issue on PHP 5.6

I struggling install Phalcon for 2 days but still fail. my server has lasted Direct Admin installed.
below is my installation command
cd /root/cphalcon/ext && /usr/local/php56/bin/phpize --clean && /usr/local/php56/bin/phpize && ./configure --enable-phalcon --with-php-config=/usr/local/php56/bin/php-config56 && make
which generate error in config.log as below
please suggest how to fix this
Thank so much in advanced.
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 configure, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ ./configure --enable-phalcon
## --------- ##
## Platform. ##
## --------- ##
hostname = hidden
uname -m = x86_64
uname -r = 2.6.32-504.23.4.el6.x86_64
uname -s = Linux
uname -v = #1 SMP Tue Jun 9 20:57:37 UTC 2015
/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/local/sbin
PATH: /usr/local/bin
PATH: /sbin
PATH: /bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /root/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1984: checking for grep that handles long lines and -e
configure:2044: result: /bin/grep
configure:2049: checking for egrep
configure:2113: result: /bin/grep -E
configure:2118: checking for a sed that does not truncate output
configure:2184: result: /bin/sed
configure:2318: checking for cc
configure:2334: found /usr/bin/cc
configure:2345: result: cc
configure:2379: checking for C compiler version
configure:2387: cc --version >&5
cc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)
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:2391: $? = 0
configure:2398: cc -v >&5
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-11) (GCC)
configure:2402: $? = 0
configure:2409: cc -V >&5
cc: '-V' option must have argument
configure:2413: $? = 1
configure:2436: checking for C compiler default output file name
configure:2458: cc -O2 --fvisibility=hidden conftest.c >&5
cc1: error: unrecognized command line option "-ffvisibility=hidden"
configure:2462: $? = 1
configure:2500: result:
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2506: error: in `/root/cphalcon/build/64bits':
configure:2509: error: C compiler cannot create executables
See `config.log' for more details.

Problems with the compilation and installation of the Apache HTTP Server on Unix

When I try "Configuring the source tree" in the link below:
http://httpd.apache.org/docs/current/install.html#upgrading
I get the following error and can't see the problem any ideas?
Thanks
$ sudo CC="pgcc" CFLAGS="-O2" \
./configure --prefix=/sw/pkg/apache \
--enable-ldap=shared \
--enable-lua=shared
[sudo] password for dosullivan:
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
configure:
configure: Configuring Apache Portable Runtime library...
configure:
checking for APR... yes
setting CPP to "x86_64-linux-gnu-gcc -E"
adding "-pthread" to CFLAGS
setting CPPFLAGS to " -D_REENTRANT -D_GNU_SOURCE"
setting LDFLAGS to " "
configure:
configure: Configuring Apache Portable Runtime Utility library...
configure:
checking for APR-util... yes
checking for gcc... pgcc
checking whether the C compiler works... no
configure: error: in /home/dosullivan/httpd-2.4.4':
configure: error: C compiler cannot create executables
Seeconfig.log' for more details
It appears that 'pgcc' is not the name of your compiler. Are you sure you didn't mean to use 'gcc'?
Basically, the configure command is trying to produce a 'hello world' style program just to make sure that it has access to a working compiler.

Using Heroku Vulcan to build lib with dependency

Mission: Make a build of ffmpegthumbnailer that can be vendored with a Rails app and deployed to Heroku's Cedar stack.
Process so far:
[success] Build ffmpeg with Vulcan (using this guide) and upload to S3
[failed] Build ffmpegthumbnailer with ffmpeg as dependency.
Using command:
$ vulcan build -v -s ffmpegthumbnailer-2.0.8 -d http://s3.amazonaws.com/remoting-io-cdn/heroku-building-lib/ffmpeg
I get the following (see error at the bottom):
Packaging local directory... done
Uploading source package... done
Building with: ./configure --prefix /app/vendor/ffmpegthumbnailer-2.0 && make install
downloading http://s3.amazonaws.com/remoting-io-cdn/heroku-building-lib/ffmpeg
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... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver #FILE support... #
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking whether make supports nested variables... yes
checking for ANSI C header files... (cached) yes
checking for inttypes.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking whether /usr/bin/ld -m elf_x86_64 accepts --as-needed... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for FFMPEG... no
configure: error: Package requirements (libavutil libavformat libavcodec >= 52.26.0 libswscale) were not met:
No package 'libavutil' found
No package 'libavformat' found
No package 'libavcodec' found
No package 'libswscale' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables FFMPEG_CFLAGS
and FFMPEG_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
bin/vulcan-make:69:in `chdir': No such file or directory - /app/vendor/ffmpegthumbnailer-2.0 (Errno::ENOENT)
from bin/vulcan-make:69:in `block (2 levels) in <main>'
from bin/vulcan-make:18:in `chdir'
from bin/vulcan-make:18:in `block in <main>'
from /usr/local/lib/ruby/1.9.1/tmpdir.rb:83:in `mktmpdir'
from bin/vulcan-make:17:in `<main>'
>> Downloading build artifacts to: /tmp/ffmpegthumbnailer-2.0.tgz
(available at http://remoting-io-lib-builder.herokuapp.com/output/e25f3591-ce65-433d-a45a-15bd7ea36109)
What does that error message mean? And what should I do differently to compile it correctly?
You have a few problems
You need to build it's dependencies first (libavutil, libavformat, libavcodec, libswscale)
The thing that you downloaded is not actually the build (the build never happened it failed at configure) It is just the artifacts from the progress that was made.
I have had much more success with hammer (https://github.com/hone/hammer) then vulcan in terms of reusability.
To solve this you are going to need to go through this same process for each of the dependancies then in your build script pull them down from s3 extract them and make sure that they are in your path or lib directory.
I have also found that heroku run bash is invaluable when hacking on these things because it allows you to tinker with your environment more.
ffmpeg and ffmpegthumbnailer can be build with Vulcan following the steps explained here
A sample app with vendored ffmpeg and ffmpegthumbnailer is available here: https://github.com/JonasNielsen/ffmpegthumbnailer Check out the Heroku configuration instructions in the readme.

configure gcc in RHEL5 - no acceptable C compiler found in $PATH

I want to install Apache in RHEL5. While configuring httpd-2.4.2 following error came:
configure: error: no acceptable C compiler found in $PATH
So I downloaded gcc-4.7.0 and tried configuring it. Still the same error is coming.
$ ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for libitm support... yes
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/httproot/gcc-4.7.0':
configure: error: no acceptable C compiler found in $PATH
Following are some of the status results:
gcc --version
bash: gcc: command not found
rpm -qi gcc
package gcc is not installed
which gcc
/usr/bin/which: no gcc in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/bin:/bin)
whereis gcc
gcc: /usr/libexec/gcc
I can't use yum. So please help in resolving this issue.
I could not found any packages from the below URL
http://rpmfind.net//linux/RPM/centos/5.8/x86_64/CentOS/
Finally found the solution :
yum groupinstall "Development tools"
or
yum install gcc glibc glibc-common gd gd-devel
Thanks for all those helped me. I have succesfully make gcc work. I got rpm files for gcc and http://rpmfind.net//linux/RPM/centos/5.8/x86_64/CentOS/