“配置:错误:找不到工作编译器,有关详细信息,请参阅 config.log”
Posted
技术标签:
【中文标题】“配置:错误:找不到工作编译器,有关详细信息,请参阅 config.log”【英文标题】:"Configure: Error: Could Not Find a Working Compiler, See config.log For Details" 【发布时间】:2019-02-02 23:46:45 【问题描述】:我必须在 C++ 中处理很长的数字。我在网上看到最简单的方法是安装 GMP 库,但我有一个问题。
当我在编译器文件夹中执行 msys.bat 文件并执行命令./configure --prefix=/d/Libraries_For_C_and_C++/GMP --enable-cxx
时,它给了我一个错误
配置:错误:找不到工作的编译器,详情请参阅 config.log
我试过多次安装编译器,但错误信息都是一样的。
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 GNU MP configure 6.1.2, which was generated by GNU
> Autoconf 2.69. Invocation command line was
>
> $ ./configure --prefix=/d/Libraries_For_C_and_C++/GMP --enable-cxx
>
> ## --------- ##
> ## Platform. ##
> ## --------- ##
>
> hostname = DESKTOP-N92E9KJ 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: . PATH: /usr/local/bin PATH: /mingw/bin PATH: /bin PATH:
> /c/Program Files (x86)/Common Files/Oracle/Java/javapath PATH:
> /c/Windows/system32 PATH: /c/Windows PATH: /c/Windows/System32/Wbem
> PATH: /c/Windows/System32/WindowsPowerShell/v1.0/ PATH:
> /c/Windows/System32/OpenSSH/ PATH: /c/Program Files (x86)/NVIDIA
> Corporation/PhysX/Common PATH: /c/Users/Novati
> Giovanni/AppData/Local/Microsoft/WindowsApps PATH: .
>
>
> ## ----------- ##
> ## Core tests. ##
> ## ----------- ##
>
> configure:3055: checking build system type configure:3069: result:
> i686-pc-mingw32 configure:3089: checking host system type
> configure:3102: result: i686-pc-mingw32 configure:3139: checking for a
> BSD-compatible install configure:3207: result: /bin/install -c
> configure:3218: checking whether build environment is sane
> configure:3273: result: yes configure:3424: checking for a thread-safe
> mkdir -p configure:3463: result: /bin/mkdir -p configure:3470:
> checking for gawk configure:3486: found /bin/gawk configure:3497:
> result: gawk configure:3508: checking whether make sets $(MAKE)
> configure:3530: result: yes configure:3559: checking whether make
> supports nested variables configure:3576: result: yes configure:3705:
> checking whether to enable maintainer-specific portions of Makefiles
> configure:3714: result: no User: ABI= CC= CFLAGS=(unset)
> CPPFLAGS=(unset) MPN_PATH= GMP: abilist=32 cclist=gcc icc cc
> configure:5801: gcc 2>&1 | grep xlc >/dev/null configure:5804: $? = 1
> configure:5858: checking compiler gcc -m32 -O2 -pedantic
> -fomit-frame-pointer Test compile: configure:5872: gcc -m32 -O2 -pedantic -fomit-frame-pointer conftest.c >&5 ./configure: line 5873: gcc: command not found configure:5875: $? = 127 failed program was:
>
> int main () return 0; configure:6962: result: no configure:5858:
> checking compiler gcc -O2 -pedantic -fomit-frame-pointer Test
> compile: configure:5872: gcc -O2 -pedantic -fomit-frame-pointer
> conftest.c >&5 ./configure: line 5873: gcc: command not found
> configure:5875: $? = 127 failed program was:
>
> int main () return 0; configure:6962: result: no configure:5779:
> icc -c conftest.c >&5 ./configure: line 5780: icc: command not found
> configure:5782: $? = 127 configure:5801: icc 2>&1 | grep xlc
> >/dev/null configure:5804: $? = 1 configure:5858: checking compiler icc -no-gcc Test compile: configure:5872: icc -no-gcc conftest.c
> >&5 ./configure: line 5873: icc: command not found configure:5875: $? = 127 failed program was:
>
> int main () return 0; configure:6962: result: no configure:5779:
> cc -c conftest.c >&5 ./configure: line 5780: cc: command not found
> configure:5782: $? = 127 configure:5801: cc 2>&1 | grep xlc >/dev/null
> configure:5804: $? = 1 configure:5858: checking compiler cc -O Test
> compile: configure:5872: cc -O conftest.c >&5 ./configure: line
> 5873: cc: command not found configure:5875: $? = 127 failed program
> was:
>
> int main () return 0; configure:6962: result: no configure:7200:
> error: could not find a working compiler, see config.log for details
>
> ## ---------------- ##
> ## Cache variables. ##
> ## ---------------- ##
>
> ac_cv_build=i686-pc-mingw32 ac_cv_env_ABI_set= ac_cv_env_ABI_value=
> ac_cv_env_CCC_set= ac_cv_env_CCC_value= ac_cv_env_CC_FOR_BUILD_set=
> ac_cv_env_CC_FOR_BUILD_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_FOR_BUILD_set=
> ac_cv_env_CPP_FOR_BUILD_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_LDFLAGS_set= ac_cv_env_LDFLAGS_value= ac_cv_env_LIBS_set=
> ac_cv_env_LIBS_value= ac_cv_env_LT_SYS_LIBRARY_PATH_set=
> ac_cv_env_LT_SYS_LIBRARY_PATH_value= ac_cv_env_M4_set=
> ac_cv_env_M4_value= ac_cv_env_YACC_set= ac_cv_env_YACC_value=
> ac_cv_env_YFLAGS_set= ac_cv_env_YFLAGS_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=i686-pc-mingw32 ac_cv_path_install='/bin/install -c'
> ac_cv_path_mkdir=/bin/mkdir ac_cv_prog_AWK=gawk
> ac_cv_prog_make_make_set=yes am_cv_make_support_nested_variables=yes
>
> ## ----------------- ##
> ## Output variables. ##
> ## ----------------- ##
>
> ABI='' ACLOCAL='$SHELL /d/Libraries_For_C_and_C++/gmp-6.1.2/missing
> aclocal-1.15' AMTAR='$$TAR-tar' AM_BACKSLASH='\'
> AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' AM_DEFAULT_VERBOSITY='1'
> AM_V='$(V)' AR='' AS='' ASMFLAGS='' AUTOCONF='$SHELL
> /d/Libraries_For_C_and_C++/gmp-6.1.2/missing autoconf'
> AUTOHEADER='$SHELL /d/Libraries_For_C_and_C++/gmp-6.1.2/missing
> autoheader' AUTOMAKE='$SHELL
> /d/Libraries_For_C_and_C++/gmp-6.1.2/missing automake-1.15' AWK='gawk'
> CALLING_CONVENTIONS_OBJS='x86call.lo x86check$U.lo' CC='' CCAS=''
> CC_FOR_BUILD='' CFLAGS='' CPP='' CPPFLAGS='' CPP_FOR_BUILD='' CXX=''
> CXXCPP='' CXXFLAGS='' CYGPATH_W='echo' DEFN_LONG_LONG_LIMB='' DEFS=''
> DLLTOOL='' DSYMUTIL='' DUMPBIN='' ECHO_C='' ECHO_N='-n' ECHO_T=''
> EGREP='' ENABLE_STATIC_FALSE='' ENABLE_STATIC_TRUE='' EXEEXT=''
> EXEEXT_FOR_BUILD='' FGREP='' GMP_LDFLAGS='' GMP_LIMB_BITS=''
> GMP_NAIL_BITS='0' GREP='' HAVE_CLOCK_01='' HAVE_CPUTIME_01=''
> HAVE_GETRUSAGE_01='' HAVE_GETTIMEOFDAY_01=''
> HAVE_HOST_CPU_FAMILY_power='0' HAVE_HOST_CPU_FAMILY_powerpc='0'
> HAVE_SIGACTION_01='' HAVE_SIGALTSTACK_01='' HAVE_SIGSTACK_01=''
> HAVE_STACK_T_01='' HAVE_SYS_RESOURCE_H_01='' INSTALL_DATA='$INSTALL
> -m 644' INSTALL_PROGRAM='$INSTALL' INSTALL_SCRIPT='$INSTALL' INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' LD='' LDFLAGS='' LEX=''
> LEXLIB='' LEX_OUTPUT_ROOT='' LIBCURSES='' LIBGMPXX_LDFLAGS=''
> LIBGMP_DLL='' LIBGMP_LDFLAGS='' LIBM='' LIBM_FOR_BUILD='' LIBOBJS=''
> LIBREADLINE='' LIBS='' LIBTOOL='' LIPO='' LN_S='' LTLIBOBJS=''
> LT_SYS_LIBRARY_PATH='' M4='' MAINT='#' MAINTAINER_MODE_FALSE=''
> MAINTAINER_MODE_TRUE='#' MAKEINFO='$SHELL
> /d/Libraries_For_C_and_C++/gmp-6.1.2/missing makeinfo'
> MANIFEST_TOOL='' MKDIR_P='/bin/mkdir -p' NM='' NMEDIT='' OBJDUMP=''
> OBJEXT='' OTOOL64='' OTOOL='' PACKAGE='gmp'
> PACKAGE_BUGREPORT='gmp-bugs@gmplib.org, see
> https://gmplib.org/manual/Reporting-Bugs.html' PACKAGE_NAME='GNU MP'
> PACKAGE_STRING='GNU MP 6.1.2' PACKAGE_TARNAME='gmp'
> PACKAGE_URL='http://www.gnu.org/software/gmp/' PACKAGE_VERSION='6.1.2'
> PATH_SEPARATOR=':' RANLIB='' SED='' SET_MAKE='' SHELL='/bin/sh'
> SPEED_CYCLECOUNTER_OBJ='pentium.lo' STRIP='' TAL_OBJECT=''
> TUNE_LIBS='' TUNE_SQR_OBJ='' U_FOR_BUILD='' VERSION='6.1.2'
> WANT_CXX_FALSE='' WANT_CXX_TRUE='' WITH_READLINE_01='' YACC=''
> YFLAGS='' ac_ct_AR='' ac_ct_CC='' ac_ct_CXX='' ac_ct_DUMPBIN=''
> am__EXEEXT_FALSE='' am__EXEEXT_TRUE='' am__isrc='' am__leading_dot='.'
> am__tar='$$TAR-tar chof - "$$tardir"' am__untar='$$TAR-tar xf -'
> bindir='$exec_prefix/bin' build='i686-pc-mingw32' build_alias=''
> build_cpu='i686' build_os='mingw32' build_vendor='pc'
> datadir='$datarootdir' datarootdir='$prefix/share'
> docdir='$datarootdir/doc/$PACKAGE_TARNAME' dvidir='$docdir'
> exec_prefix='NONE' gmp_srclinks='' host='i686-pc-mingw32'
> host_alias='' host_cpu='i686' host_os='mingw32' host_vendor='pc'
> htmldir='$docdir' includedir='$prefix/include'
> infodir='$datarootdir/info' install_sh='$SHELL
> /d/Libraries_For_C_and_C++/gmp-6.1.2/install-sh'
> libdir='$exec_prefix/lib' libexecdir='$exec_prefix/libexec'
> localedir='$datarootdir/locale' localstatedir='$prefix/var'
> mandir='$datarootdir/man' mkdir_p='$(MKDIR_P)' mpn_objects=''
> mpn_objs_in_libgmp='' oldincludedir='/usr/include' pdfdir='$docdir'
> prefix='/d/Libraries_For_C_and_C++/GMP'
> 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 "GNU MP"
> #define PACKAGE_TARNAME "gmp"
> #define PACKAGE_VERSION "6.1.2"
> #define PACKAGE_STRING "GNU MP 6.1.2"
> #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html"
> #define PACKAGE_URL "http://www.gnu.org/software/gmp/"
> #define PACKAGE "gmp"
> #define VERSION "6.1.2"
> #define WANT_FFT 1
> #define HAVE_HOST_CPU_i686 1
>
> configure: exit 1
我能做什么? 谢谢!
【问题讨论】:
如果您能更详细地说明您做了什么,以及究竟出了什么问题,您将获得更好更快的帮助。人们需要很长时间才能在答案框中编写分步指南。但是专家可以查看您的操作以及故障模式,并快速告诉您哪里出错了。使用edit 链接改进您的问题。 【参考方案1】:我通过更新 MinGW 编译器修复了错误。 如果有人需要,我还找到了本指南:
https://hyperactve.blogspot.com/2012/04/gmp-c-library-in-windows-mingwmsys.html
【讨论】:
以上是关于“配置:错误:找不到工作编译器,有关详细信息,请参阅 config.log”的主要内容,如果未能解决你的问题,请参考以下文章