make check problem in

Erik Bray erik.m.bray at
Tue Mar 29 13:21:08 UTC 2016

I'm compiling GMP v6.0.0a in the MSYS2 environment with the MinGW-w64
gcc.  Everything runs fine except the t-locale test in tests/cxx
during make check.  This is basically the same as the issue reported

The issues reported there are already worked around.  In particular
the incompatibility of tests/misc/t-locale.c is worked around by
redefining main() to a no-op if __MINGW32__ is defined (which is true
for MinGW-64 as well).

I confirmed that a similar fix in tests/cxx/clocale.c did the trick by
disabling the redefinitions of localeconv and nl_langinfo with an
`#ifndef __MINGW32__`.  The test itself is already designed to skip
gracefully if the overrides fail.

Configured with

$ ./configure --enable-cxx ABI=64

$ gcc -v
Using built-in specs.
Target: x86_64-w64-mingw32
Configured with: ../gcc-5.3.0/configure --prefix=/mingw64
--with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32
--host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32
--with-gxx-include-dir=/mingw64/include/c++/5.3.0 --enable-bootstrap
--with-arch=x86-64 --with-tune=generic
--enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared
--enable-static --enable-libatomic --enable-threads=posix
--enable-graphite --enable-fully-dynamic-string
--enable-libstdcxx-time=yes --disable-libstdcxx-pch
--disable-libstdcxx-debug --enable-version-specific-runtime-libs
--disable-isl-version-check --enable-lto --enable-libgomp
--disable-multilib --enable-checking=release --disable-rpath
--disable-win32-registry --disable-nls --disable-werror
--disable-symvers --with-libiconv --with-system-zlib
--with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64
--with-isl=/mingw64 --with-pkgversion='Rev1, Built by MSYS2 project'
--with-bugurl= --with-gnu-as
Thread model: posix
gcc version 5.3.0 (Rev1, Built by MSYS2 project)

$ uname -a
MINGW64_NT-6.1 PC-pret-47 2.4.1(0.294/5/3) 2016-02-03 10:57 x86_64 Msys

$ ./config.guess

$ ./configfsf.guess

When 'make check' compiles the tests/cxx/ test it produces
the following error:

***** snip *****
gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../tests    -Wall -g -O2
-g -O2   -c clocale.c
clocale.c:47:1: warning: 'localeconv' redeclared without dllimport
attribute: previous dllimport ignored [-Wattributes]
 localeconv (void)
/bin/sh ../../libtool --tag=CXX   --mode=link g++  -Wall -g -O2  -g
-O2     -o t-locale.exe t-locale.o clocale.o -L../../.libs
../../tests/ ../../ ../../ -lm
libtool: link: g++ -Wall -g -O2 -g -O2 -o t-locale.exe t-locale.o
clocale.o  -L../../.libs ../../tests/.libs/libtests.a
../../.libs/libgmpxx.a /home/embray/src/gmp/gmp-6.0.0a/.libs/libgmp.a
multiple definition of `localeconv'
first defined here
collect2.exe: error: ld returned 1 exit status
Makefile:522: recipe for target 't-locale.exe' failed
make[4]: *** [t-locale.exe] Error 1
***** snip *****

Please CC me on any follow-ups.


More information about the gmp-bugs mailing list