问题
Everytime I try to install a package or software on my mac (Maverick) from a config file, it automatically fails when checking the C compiler. It says "configure: error: C compiler cannot create executables". Besides, Homebrew works perfectly. I attached an example of config.log. I haven't found any satisfaction in the related previous posts, I apologize if the issue was solved.
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2530: checking for gcc
configure:2546: found /usr/local/bin/gcc
configure:2557: result: gcc
configure:2786: checking for C compiler version
configure:2795: gcc --version >&5
gcc (GCC) 4.8.0 20130113 (experimental)
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:2806: $? = 0
configure:2795: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin12.2.0/4.8.0/lto-wrapper
Target: x86_64-apple-darwin12.2.0
Configured with: ../gcc-4.8-20130113/configure --enable-languages=c++,fortran
Thread model: posix
gcc version 4.8.0 20130113 (experimental) (GCC)
configure:2806: $? = 0
configure:2795: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2806: $? = 1
configure:2795: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:2806: $? = 1
configure:2826: checking whether the C compiler works
configure:2848: gcc conftest.c >&5
ld: library not found for -lgcc_ext.10.5
collect2: error: ld returned 1 exit status
configure:2852: $? = 1
configure:2890: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2895: error: in `/Users/amidou/miriad_cvs':
configure:2897: error: C compiler cannot create executables
See `config.log' for more details
My Xcode version is 5.1, and I have the command line installed. Thanks in advance.
来源:https://stackoverflow.com/questions/22642539/c-compiler-cannot-create-executable-on-mac