GMP Windows installation "configure: error: could not find a working compiler"

31 Views Asked by At

I am trying to install GMP (c++) for Windows using MSYS2. I made sure that when I installed msys2 that I installed gcc and set the PATH to C:\msys64\mingw64\bin. I restarted my computer to check if GCC is working (gcc --version in the cmd works), but when I try to install GMP it doesn't work.

When I try to do ./configure --enable-cxx this happens

MY-DESKTOP-NAME MSYS /c/GMP/gmp-6.3.0
$ ./configure --enable-cxx
configure: loading site script /etc/config.site
checking build system type... x86_64-pc-msys
checking host system type... x86_64-pc-msys
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=64
checking compiler gcc -O2 -pedantic -fomit-frame-pointer -m64 ... no
checking compiler cc -O ... no
checking ABI=x32
checking compiler gcc -O2 -pedantic -fomit-frame-pointer -mx32 ... no
checking compiler cc  ... no
checking ABI=32
checking compiler gcc -m32 -O2 -pedantic -fomit-frame-pointer ... no
checking compiler gcc -O2 -pedantic -fomit-frame-pointer ... no
checking compiler icc -no-gcc ... no
checking compiler cc -O ... no
configure: error: could not find a working compiler, see config.log for details

Here is the config.log file


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.3.0, which was
generated by GNU Autoconf 2.69.  Invocation command line was

$ ./configure --enable-cxx

## ---------

## Platform.

## ---------

hostname = MY-DESKTOP-NAME
uname -m = x86_64
uname -r = 3.4.10.x86_64
uname -s = MSYS_NT-10.0-22631
uname -v = 2023-12-22 10:06 UTC

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

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

PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /opt/bin
PATH: /c/Windows/System32
PATH: /c/Windows
PATH: /c/Windows/System32/Wbem
PATH: /c/Windows/System32/WindowsPowerShell/v1.0/
PATH: /usr/bin/site_perl
PATH: /usr/bin/vendor_perl
PATH: /usr/bin/core_perl

## -----------

## Core tests.

## -----------

configure:2885: loading site script /etc/config.site
| # This file is in public domain.
| # Original author: Karlson2k (Evgeny Grin)
| # Written for MSys2 to help running 'configure' scripts
|
| # Defaults for MSys2/MinGW64-targeted programs
|
| # Set proper selfname on bash and fallback to default name on other shells
| test -n "${BASH_SOURCE}" 2\>/dev/null && config_site_me="${BASH_SOURCE\[0\]##\*/}" || config_site_me=config.site
|
| # Set default 'host' to speedup configure
| if test -z "$build_alias"; then
|   build_alias="${MSYSTEM_CHOST}"  && \
|     ${as_echo-echo} "$config_site_me:${as_lineno-$LINENO}: default build_alias set to $build_alias" \>&5
| fi
|
| # Set default 'prefix'
| if ( test -z "$prefix" || test "x$prefix" = "xNONE" ) && \
|     ( test -z "$exec_prefix" || test "x$exec_prefix" = "xNONE" ); then
|   prefix="${MSYSTEM_PREFIX}" && \
|     ${as_echo-echo} "$config_site_me:${as_lineno-$LINENO}: default prefix set to $prefix" \>&5
| fi
config.site:13: default build_alias set to x86_64-pc-msys
config.site:20: default prefix set to /usr
configure:3056: checking build system type
configure:3070: result: x86_64-pc-msys
configure:3090: checking host system type
configure:3103: result: x86_64-pc-msys
configure:3140: checking for a BSD-compatible install
configure:3208: result: /usr/bin/install -c
configure:3219: checking whether build environment is sane
configure:3274: result: yes
configure:3425: checking for a thread-safe mkdir -p
configure:3464: result: /usr/bin/mkdir -p
configure:3471: checking for gawk
configure:3487: found /usr/bin/gawk
configure:3498: result: gawk
configure:3509: checking whether make sets $(MAKE)
configure:3535: result: no
configure:3560: checking whether make supports nested variables
configure:3577: result: no
configure:3706: checking whether to enable maintainer-specific portions of Makefiles
configure:3715: result: no
User:
ABI=
CC=
CFLAGS=(unset)
CPPFLAGS=(unset)
MPN_PATH=
GMP:
abilist=64 x32 32
cclist=gcc icc cc
configure:5911: gcc 2\>&1 | grep xlc \>/dev/null
configure:5914: $? = 1
configure:5968: checking compiler gcc -O2 -pedantic -fomit-frame-pointer -m64
Test compile:
configure:5982: gcc -O2 -pedantic -fomit-frame-pointer -m64  conftest.c \>&5
./configure: line 5983: gcc: command not found
configure:5985: $? = 127
failed program was:

int main () { return 0; }
configure:7072: result: no
configure:5889: cc -c conftest.c \>&5
./configure: line 5890: cc: command not found
configure:5892: $? = 127
configure:5911: cc 2\>&1 | grep xlc \>/dev/null
configure:5914: $? = 1
configure:5968: checking compiler cc -O
Test compile:
configure:5982: cc -O  conftest.c \>&5
./configure: line 5983: cc: command not found
configure:5985: $? = 127
failed program was:

