configure:error:使用cygwin安装Jasper库时,C编译器无法创建可执行文件

时间:2015-10-01 13:04:01

标签: compiler-errors cygwin config grib

我正在尝试在我的笔记本电脑上安装pygrib,以便我可以访问GRIB文件。由于我有一台Windows计算机,我必须使用CYGWIN环境来构建Jasper,GRIB,OpenJPEG,PNG和pygrib的库。我运行以下命令来获取我的系统构建类型:

$ gcc -dumpmachine
x86_64-pc-cygwin

然后我在cywgin中运行./configure命令来编译Jasper库并得到以下输出:

$ ./configure --build='x86_64-pc-cygwin'
checking build system type... x86_64-pc-cygwin
checking host system type... x86_64-pc-cygwin
checking target system type... x86_64-pc-cygwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
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.

我有一台64位计算机,我非常确定cygwin正确安装了所有内容。如何通过C编译器无法创建可执行文件来解决此问题,将不胜感激。这是' 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 jasper configure 1.900.1, 
which was
generated by GNU Autoconf 2.59.  
Invocation command line was


$ ./configure 

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

hostname = Webas
uname -m = x86_64
uname -r = 2.2.1(0.289/5/3)
uname -s = CYGWIN_NT-6.1
uname -v = 2015-08-20 11:42

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = x86_64
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
hostinfo               = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/bin
PATH: /usr/bin
PATH: /cygdrive/c/Program Files (x86)/ActiveState Komodo Edit 9
PATH: /cygdrive/c/Python27
PATH: /cygdrive/c/Python27/Scripts
PATH:  C
PATH: /Python27/Lib/site-packages/django/bin
PATH: /cygdrive/c/ProgramData/Oracle/Java/javapath
PATH: /cygdrive/c/Program Files/TortoiseGit/bin
PATH: /cygdrive/c/Windows/System32
PATH: /cygdrive/c/Users/Brian/Anaconda
PATH: /cygdrive/c/Users/Brian/Anaconda/Scripts
PATH: /cygdrive/c/Program Files (x86)/QuickTime/QTSystem
PATH: /cygdrive/c/Program Files (x86)/Skype/Phone
PATH:  C
PATH: /Cygwin/bin
PATH: /cygdrive/c/Python27
PATH:  C
PATH: /Python27/python.exe
PATH:  C
PATH: /Python27/Scripts
PATH:  C
PATH: /MCC18/mpasm
PATH: /cygdrive/c/MCC18/bin
PATH: /cygdrive/c/Program Files/Intel/WiFi/bin
PATH: /cygdrive/c/Program Files/Common Files/Intel/WirelessCommon
PATH: /cygdrive/c/FastLook V14 Demo/ModelBin
PATH:  C
PATH: /Cygwin/bin
PATH: /usr/lib/lapack


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

