You are not logged in.

#1 2025-05-15 14:00:08

kapergagen
Member
Registered: 2025-01-24
Posts: 1

Can't build mingw-w64-gmp

I git clone this https://aur.archlinux.org/mingw-w64-gmp.git
I cd into it and makepkg
After download and extraction finishes I get this:

==> Starting build()...
~/mingw-w64-cgal/mingw-w64-mpfr/mingw-w64-gmp/src/gmp-6.3.0/build-i686-w64-mingw32 ~/mingw-w64-cgal/mingw-w64-mpfr/mingw-w64-gmp/src/gmp-6.3.0
checking build system type... x86_64-pc-linux-gnu
checking host system type... i686-w64-mingw32
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for i686-w64-mingw32-strip... i686-w64-mingw32-strip
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=32
checking whether i686-w64-mingw32-gcc is gcc... yes
checking compiler i686-w64-mingw32-gcc -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -O2 -pipe -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection  -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS ... no, long long reliability test 1
configure: error: could not find a working compiler, see config.log for details
==> ERROR: A failure occurred in build().
    Aborting...

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

  $ ../configure --host=i686-w64-mingw32 --target=i686-w64-mingw32 --build=x86_64-pc-linux-gnu --prefix=/usr/i686-w64-mingw32 --libdir=/usr/i686-w64-mingw32/lib --includedir=/usr/i686-w64-mingw32/include --enable-shared --enable-static --enable-cxx=detect --disable-static

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

hostname = ArchMSI
uname -m = x86_64
uname -r = 6.14.6-arch1-1
uname -s = Linux
uname -v = #1 SMP PREEMPT_DYNAMIC Fri, 09 May 2025 17:36:18 +0000

/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: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /home/kprg/.local/share/flatpak/exports/bin
PATH: /var/lib/flatpak/exports/bin
PATH: /usr/bin/site_perl
PATH: /usr/bin/vendor_perl
PATH: /usr/bin/core_perl


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

configure:3056: checking build system type
configure:3070: result: x86_64-pc-linux-gnu
configure:3090: checking host system type
configure:3103: result: i686-w64-mingw32
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:3333: checking for i686-w64-mingw32-strip
configure:3349: found /usr/bin/i686-w64-mingw32-strip
configure:3360: result: i686-w64-mingw32-strip
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:3531: result: yes
configure:3560: checking whether make supports nested variables
configure:3577: result: yes
configure:3706: checking whether to enable maintainer-specific portions of Makefiles
configure:3715: result: no
User:
ABI=
CC=i686-w64-mingw32-gcc
CFLAGS=-D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -O2 -pipe -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection 
CPPFLAGS=-D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS 
MPN_PATH=
GMP:
abilist=32
cclist=gcc icc cc
configure:5889: i686-w64-mingw32-gcc -c conftest.c >&5
configure:5892: $? = 0
configure:5895: checking whether i686-w64-mingw32-gcc is gcc
configure:5897: result: yes
configure:5911: i686-w64-mingw32-gcc 2>&1 | grep xlc >/dev/null
configure:5914: $? = 1
configure:5968: checking compiler i686-w64-mingw32-gcc -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -O2 -pipe -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection  -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS 
Test compile: 
configure:5982: i686-w64-mingw32-gcc -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -O2 -pipe -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection  -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS  conftest.c >&5
configure:5985: $? = 0
Test compile: function pointer return
configure:6036: i686-w64-mingw32-gcc -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -O2 -pipe -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection  -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS  conftest.c >&5
configure:6039: $? = 0
Test compile: cmov instruction
configure:6092: i686-w64-mingw32-gcc -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -O2 -pipe -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection  -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS  conftest.c >&5
configure:6095: $? = 0
Test compile: double -> ulong conversion
configure:6149: i686-w64-mingw32-gcc -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -O2 -pipe -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection  -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS  conftest.c >&5
configure:6152: $? = 0
Test compile: double negation
configure:6204: i686-w64-mingw32-gcc -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -O2 -pipe -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection  -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS  conftest.c >&5
configure:6207: $? = 0
Test compile: double -> float conversion
configure:6260: i686-w64-mingw32-gcc -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -O2 -pipe -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection  -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS  conftest.c >&5
configure:6263: $? = 0
Test compile: gnupro alpha ev6 char spilling
configure:6345: i686-w64-mingw32-gcc -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -O2 -pipe -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection  -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS  conftest.c >&5
configure:6348: $? = 0
Test compile: __builtin_alloca availability
configure:6396: i686-w64-mingw32-gcc -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -O2 -pipe -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection  -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS  conftest.c >&5
conftest.c: In function 'foo':
conftest.c:1:21: warning: ignoring return value of '__builtin_alloca' declared with attribute 'warn_unused_result' [-Wunused-result]
    1 | int k; int foo () { __builtin_alloca (k); }
      |                     ^~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/i686-w64-mingw32/15.1.0/../../../../i686-w64-mingw32/bin/ld: /usr/lib/gcc/i686-w64-mingw32/15.1.0/../../../../i686-w64-mingw32/lib/../lib/libmingw32.a(lib32_libmingw32_a-crtexewin.o): in function `main':
/build/mingw-w64-crt/src/mingw-w64-v12.0.0/mingw-w64-crt/crt/crtexewin.c:67:(.text.startup+0xc0): undefined reference to `WinMain@16'
collect2: error: ld returned 1 exit status
configure:6399: $? = 1
failed program was:
int k; int foo () { __builtin_alloca (k); }
Test compile: abs int -> double conversion
configure:6520: i686-w64-mingw32-gcc -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -O2 -pipe -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection  -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS  conftest.c >&5
configure:6523: $? = 0
Test compile: long long reliability test 1
configure:6585: i686-w64-mingw32-gcc -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -O2 -pipe -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection  -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS  conftest.c >&5
conftest.c: In function 'f':
conftest.c:12:48: error: too many arguments to function 'g'; expected 0, have 6
   12 | for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
      |                                                ^ ~
