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

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.

Related

Checking for freetype2 error when installing php5.6 on arch linux

I'm trying to install PHP version 5.6.37 from AUR using makepkg -i command, but when it reaches the moment to check for the "freetype2" it displays the error:
checking for freetype2... configure: error: freetype-config not found.
I already have 7.2 installed, but I need the 5.6 for an older project, and as in Ubuntu, I intend to have both installed.
makepkg -i
==> Making package: php56 5.6.37-1 (Wed 12 Sep 2018 12:27:39 PM +08)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found php-5.6.37.tar.xz
-> Found php-5.6.37.tar.xz.asc
-> Found php.ini.patch
-> Found apache.conf
-> Found php-fpm.conf.in.patch
-> Found logrotate.d.php-fpm
-> Found php-fpm.service
-> Found php-fpm.tmpfiles
-> Found use-enchant2.patch
-> Found php-freetype-2.9.1.patch
==> Validating source files with sha512sums...
[...]
checking whether to enable truetype string function in GD... yes
checking whether to enable JIS-mapped Japanese font support in GD... no
If configure fails try --with-vpx-dir=<DIR>
checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
checking for XpmFreeXpmImage in -lXpm... yes
checking for pkg-config... (cached) no
checking for freetype2... configure: error: freetype-config not found.
==> ERROR: A failure occurred in build().
Aborting...
Installing freetype2 with Pacman didn't solve it.
ln -s /usr/bin/pkg-config /usr/bin/freetype-config
and in PKGBUILD
--with-freetype-dir=no \

Installing SCIP on OSX: outdated libisl?