int main () { return 0; }
configure:7072: result: no
configure:5911: gcc 2\>&1 | grep xlc \>/dev/null
configure:5914: $? = 1
configure:5968: checking compiler gcc -O2 -pedantic -fomit-frame-pointer -mx32
Test compile:
configure:5982: gcc -O2 -pedantic -fomit-frame-pointer -mx32  conftest.c \>&5
./configure: line 5983: gcc: command not found
configure:5985: $? = 127
failed program was:

int main () { return 0; }
configure:7072: result: no
configure:5889: cc -c conftest.c \>&5
./configure: line 5890: cc: command not found
configure:5892: $? = 127
configure:5911: cc 2\>&1 | grep xlc \>/dev/null
configure:5914: $? = 1
configure:5968: checking compiler cc  
Test compile:
configure:5982: cc   conftest.c \>&5
./configure: line 5983: cc: command not found
configure:5985: $? = 127
failed program was:

int main () { return 0; }
configure:7072: result: no
configure:5911: gcc 2\>&1 | grep xlc \>/dev/null
configure:5914: $? = 1
configure:5968: checking compiler gcc -m32 -O2 -pedantic -fomit-frame-pointer
Test compile:
configure:5982: gcc -m32 -O2 -pedantic -fomit-frame-pointer  conftest.c \>&5
./configure: line 5983: gcc: command not found
configure:5985: $? = 127
failed program was:

int main () { return 0; }
configure:7072: result: no
configure:5968: checking compiler gcc -O2 -pedantic -fomit-frame-pointer
Test compile:
configure:5982: gcc -O2 -pedantic -fomit-frame-pointer  conftest.c \>&5
./configure: line 5983: gcc: command not found
configure:5985: $? = 127
failed program was:

int main () { return 0; }
configure:7072: result: no
configure:5889: icc -c conftest.c \>&5
./configure: line 5890: icc: command not found
configure:5892: $? = 127
configure:5911: icc 2\>&1 | grep xlc \>/dev/null
configure:5914: $? = 1
configure:5968: checking compiler icc -no-gcc
Test compile:
configure:5982: icc -no-gcc  conftest.c \>&5
./configure: line 5983: icc: command not found
configure:5985: $? = 127
failed program was:

int main () { return 0; }
configure:7072: result: no
configure:5889: cc -c conftest.c \>&5
./configure: line 5890: cc: command not found
configure:5892: $? = 127
configure:5911: cc 2\>&1 | grep xlc \>/dev/null
configure:5914: $? = 1
configure:5968: checking compiler cc -O
Test compile:
configure:5982: cc -O  conftest.c \>&5
./configure: line 5983: cc: command not found
configure:5985: $? = 127
failed program was:

int main () { return 0; }
configure:7072: result: no
configure:7310: error: could not find a working compiler, see config.log for details

## ----------------

## Cache variables.

## ----------------

ac_cv_build=x86_64-pc-msys
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=x86_64-pc-msys
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/usr/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_make_make_set=no
am_cv_make_support_nested_variables=no

## -----------------

## Output variables.

## -----------------

ABI=''
ACLOCAL='${SHELL} /c/GMP/gmp-6.3.0/missing aclocal-1.15'
AMTAR='$${TAR-tar}'
AM_BACKSLASH=''
AM_DEFAULT_V='1'
AM_DEFAULT_VERBOSITY='1'
AM_V='1'
AR=''
AS=''
ASMFLAGS=''
AUTOCONF='${SHELL} /c/GMP/gmp-6.3.0/missing autoconf'
AUTOHEADER='${SHELL} /c/GMP/gmp-6.3.0/missing autoheader'
AUTOMAKE='${SHELL} /c/GMP/gmp-6.3.0/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='cygpath -w'
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} /c/GMP/gmp-6.3.0/missing makeinfo'
MANIFEST_TOOL=''
MKDIR_P='/usr/bin/mkdir -p'
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE='gmp'
PACKAGE_BUGREPORT='[email protected] (see https://gmplib.org/manual/Reporting-Bugs.html)'
PACKAGE_NAME='GNU MP'
PACKAGE_STRING='GNU MP 6.3.0'
PACKAGE_TARNAME='gmp'
PACKAGE_URL='http://www.gnu.org/software/gmp/'
PACKAGE_VERSION='6.3.0'
PATH_SEPARATOR=':'
RANLIB=''
SED=''
SET_MAKE='MAKE=make'
SHELL='/bin/sh'
SPEED_CYCLECOUNTER_OBJ='pentium.lo'
STRIP=''
TAL_OBJECT=''
TUNE_LIBS=''
TUNE_SQR_OBJ=''
U_FOR_BUILD=''
VERSION='6.3.0'
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='x86_64-pc-msys'
build_alias='x86_64-pc-msys'
build_cpu='x86_64'
build_os='msys'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
gmp_srclinks=''
host='x86_64-pc-msys'
host_alias=''
host_cpu='x86_64'
host_os='msys'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /c/GMP/gmp-6.3.0/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='/usr'
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.3.0"
#define PACKAGE_STRING "GNU MP 6.3.0"
#define PACKAGE_BUGREPORT "[email protected] (see https://gmplib.org/manual/Reporting-Bugs.html)"
#define PACKAGE_URL "http://www.gnu.org/software/gmp/"
#define PACKAGE "gmp"
#define VERSION "6.3.0"
#define WANT_FFT 1
#define HAVE_HOST_CPU_x86_64 1
#define HOST_DOS64 1

configure: exit 1
0

There are 0 best solutions below