configure:1558: checking build system type
configure:1576: result: x86_64-unknown-cygwin
configure:1584: checking host system type
configure:1598: result: x86_64-unknown-cygwin
configure:1606: checking target system type
configure:1620: result: x86_64-unknown-cygwin
configure:1650: checking for a BSD-compatible install
configure:1705: result: /usr/bin/install -c
configure:1716: checking whether build environment is sane
configure:1759: result: yes
configure:1824: checking for gawk
configure:1840: found /usr/bin/gawk
configure:1850: result: gawk
configure:1860: checking whether make sets $(MAKE)
configure:1880: result: yes
configure:2154: checking for gcc
configure:2170: found /usr/bin/gcc
configure:2180: result: gcc
configure:2424: checking for C compiler version
configure:2427: gcc --version </dev/null >&5
gcc (GCC) 4.9.3
Copyright (C) 2015 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:2430: $? = 0
configure:2432: gcc -v </dev/null >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with: /cygdrive/i/szsz/tmpp/gcc/gcc-4.9.3-1.x86_64/src/gcc-4.9.3/configure --srcdir=/cygdrive/i/szsz/tmpp/gcc/gcc-4.9.3-1.x86_64/src/gcc-4.9.3 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id
Thread model: posix
gcc version 4.9.3 (GCC) 
configure:2435: $? = 0
configure:2437: gcc -V </dev/null >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2440: $? = 1
configure:2463: checking for C compiler default output file name
configure:2466: gcc    conftest.c  >&5
C:/cygwin64/lib/gcc/x86_64-pc-cygwin/4.9.3/cc1.exe: error while loading shared libraries: cygisl-10.dll: cannot open shared object file: No such file or directory
configure:2469: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "jasper"
| #define PACKAGE_TARNAME "jasper"
| #define PACKAGE_VERSION "1.900.1"
| #define PACKAGE_STRING "jasper 1.900.1"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "jasper"
| #define VERSION "1.900.1"
| #define JAS_VERSION "1.900.1"
| #define JAS_CONFIGURE 1
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:2508: error: C compiler cannot create executables
See `config.log' for more details.

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

ac_cv_build=x86_64-unknown-cygwin
ac_cv_build_alias=x86_64-unknown-cygwin
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_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_F77_set=
ac_cv_env_F77_value=
ac_cv_env_FFLAGS_set=
ac_cv_env_FFLAGS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_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-cygwin
ac_cv_host_alias=x86_64-unknown-cygwin
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes
ac_cv_target=x86_64-unknown-cygwin
ac_cv_target_alias=x86_64-unknown-cygwin

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

ACLOCAL='${SHELL} /cygdrive/c/Users/Brian/Downloads/jasper-1.900.1/acaux/missing --run aclocal-1.9'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='${SHELL} /cygdrive/c/Users/Brian/Downloads/jasper-1.900.1/acaux/missing --run tar'
AR=''
AUTOCONF='${SHELL} /cygdrive/c/Users/Brian/Downloads/jasper-1.900.1/acaux/missing --run autoconf'
AUTOHEADER='${SHELL} /cygdrive/c/Users/Brian/Downloads/jasper-1.900.1/acaux/missing --run autoheader'
AUTOMAKE='${SHELL} /cygdrive/c/Users/Brian/Downloads/jasper-1.900.1/acaux/missing --run automake-1.9'
AWK='gawk'
CC='gcc'
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CXX=''
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS=''
CYGPATH_W='cygpath -w'
DEFS=''
DEPDIR=''
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
F77=''
FFLAGS=''
HAVE_LIBJPEG_FALSE=''
HAVE_LIBJPEG_TRUE=''
HAVE_OPENGL_FALSE=''
HAVE_OPENGL_TRUE=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
JAS_MAJOR_VERSION='1'
JAS_MICRO_VERSION='1'
JAS_MINOR_VERSION='900'
JAS_RPM_RELEASE='1'
JAS_VERSION='1.900.1'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S=''
LTLIBOBJS=''
LT_AGE='0'
LT_CURRENT='1'
LT_RELEASE='1.900'
LT_REVISION='0'
MAKEINFO='${SHELL} /cygdrive/c/Users/Brian/Downloads/jasper-1.900.1/acaux/missing --run makeinfo'
OBJEXT=''
OPENGL_LIBS=''
PACKAGE='jasper'
PACKAGE_BUGREPORT=''
PACKAGE_NAME='jasper'
PACKAGE_STRING='jasper 1.900.1'
PACKAGE_TARNAME='jasper'
PACKAGE_VERSION='1.900.1'
PATH_SEPARATOR=':'
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
VERSION='1.900.1'
X_CFLAGS=''
X_EXTRA_LIBS=''
X_LIBS=''
X_PRE_LIBS=''
ac_ct_AR=''
ac_ct_CC='gcc'
ac_ct_CXX=''
ac_ct_F77=''
ac_ct_RANLIB=''
ac_ct_STRIP=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build='x86_64-unknown-cygwin'
build_alias=''
build_cpu='x86_64'
build_os='cygwin'
build_vendor='unknown'
datadir='${prefix}/share'
exec_prefix='NONE'
host='x86_64-unknown-cygwin'
host_alias=''
host_cpu='x86_64'
host_os='cygwin'
host_vendor='unknown'
includedir='${prefix}/include'
infodir='${prefix}/info'
install_sh='/cygdrive/c/Users/Brian/Downloads/jasper-1.900.1/acaux/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
mkdir_p='mkdir -p --'
oldincludedir='/usr/include'
prefix='NONE'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target='x86_64-unknown-cygwin'
target_alias=''
target_cpu='x86_64'
target_os='cygwin'
target_vendor='unknown'

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

#define JAS_CONFIGURE 1
#define JAS_VERSION "1.900.1"
#define PACKAGE "jasper"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME "jasper"
#define PACKAGE_STRING "jasper 1.900.1"
#define PACKAGE_TARNAME "jasper"
#define PACKAGE_VERSION "1.900.1"
#define VERSION "1.900.1"

configure: exit 77

1 个答案:

答案 0 :(得分:0)

我认为这里的问题是autoconf生成的configure脚本会进行测试,以确定是否可以构建内容。但是,您使用的编译器(x86_64-unknown-cygwin-gcc)不支持-V选项,因此在此测试中编译失败。为避免这种情况,您可以破解配置脚本,例如this question的答案。可能有更好的方法来解决这个问题。