OS X Yosemite配置:检查C编译器是否正常工作......没有

时间:2015-12-18 15:51:05

标签: macos haskell gcc osx-yosemite configure

我一直在尝试安装带有cabal安装的Haskell库,但是我遇到了配置失败的问题。示例输出如下:

~ ❯ cabal install MissingH
Resolving dependencies...
Configuring old-time-1.1.0.3...
Configuring network-2.6.2.1...
Failed to install old-time-1.1.0.3
Build log ( /Users/samuel/.cabal/logs/old-time-1.1.0.3.log ):
Configuring old-time-1.1.0.3...
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/private/var/folders/11/b322xxjj7nn_46hvcr095m140000gn/T/cabal-tmp-11323/old-time-1.1.0.3':
configure: error: C compiler cannot create executables
See `config.log' for more details
Failed to install network-2.6.2.1
Build log ( /Users/samuel/.cabal/logs/network-2.6.2.1.log ):
Configuring network-2.6.2.1...
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
checking build system type... x86_64-apple-darwin14.5.0
checking host system type... x86_64-apple-darwin14.5.0
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/private/var/folders/11/b322xxjj7nn_46hvcr095m140000gn/T/cabal-tmp-11322/network-2.6.2.1':
configure: error: C compiler cannot create executables
See `config.log' for more details
cabal: Error: some packages failed to install:
MissingH-1.3.0.1 depends on network-2.6.2.1 which failed to install.
hslogger-1.2.9 depends on network-2.6.2.1 which failed to install.
network-2.6.2.1 failed during the configure step. The exception was:
ExitFailure 77
old-time-1.1.0.3 failed during the configure step. The exception was:
ExitFailure 77

搜索问题(并搜索此网站)显示最常见的修复方法似乎是更新Xcode命令行工具。我试过了,我现在在Xcode 7.2上,没有待定更新,但我仍然遇到同样的问题。一些答案说确保在安装后接受更新的许可证,我也做了。我还尝试使用自制软件安装gcc,并尝试更改CC路径变量并使用cabal的--with-gcc选项。一切都没有运气。我已经没想完了。

更新

user2407038请求的其他信息:Cabal安装似乎自行清理,但这里是config.log文件,用于尝试仅构建上面显示的命令的一个依赖项(旧时)。似乎缺少-lgcc_ext.10.4快速谷歌在Xcode更新中建议的东西?

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

It was created by Haskell old-time package configure 1.0, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ./configure --with-compiler=ghc --prefix=/Users/samuel/.cabal --with-gcc=/usr/local/bin/gcc

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

hostname = jackel.lan
uname -m = x86_64
uname -r = 14.5.0
uname -s = Darwin
uname -v = Darwin Kernel Version 14.5.0: Tue Sep  1 21:23:09 PDT 2015; root:xnu-2782.50.1~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 14.5.0: Tue Sep  1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64
Kernel configured for up to 4 processors.
2 processors are physically available.
4 processors are logically available.
Processor type: x86_64h (Intel x86-64h Haswell)
Processors active: 0 1 2 3
Primary memory available: 8.00 gigabytes
Default processor set: 224 tasks, 1045 threads, 4 processors
Load average: 1.80, Mach factor: 2.18
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /Users/samuel/.rvm/gems/ruby-2.1.1/bin
PATH: /Users/samuel/.rvm/gems/ruby-2.1.1@global/bin
PATH: /Users/samuel/.rvm/rubies/ruby-2.1.1/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /opt/X11/bin
PATH: /usr/texbin
PATH: /Users/samuel/.rvm/bin
PATH: /Users/samuel/scripts


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

configure:2256: checking for gcc
configure:2272: found /usr/local/bin/gcc
configure:2283: result: gcc
configure:2512: checking for C compiler version
configure:2521: gcc --version >&5
gcc (GCC) 4.9.0 20140309 (experimental)
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.

gcc: warning: couldn't understand kern.osversion '14.5.0
configure:2532: $? = 0
configure:2521: gcc -v >&5
gcc: warning: couldn't understand kern.osversion '14.5.0
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin13.1.0/4.9.0/lto-wrapper
Target: x86_64-apple-darwin13.1.0
Configured with: ../gcc-4.9-20140309/configure --enable-languages=fortran,c++
Thread model: posix
gcc version 4.9.0 20140309 (experimental) (GCC) 
configure:2532: $? = 0
configure:2521: gcc -V >&5
gcc: warning: couldn't understand kern.osversion '14.5.0
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2532: $? = 1
configure:2521: gcc -qversion >&5
gcc: warning: couldn't understand kern.osversion '14.5.0
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:2532: $? = 1
configure:2552: checking whether the C compiler works
configure:2574: gcc    conftest.c  >&5
gcc: warning: couldn't understand kern.osversion '14.5.0
ld: library not found for -lgcc_ext.10.4
collect2: error: ld returned 1 exit status
configure:2578: $? = 1
configure:2616: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Haskell old-time package"
| #define PACKAGE_TARNAME "old-time"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "Haskell old-time package 1.0"
| #define PACKAGE_BUGREPORT "libraries@haskell.org"
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:2621: error: in `/Users/samuel/old-time-1.1.0.3':
configure:2623: error: C compiler cannot create executables
See `config.log' for more details

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

ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=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_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_prog_ac_ct_CC=gcc

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

CC='gcc'
CFLAGS=''
CPP=''
CPPFLAGS=''
DEFS=''
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
EGREP=''
EXEEXT=''
GREP=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
OBJEXT=''
PACKAGE_BUGREPORT='libraries@haskell.org'
PACKAGE_NAME='Haskell old-time package'
PACKAGE_STRING='Haskell old-time package 1.0'
PACKAGE_TARNAME='old-time'
PACKAGE_URL=''
PACKAGE_VERSION='1.0'
PATH_SEPARATOR=':'
SHELL='/bin/sh'
ac_ct_CC='gcc'
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host_alias=''
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='/Users/samuel/.cabal'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

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

/* confdefs.h */
#define PACKAGE_NAME "Haskell old-time package"
#define PACKAGE_TARNAME "old-time"
#define PACKAGE_VERSION "1.0"
#define PACKAGE_STRING "Haskell old-time package 1.0"
#define PACKAGE_BUGREPORT "libraries@haskell.org"
#define PACKAGE_URL ""

configure: exit 77

cabal install MissingH -v3的输出太长,不适合问题正文,但我发布了here

0 个答案:

没有答案