't-locale' test build failure using MinGW-W64
sav_ix at ukr.net
sav_ix at ukr.net
Wed Dec 23 15:23:34 UTC 2015
Hi,
Got error while running GMP 'make check', and propose a possible solution .
Used stuff:
- Windows 10,
- MSYS2 x64 (msys2-x86_64-20150916.exe with autoconf, automake, bison, diffutils, libtool, make, texinfo, xmlto packages installed),
- MinGW-W64 x86 (v5.2.0, i686-posix-sjlj-rev0) and MinGW-W64 x64 (v5.2.0, x86_64-posix-sjlj-rev0),
- GMP-6.1.0 sources (gmp-6.1.0.tar.lz).
Sample GMP build command for shared+x86 configuration:
./configure --prefix="$PWD/../GCC32r/dll" --enable-cxx --enable-shared --disable-static ABI="32" CFLAGS="-std=c11 -O3 -pedantic -fomit-frame-pointer -frounding-math -m32 -mtune=corei7 -march=corei7 -D__USE_MINGW_ANSI_STDIO" CXXFLAGS="-std=c++11 -O3 -pedantic -fomit-frame-pointer -frounding-math -m32 -mtune=corei7 -march=corei7 -D__USE_MINGW_ANSI_STDIO" > _configure.log && make && make install && make check
For all builds for <shared,static>+<x86,x64> configurations got errors while running 'make check' (log files added in attachment).
Sample error output for GMP build for shared+x86 configuration:
=========================================================================
C:/ProgramData/MinGW32/bin/../lib/gcc/i686-w64-mingw32/5.2.0/../../../../i686-w64-mingw32/lib/../lib/libmsvcrt.a(dgpgs01145.o):(.text+0x0): multiple definition of `localeconv'
clocale.o:clocale.c:(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
make[4]: *** [t-locale.exe] Error 1
make[3]: *** [check-am] Error 2
make[2]: *** [check-recursive] Error 1
make[1]: *** [check-recursive] Error 1
make: *** [check] Error 2
=========================================================================
I propose to detect MinGW (i686), MinGW-W64 (i686) and MinGW-W64 (x86_64) using predefined compiler macros __MINGW32__ (common for all MinGW* compilers, http://sourceforge.net/p/predef/wiki/Home/) and skip definition #HAVE_LOCALECONV if condition is satisfied. Additionaly it allow enable for MinGW* compilers full implementation of 't-locale' test instead of running stub. Proposed patches added in attachment.
After applying patches I made GMP builds using MinGW-W64 for <shared,static>+<x86,x64> configurations and all tests ran successfully (log files added in attachment).
Regards,
Alexander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gmp-clocale.c-mingw.patch
Type: application/x-patch
Size: 331 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20151223/f9bb4b98/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gmp_make_check_logs.zip
Type: application/x-zip-compressed
Size: 55769 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20151223/f9bb4b98/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gmp-t-locale.c-mingw.patch
Type: application/x-patch
Size: 632 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20151223/f9bb4b98/attachment-0005.bin>
More information about the gmp-bugs
mailing list