conftest.c:7:6: note: declared here
    7 | void g(){}
      |      ^
configure:6588: $? = 1
failed program was:
/* The following provokes a segfault in the compiler on powerpc-apple-darwin.
   Extracted from tests/mpn/t-iord_u.c.  Causes Apple's gcc 3.3 build 1640 and
   1666 to segfault with e.g., -O2 -mpowerpc64.  */

#if defined (__GNUC__) && ! defined (__cplusplus)
typedef unsigned long long t1;typedef t1*t2;
void g(){}
void h(){}
static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
void f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
#else
int dummy;
#endif

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

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

ac_cv_build=x86_64-pc-linux-gnu
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=set
ac_cv_env_CC_FOR_BUILD_value=gcc
ac_cv_env_CC_set=set
ac_cv_env_CC_value=i686-w64-mingw32-gcc
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -O2 -pipe -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection '
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value='-D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS '
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=set
ac_cv_env_CXXFLAGS_value='-D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -O2 -pipe -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection '
ac_cv_env_CXX_set=set
ac_cv_env_CXX_value=i686-w64-mingw32-g++
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value='-Wl,-O1,--sort-common,--as-needed -fstack-protector '
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=set
ac_cv_env_build_alias_value=x86_64-pc-linux-gnu
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=i686-w64-mingw32
ac_cv_env_target_alias_set=set
ac_cv_env_target_alias_value=i686-w64-mingw32
ac_cv_host=i686-w64-mingw32
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/usr/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_STRIP=i686-w64-mingw32-strip
ac_cv_prog_make_make_set=yes
am_cv_make_support_nested_variables=yes

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

ABI=''
ACLOCAL='${SHELL} /home/kprg/mingw-w64-cgal/mingw-w64-mpfr/mingw-w64-gmp/src/gmp-6.3.0/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} /home/kprg/mingw-w64-cgal/mingw-w64-mpfr/mingw-w64-gmp/src/gmp-6.3.0/missing autoconf'
AUTOHEADER='${SHELL} /home/kprg/mingw-w64-cgal/mingw-w64-mpfr/mingw-w64-gmp/src/gmp-6.3.0/missing autoheader'
AUTOMAKE='${SHELL} /home/kprg/mingw-w64-cgal/mingw-w64-mpfr/mingw-w64-gmp/src/gmp-6.3.0/missing automake-1.15'
AWK='gawk'
CALLING_CONVENTIONS_OBJS='x86call.lo x86check$U.lo'
CC='i686-w64-mingw32-gcc'
CCAS=''
CC_FOR_BUILD='gcc'
CFLAGS='-D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -O2 -pipe -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection '
CPP=''
CPPFLAGS='-D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS '
CPP_FOR_BUILD=''
CXX='i686-w64-mingw32-g++'
CXXCPP=''
CXXFLAGS='-D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -O2 -pipe -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection '
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='-Wl,-O1,--sort-common,--as-needed -fstack-protector '
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} /home/kprg/mingw-w64-cgal/mingw-w64-mpfr/mingw-w64-gmp/src/gmp-6.3.0/missing makeinfo'
MANIFEST_TOOL=''
MKDIR_P='/usr/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.3.0'
PACKAGE_TARNAME='gmp'
PACKAGE_URL='http://www.gnu.org/software/gmp/'
PACKAGE_VERSION='6.3.0'
PATH_SEPARATOR=':'
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/bin/sh'
SPEED_CYCLECOUNTER_OBJ='pentium.lo'
STRIP='i686-w64-mingw32-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=' -I$(srcdir)'
am__leading_dot='.'
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build='x86_64-pc-linux-gnu'
build_alias='x86_64-pc-linux-gnu'
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
gmp_srclinks=''
host='i686-w64-mingw32'
host_alias='i686-w64-mingw32'
host_cpu='i686'
host_os='mingw32'
host_vendor='w64'
htmldir='${docdir}'
includedir='/usr/i686-w64-mingw32/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /home/kprg/mingw-w64-cgal/mingw-w64-mpfr/mingw-w64-gmp/src/gmp-6.3.0/install-sh'
libdir='/usr/i686-w64-mingw32/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/i686-w64-mingw32'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias='i686-w64-mingw32'

## ----------- ##
## 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 "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.3.0"
#define WANT_FFT 1
#define HAVE_HOST_CPU_i686 1

configure: exit 1

Apparently it tries to compile test programs and fails
I need this one because it is a dependency of mpfr which is a dependency of CGAL
I have already built and installed other mingw pakacges I needed
I also tried this one my cleaner VM and got the same result

Offline

#2 2025-05-15 14:37:19

loqs
Member
Registered: 2014-03-06
Posts: 18,433

Re: Can't build mingw-w64-gmp

Apply the same patch that was applied to the gmp package in the repositories for the same build failure. Please see https://gitlab.archlinux.org/archlinux/ … d97b97deec.

Offline

Board footer

Powered by FluxBB