I'm trying to install SCIP on OSX mavericks. I've downloaded the tarball here, extracted it, and have tried to compile it using
make scipoptlib GMP=false ZLIB=false READLINE=false SHARED=true
This gives me error 1 below. My interpretation of error 1 is that /usr/local/lib/libisl.10.dylib does not exist. That's correct: I have isl.0.14.1, located at /usr/local/Cellar/isl/0.14.1. And in fact I can't install isl.0.10.1, because the compiler options it expects don't work with the current version of gcc (I think; see error 2 below).
Can I tell SCIP to use isl.0.14.1, and if so, how?
**error 1:**
** Extracting SoPlex archive "/Applications/scipoptsuite-3.2.0/soplex-2.2.0.tgz".
** Extracting ZIMPL archive "/Applications/scipoptsuite-3.2.0/zimpl-3.3.3.tgz".
** Extracting SCIP archive "/Applications/scipoptsuite-3.2.0/scip-3.2.0.tgz".
** compile libraries statically with compiler flag -fPIC
rm -rf obj/O.darwin.x86_64.gnu.normal.opt/* bin/zimpl-3.3.3.darwin.x86_64.gnu.normal.opt lib/libzimpl-3.3.3.darwin.x86_64.gnu.opt.a lib/libzimpl-3.3.3.darwin.x86_64.gnu.opt.dbl.a lib/libzimpl.darwin.x86_64.gnu.opt.a bin/zimpl.darwin.x86_64.gnu.opt bin/zimpl
** Creating directory "/Applications/scipoptsuite-3.2.0/scip-3.2.0/lib".
** Creating directory "/Applications/scipoptsuite-3.2.0/scip-3.2.0/lib/zimplinc".
** Building SoPlex library "/Applications/scipoptsuite-3.2.0/soplex-2.2.0/lib/libsoplex.darwin.x86_64.gnu.opt.a".
-> compiling obj/O.darwin.x86_64.gnu.opt/lib/changesoplex.o
dyld: Library not loaded: /usr/local/lib/libisl.10.dylib
Referenced from: /usr/local/Cellar/gcc/4.9.1/libexec/gcc/x86_64-apple-darwin13.2.0/4.9.1/cc1plus
Reason: image not found
g++: internal compiler error: Trace/BPT trap: 5 (program cc1plus)
make[4]: *** [obj/O.darwin.x86_64.gnu.opt/lib/changesoplex.o] Abort trap: 6
make[3]: [makelibfile] Error 2 (ignored)
-> compiling obj/O.darwin.x86_64.gnu.opt/lib/changesoplex.o
dyld: Library not loaded: /usr/local/lib/libisl.10.dylib
Referenced from: /usr/local/Cellar/gcc/4.9.1/libexec/gcc/x86_64-apple-darwin13.2.0/4.9.1/cc1plus
Reason: image not found
g++: internal compiler error: Trace/BPT trap: 5 (program cc1plus)
make[4]: *** [obj/O.darwin.x86_64.gnu.opt/lib/changesoplex.o] Abort trap: 6
make[3]: [all] Error 2 (ignored)
** ZIMPL support disabled.
** Creating necessary soft-links.
** Building SCIP libraries and executable.
-> generating necessary links
- Current settings: LPS=spx OSTYPE=darwin ARCH=x86_64 COMP=gnu SUFFIX= ZIMPL=false ZIMPLOPT=opt IPOPT=false IPOPTOPT=opt EXPRINT=cppad GAMS=false
* SCIP needs some softlinks to external programs, in particular, LP-solvers.
* Please insert the paths to the corresponding directories/libraries below.
* The links will be installed in the 'lib' directory.
* For more information and if you experience problems see the INSTALL file.
-> "spxinc" is the path to the SoPlex "src" directory, e.g., "../../soplex/src".
-> "libsoplex.*" is the path to the SoPlex library, e.g., "../../soplex/lib/libsoplex.darwin.x86_64.gnu.opt.a"
-> compiling obj/O.darwin.x86_64.gnu.opt/lib/scip/branch_allfullstrong.o
dyld: Library not loaded: /usr/local/lib/libisl.10.dylib
Referenced from: /usr/local/Cellar/gcc/4.9.1/libexec/gcc/x86_64-apple-darwin13.2.0/4.9.1/cc1
Reason: image not found
gcc: internal compiler error: Trace/BPT trap: 5 (program cc1)
make[4]: *** [obj/O.darwin.x86_64.gnu.opt/lib/scip/branch_allfullstrong.o] Abort trap: 6
make[3]: *** [makesciplibfile] Error 2
make[2]: *** [scipbinary] Error 2
make[1]: *** [scipbinary] Error 2
make: *** [scipoptlib] Error 2
error 2, produced by running ./configure in libisl.10 directory:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by isl configure 0.10, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ ./configure
## --------- ##
## Platform. ##
## --------- ##
hostname = dhcp-143-183.caltech.edu
uname -m = x86_64
uname -r = 13.4.0
uname -s = Darwin
uname -v = Darwin Kernel Version 13.4.0: Wed Mar 18 16:20:14 PDT 2015; root:xnu-2422.115.14~1/RELEASE_X86_64
/usr/bin/uname -p = i386
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = Mach kernel version:
Darwin Kernel Version 13.4.0: Wed Mar 18 16:20:14 PDT 2015; root:xnu-2422.115.14~1/RELEASE_X86_64
Kernel configured for up to 4 processors.
2 processors are physically available.
4 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1 2 3
Primary memory available: 16.00 gigabytes
Default processor set: 327 tasks, 1905 threads, 4 processors
Load average: 4.32, Mach factor: 0.47
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /Users/madeleine/anaconda/bin/
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/local/bin
PATH: /opt/X11/bin
PATH: /usr/local/go/bin
PATH: /usr/texbin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /Applications/spark-0.9.1-bin-hadoop2/bin
PATH: /Applications/Julia-0.3.8.app/Contents/Resources/julia/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2762: checking for a BSD-compatible install
configure:2830: result: /usr/bin/install -c
configure:2841: checking whether build environment is sane
configure:2891: result: yes
configure:3032: checking for a thread-safe mkdir -p
configure:3071: result: ./install-sh -c -d
configure:3084: checking for gawk
configure:3114: result: no
configure:3084: checking for mawk
configure:3114: result: no
configure:3084: checking for nawk
configure:3114: result: no
configure:3084: checking for awk
configure:3100: found /usr/bin/awk
configure:3111: result: awk
configure:3122: checking whether make sets $(MAKE)
configure:3144: result: yes
configure:3287: checking for gcc
configure:3303: found /usr/local/bin/gcc
configure:3314: result: gcc
configure:3543: checking for C compiler version
configure:3552: gcc --version >&5
gcc (Homebrew gcc 4.9.1) 4.9.1
Copyright (C) 2014 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:3563: $? = 0
configure:3552: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/4.9.1/libexec/gcc/x86_64-apple-darwin13.2.0/4.9.1/lto-wrapper
Target: x86_64-apple-darwin13.2.0
Configured with: ../configure --build=x86_64-apple-darwin13.2.0 --prefix=/usr/local/Cellar/gcc/4.9.1 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-4.9 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-cloog=/usr/local/opt/cloog --with-isl=/usr/local/opt/isl --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --with-pkgversion='Homebrew gcc 4.9.1' --with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin --disable-nls --enable-multilib
Thread model: posix
gcc version 4.9.1 (Homebrew gcc 4.9.1)
configure:3563: $? = 0
configure:3552: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3563: $? = 1
configure:3552: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3563: $? = 1
configure:3583: checking whether the C compiler works
configure:3605: gcc conftest.c >&5
dyld: Library not loaded: /usr/local/lib/libisl.10.dylib
Referenced from: /usr/local/Cellar/gcc/4.9.1/libexec/gcc/x86_64-apple-darwin13.2.0/4.9.1/cc1
Reason: image not found
gcc: internal compiler error: Trace/BPT trap: 5 (program cc1)
./configure: line 3607: 9063 Abort trap: 6 $CC $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5
I can't see where or why the SCIP Optimization Suite would be using isl. To be precise, in your case not SCIP fails to compile but SoPlex. Have you checked whether you can compile SoPlex alone? Just go into the subdirectory and type make or make SHARED=true GMP=false ZLIB=false to match the original command.
Have you compiled some other code with your compiler? It may also be that your gcc itself is broken.
I have the impression that the C++ compiler itself is broken:
dyld: Library not loaded: /usr/local/lib/libisl.10.dylib
Referenced from: /usr/local/Cellar/gcc/4.9.1/libexec/gcc/x86_64-apple-darwin13.2.0/4.9.1/cc1plus
Maybe try a simple (hello-world) C++ program first to test that the compiler itself is ok.

How to install Apache2::AuthCookie in Centos 6?

I am trying to install Apache2::AuthCookie on a CentOS 6 machine with the following command:
cpanm Apache2::AuthCookie
but I get the following error:
--> Working on Apache2::AuthCookie
Fetching http://www.cpan.org/authors/id/M/MS/MSCHOUT/Apache-AuthCookie-3.22.tar.gz ... OK
Configuring Apache-AuthCookie-3.22 ... OK
==> Found dependencies: autobox
--> Working on autobox
Fetching http://www.cpan.org/authors/id/C/CH/CHOCOLATE/autobox-2.82.tar.gz ... OK
Configuring autobox-2.82 ... OK
Building and testing autobox-2.82 ... FAIL
! Installing autobox failed. See /root/.cpanm/work/1415007741.22940/build.log for details. Retry with --force to force install it.
! Installing the dependencies failed: Module 'autobox' is not installed
! Bailing out the installation for Apache-AuthCookie-3.22.
Any ideas how to solve this problem?
build.log file
cpanm (App::cpanminus) 1.7014 on perl 5.010001 built for x86_64-linux-thread-multi
Work directory is /root/.cpanm/work/1415007741.22940
You have make /usr/bin/make
You have /usr/bin/wget
You have /bin/tar: tar (GNU tar) 1.23
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by John Gilmore and Jay Fenlason.
Searching Apache2::AuthCookie on cpanmetadb ...
--> Working on Apache2::AuthCookie
Fetching http://www.cpan.org/authors/id/M/MS/MSCHOUT/Apache-AuthCookie-3.22.tar.gz
-> OK
Unpacking Apache-AuthCookie-3.22.tar.gz
Entering Apache-AuthCookie-3.22
Checking configure dependencies from META.yml
Configuring Apache-AuthCookie-3.22
Running Makefile.PL
[ info] generating script t/TEST
Checking if your kit is complete...
Looks good
Warning: prerequisite autobox 1.1 not found.
Generating a Unix-style Makefile
Writing Makefile for Apache::AuthCookie
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have Test::More 0 ... Yes (1.001008)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.00)
Checking if you have Apache::Test 1.35 ... Yes (1.38)
Checking if you have Class::Load 0.03 ... Yes (0.22)
Checking if you have autobox 1.1 ... No
Checking if you have mod_perl2 1.999022 ... Yes (2.000004)
Checking if you have CGI 3.12 ... Yes (4.09)
==> Found dependencies: autobox
Searching autobox on cpanmetadb ...
--> Working on autobox
Fetching http://www.cpan.org/authors/id/C/CH/CHOCOLATE/autobox-2.82.tar.gz
-> OK
Unpacking autobox-2.82.tar.gz
Entering autobox-2.82
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.00)
Configuring autobox-2.82
Running Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for autobox
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have Scope::Guard 0.20 ... Yes (0.20)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.00)
Building and testing autobox-2.82
cp lib/autobox.pod blib/lib/autobox.pod
cp lib/autobox/universal.pm blib/lib/autobox/universal.pm
cp lib/autobox.pm blib/lib/autobox.pm
Running Mkbootstrap for autobox ()
chmod 644 "autobox.bs"
"/usr/bin/perl" "/usr/share/perl5/ExtUtils/xsubpp" -typemap "/usr/share/perl5/ExtUtils/typemap" autobox.xs > autobox.xsc && mv autobox.xsc autobox.c
gcc -c -I. -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -Wall -DVERSION=\"2.82\" -DXS_VERSION=\"2.82\" -fPIC "-I/usr/lib64/perl5/CORE" autobox.c
/bin/sh: gcc: command not found
make: *** [autobox.o] Error 127
-> FAIL Installing autobox failed. See /root/.cpanm/work/1415007741.22940/build.log for details. Retry with --force to force install it.
-> FAIL Installing the dependencies failed: Module 'autobox' is not installed
-> FAIL Bailing out the installation for Apache-AuthCookie-3.22.
After looking inside the log files I found out that I a compiler was missing.
yum install gcc-c++

Compiling GDC on Windows -- where to get GMP and MPFR dependencies?

I'm trying to compile GDC (v2) on Windows 7, using MinGW's MSYS.
When I get to this step:
$ ../configure --enable-languages=d --disable-shared --disable-bootstrap
I get:
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw32
checking for a BSD-compatible install... /bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.2+.
Try the --with-gmp and/or --with-mpfr options to specify their locations.
Copies of these libraries' source code can be found at their respective
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
See also http://gcc.gnu.org/install/prerequisites.html for additional info.
If you obtained GMP and/or MPFR from a vendor distribution package, make
sure that you have installed both the libraries and the header files.
They may be located in separate packages.
This made me look back at the instructions, which noted that it needs these libraries:
libgmp3-dev
libmpfr-dev
libmpc-dev
So now the question is, where do I find these headers and/or libraries? I've searched all over for libgmp3-dev, but I can't find anything for Windows. (I'm still in the learning process for *nix, so I'm not too familiar with anything.)
Thanks!
Update:
So I tried to make MPFR (I don't even know if it was the right version), and I got this error:
$ make install
Making install in tests
[...]
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
/bin/sh ./libtool --mode=install /bin/install -c libmpfr.la '/usr/local/lib'
libtool: install: /bin/install -c .libs/libmpfr.lai /usr/local/lib/libmpfr.la
libtool: install: /bin/install -c .libs/libmpfr.a /usr/local/lib/libmpfr.a
libtool: install: chmod 644 /usr/local/lib/libmpfr.a
libtool: install: ranlib /usr/local/lib/libmpfr.a
/bin/sh: /home/Home: No such file or directory
make[2]: *** [install-libLTLIBRARIES] Error 127
make[2]: Leaving directory `/home/Home User/mpfr-2.4.2'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/Home User/mpfr-2.4.2'
make: *** [install-recursive] Error 1
Any ideas?
From https://bitbucket.org/goshawk/gdc/wiki/MinGWCompile :
ftp://ftp.gmplib.org/pub/gmp-5.0.1/gmp-5.0.1.tar.bz2
http://www.mpfr.org/mpfr-current/mpfr-3.0.0.tar.bz2
http://gmplib.org/
http://www.mpfr.org/
Just download the source tarballs. As for building these, I don't remember the details (the instructions should be clear on this) but I know you can put these GMP and MPFR in the source tree with GCC and the GCC build process will automatically take care of building these. This may be easier than building/installing/setting environment variables for them as a discrete step.
I always use this for building gdc on Windows: http://gladman.plushost.co.uk/oldsite/computing/gmp4win.php
The error message you posted has the links to find the libraries. You might need to download their source code and compile them, but they are both easy to build.

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

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 ?