我试图在Cygwin下编译igraph C库。我运行了./configure
和make
,但make
因以下错误而终止:
fatal error: sys/times.h: No such file or directory
我在这里搜索并找到了this,这使我能够识别出,即使是在Cygwin bash中,编译器也在使用我的Mingw GCC而不是Cygwin GCC。在那个问题中,建议的解决方案只是使用Cygwin编译器,但在该示例中,海报正在编译他们自己编写的代码。
在我的情况下,我假设我可以在配置的Makefile
中更改几行,但我对这类事情不太满意。我决定尝试使用./configure CC="/C/cygwin/bin/gcc.exe
进行重新配置,但是configure error: C compiler cannot create executables.
失败了。它说要查看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 igraph configure 0.7.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure CC=/c/cygwin/bin/gcc.exe
## --------- ##
## Platform. ##
## --------- ##
hostname = JennaPC
uname -m = i686
uname -r = 1.0.19(0.48/3/2)
uname -s = MINGW32_NT-6.2
uname -v = 2016-07-13 17:45
/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: /c/ProgramData/Oracle/Java/javapath
PATH: /c/Program Files (x86)/Intel/iCLS Client/
PATH: /c/Program Files/Intel/iCLS Client/
PATH: /c/Windows/system32
PATH: /c/Windows
PATH: /c/Windows/System32/Wbem
PATH: /c/Windows/System32/WindowsPowerShell/v1.0/
PATH: /c/Program Files/Intel/Intel(R) Management Engine Components/DAL
PATH: /c/Program Files/Intel/Intel(R) Management Engine Components/IPT
PATH: /c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL
PATH: /c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT
PATH: /c/Program Files (x86)/MiKTeX 2.9/miktex/bin/
PATH: /c/Program Files (x86)/PDFtk/bin/
PATH: /c/Program Files/Intel/WiFi/bin/
PATH: /c/Program Files/Common Files/Intel/WirelessCommon/
PATH: /c/WINDOWS/system32/config/systemprofile/.dnx/bin
PATH: /c/Program Files/Microsoft DNX/Dnvm/
PATH: /c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit/
PATH: /c/Program Files/TortoiseSVN/bin
PATH: /c/Program Files (x86)/QuickTime/QTSystem/
PATH: /c/Program Files (x86)/GtkSharp/2.12/bin
PATH: /c/Program Files (x86)/Skype/Phone/
PATH: /c/WINDOWS/system32
PATH: /c/WINDOWS
PATH: /c/WINDOWS/System32/Wbem
PATH: /c/WINDOWS/System32/WindowsPowerShell/v1.0/
PATH: /c/Anaconda3
PATH: /c/Anaconda3/Scripts
PATH: /c/Anaconda3/Library/bin
PATH: /c/Program Files/Git/cmd
PATH: /c/Ruby23-x64/bin
PATH: /c/Program Files/Intel/WiFi/bin/
PATH: /c/Program Files/Common Files/Intel/WirelessCommon/
PATH: /c/Python27
PATH: /c/Python27/Scripts
PATH: /c/Users/JennaR/AppData/Local/Microsoft/WindowsApps
PATH: /mingw/bin
PATH: /c/w32tex/bin
PATH: /c/w32tex/bin64
PATH: /c/FCIV
PATH: /usr/bin
PATH: /c/Program Files (x86)/Dr. Memory/bin/
PATH: /c/Program Files (x86)/Windows Kits/10/Debuggers/x64
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2580: checking for a BSD-compatible install
configure:2648: result: /usr/bin/install -c
configure:2659: checking whether build environment is sane
configure:2714: result: yes
configure:2865: checking for a thread-safe mkdir -p
configure:2904: result: /usr/bin/mkdir -p
configure:2911: checking for gawk
configure:2927: found /usr/bin/gawk
configure:2938: result: gawk
configure:2949: checking whether make sets $(MAKE)
configure:2971: result: yes
configure:3000: checking whether make supports nested variables
configure:3017: result: yes
configure:3262: checking for gcc
configure:3289: result: /c/cygwin/bin/gcc.exe
configure:3518: checking for C compiler version
configure:3527: /c/cygwin/bin/gcc.exe --version >&5
gcc (GCC) 5.4.0
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:3538: $? = 0
configure:3527: /c/cygwin/bin/gcc.exe -v >&5
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-cygwin/5.4.0/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with: /cygdrive/i/szsz/tmpp/gcc/gcc-5.4.0-1.i686/src/gcc-5.4.0/configure --srcdir=/cygdrive/i/szsz/tmpp/gcc/gcc-5.4.0-1.i686/src/gcc-5.4.0 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-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-arch=i686 --with-tune=generic --disable-sjlj-exceptions --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libcilkrts --enable-libgomp --enable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libjava --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 --with-default-libstdcxx-abi=gcc4-compatible
Thread model: posix
gcc version 5.4.0 (GCC)
configure:3538: $? = 0
configure:3527: /c/cygwin/bin/gcc.exe -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3538: $? = 1
configure:3527: /c/cygwin/bin/gcc.exe -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3538: $? = 1
configure:3558: checking whether the C compiler works
configure:3580: /c/cygwin/bin/gcc.exe conftest.c >&5
C:/cygwin/lib/gcc/i686-pc-cygwin/5.4.0/cc1.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
configure:3584: $? = 1
configure:3622: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "igraph"
| #define PACKAGE_TARNAME "igraph"
| #define PACKAGE_VERSION "0.7.1"
| #define PACKAGE_STRING "igraph 0.7.1"
| #define PACKAGE_BUGREPORT "csardi.gabor@gmail.com"
| #define PACKAGE_URL ""
| #define PACKAGE "igraph"
| #define VERSION "0.7.1"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3627: error: in `/c/lib/igraph-0.7.1':
configure:3629: error: C compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value=/c/cygwin/bin/gcc.exe
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_env_YACC_set=
ac_cv_env_YACC_value=
ac_cv_env_YFLAGS_set=
ac_cv_env_YFLAGS_value=
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/usr/bin/mkdir
ac_cv_prog_ac_ct_CC=/c/cygwin/bin/gcc.exe
ac_cv_prog_AWK=gawk
ac_cv_prog_make_make_set=yes
am_cv_make_support_nested_variables=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
ac_ct_AR=''
ac_ct_CC='/c/cygwin/bin/gcc.exe'
ac_ct_CXX=''
ac_ct_DUMPBIN=''
ACLOCAL='${SHELL} /c/lib/igraph-0.7.1/missing aclocal-1.14'
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include=''
am__isrc=''
am__leading_dot='.'
am__nodep=''
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='1'
AM_V='$(V)'
AMDEP_FALSE=''
AMDEP_TRUE=''
AMDEPBACKSLASH=''
AMTAR='$${TAR-tar}'
AR=''
AS=''
AUTOCONF='${SHELL} /c/lib/igraph-0.7.1/missing autoconf'
AUTOHEADER='${SHELL} /c/lib/igraph-0.7.1/missing autoheader'
AUTOM4TE=''
AUTOMAKE='${SHELL} /c/lib/igraph-0.7.1/missing automake-1.14'
AWK='gawk'
bindir='${exec_prefix}/bin'
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
build=''
CC='/c/cygwin/bin/gcc.exe'
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CXX=''
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS=''
CYGPATH_W='echo'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
DEFS=''
DEPDIR=''
DLLTOOL=''
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
DSYMUTIL=''
DUMPBIN=''
dvidir='${docdir}'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
exec_prefix='NONE'
EXEEXT=''
FGREP=''
FLOATSTORE=''
GREP=''
HAVE_TLS=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
host=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
install_sh='${SHELL} /c/lib/igraph-0.7.1/install-sh'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
INTERNAL_ARPACK_FALSE=''
INTERNAL_ARPACK_TRUE=''
INTERNAL_BLAS_FALSE=''
INTERNAL_BLAS_TRUE=''
INTERNAL_F2C_FALSE=''
INTERNAL_F2C_TRUE=''
INTERNAL_GLPK_FALSE=''
INTERNAL_GLPK_TRUE=''
INTERNAL_LAPACK_FALSE=''
INTERNAL_LAPACK_TRUE=''
LD=''
LDFLAGS=''
LEX_OUTPUT_ROOT=''
LEX=''
LEXLIB=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
LTLIBOBJS=''
MAKEINFO='${SHELL} /c/lib/igraph-0.7.1/missing makeinfo'
mandir='${datarootdir}/man'
MANIFEST_TOOL=''
mkdir_p='$(MKDIR_P)'
MKDIR_P='/usr/bin/mkdir -p'
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
oldincludedir='/usr/include'
OTOOL=''
OTOOL64=''
PACKAGE_BUGREPORT='csardi.gabor@gmail.com'
PACKAGE_NAME='igraph'
PACKAGE_STRING='igraph 0.7.1'
PACKAGE_TARNAME='igraph'
PACKAGE_URL=''
PACKAGE_VERSION='0.7.1'
PACKAGE='igraph'
PATH_SEPARATOR=':'
pdfdir='${docdir}'
PKGCONFIG_LIBS_PRIVATE='-lxml2 -lz -lm'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
RANLIB=''
sbindir='${exec_prefix}/sbin'
SED=''
SET_MAKE=''
sharedstatedir='${prefix}/com'
SHELL='/bin/sh'
STRIP=''
sysconfdir='${prefix}/etc'
target_alias=''
VERSION='0.7.1'
WARNING_CFLAGS=''
WERROR_CFLAGS=''
XML2_CFLAGS=''
XML2_LIBS=''
XML2CONFIG=''
YACC=''
YFLAGS=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "igraph"
#define PACKAGE_TARNAME "igraph"
#define PACKAGE_VERSION "0.7.1"
#define PACKAGE_STRING "igraph 0.7.1"
#define PACKAGE_BUGREPORT "csardi.gabor@gmail.com"
#define PACKAGE_URL ""
#define PACKAGE "igraph"
#define VERSION "0.7.1"
configure: exit 77