Menu

mingw-w64 toolchains status (update)

2009-08-10
2013-06-06
  • Rainer Emrich

    Rainer Emrich - 2009-08-10

    I'm running a system with windows xp professional x64 edition as OS and use mingw and msys as base system.
    The software versions I use:
    gmp-4.3.1
    mpfr-2.4.1
    mpc-0.6
    ppl-0.10.2
    cloog-ppl-0.15.3
    mingw-w64-runtime revision 1110
    pthreads-w32 from cvs from 21th of July with Kai's patch posted to the pthreads-w32 mailinglist applied
    binutils-cvs from 5th of August
    gcc-trunk revison 150478

    1.) As I use i686-pc-mingw32 as base here the results for i686-pc-mingw32:

    gmp is built using --enable-cxx --disable-shared, testsuite clean.

    mpfr is built using --disable-shared, testsuite has one failure:
    Error in mpfr_vsprintf (s, "%e", ...);
    expected: "-1.250000e+000"
    got:      "-<.500000e-001"
    FAIL: tsprintf.exe

    mpc is built using --disable-shared, testsuite clean.

    ppl is built using --disable-shared, testsuite has 11 failures.

    cloog is built using --disable-shared. Here I have to edit the Makefile manually after configure to add -lstdc++ to LIBS. Testsuite clean.

    gcc is built using --enable-checking=release --enable-languages=c,ada,c++,fortran,java,objc,obj-c++ --enable-libgomp --disable-werror
    Attempt to bootstrap with --enable-libgcj fails in i686-pc-mingw32/libjava:
    gnu/java/security/jce/prng/natVMSecureRandom.cc: In static member function »static jint gnu::java::security::jce::prng::VMSecureRandom::natGenerateSeed(JArray<__java_byte>*, jint, jint)«:
    gnu/java/security/jce/prng/natVMSecureRandom.cc:28:15: Fehler: expected type-specifier before »UnsupportedOperationException«
    gnu/java/security/jce/prng/natVMSecureRandom.cc:28:15: Fehler: expected »;« before »UnsupportedOperationException«
    gnu/java/security/jce/prng/natVMSecureRandom.cc: At global scope:
    gnu/java/security/jce/prng/natVMSecureRandom.cc:25:1: Warnung: unbenutzter Parameter »byte_array«
    gnu/java/security/jce/prng/natVMSecureRandom.cc:25:1: Warnung: unbenutzter Parameter »offset«
    make[3]: *** [gnu/java/security/jce/prng/natVMSecureRandom.lo] Error 1

    2.) i686-w64-mingw32

    The cross compiler --target=i686-w64-mingw32 builds fine, same libgcj issue as for i686-pc-mingw32.

    For the native compiler --host=i686-w64-mingw32 --target=i686-w64-mingw32 I have to build the support libraries for target i686-w64-mingw32, all are build as static libraries:

    gmp has 2 issues in the testsuite:
    in tests/misc
    i686-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I../../../../../../src/gmp-4.3.1/tests/misc -I../.. -I../../../../../../src/gmp-4.3.1 -I../../../../../../src/gmp-4.3.1/tests  -fexceptions  -m32 -O2 -pedantic -fomit-frame-pointer -mtune=pentiumpro -march=pentiumpro -mno-cygwin -c ../../../../../../src/gmp-4.3.1/tests/misc/t-locale.c
    ../../../../../../src/gmp-4.3.1/tests/misc/t-locale.c:51:1: Warnung: »localeconv« ohne Attribut »dllimport« redeklariert: vorheriges »dllimport« ignoriert
    i686-w64-mingw32-gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=pentiumpro -march=pentiumpro -mno-cygwin -o t-locale.exe t-locale.o  ../../tests/.libs/libtests.a /home/rainer/software/build/i686-w64-mingw32/gcc-4.5.0/gmp/.libs/libgmp.a ../../.libs/libgmp.a 
    c:/mingw/cross-gcc/gcc-4.5.0/i686-w64-mingw32/mingw/bin/../lib/gcc/i686-w64-mingw32/4.5.0/../../../../i686-w64-mingw32/lib/libmsvcrt.a(dyifs00682.o):(.text+0x0): multiple definition of `localeconv'
    t-locale.o:t-locale.c:(.text+0x0): first defined here

    and in tests/cxx
    i686-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I../../../../../../src/gmp-4.3.1/tests/cxx -I../.. -I../../../../../../src/gmp-4.3.1 -I../../../../../../src/gmp-4.3.1/tests  -fexceptions  -m32 -O2 -pedantic -fomit-frame-pointer -mtune=pentiumpro -march=pentiumpro -mno-cygwin -c ../../../../../../src/gmp-4.3.1/tests/cxx/clocale.c
    ../../../../../../src/gmp-4.3.1/tests/cxx/clocale.c:47:1: Warnung: »localeconv« ohne Attribut »dllimport« redeklariert: vorheriges »dllimport« ignoriert
    i686-w64-mingw32-g++ -m32 -O2 -pedantic -fomit-frame-pointer -mtune=pentiumpro -march=pentiumpro -mno-cygwin -o t-locale.exe t-locale.o clocale.o  -L/home/rainer/software/build/i686-w64-mingw32/gcc-4.5.0/gmp/.libs ../../tests/.libs/libtests.a ../../.libs/libgmpxx.a /home/rainer/software/build/i686-w64-mingw32/gcc-4.5.0/gmp/.libs/libgmp.a ../../.libs/libgmp.a 
    c:/mingw/cross-gcc/gcc-4.5.0/i686-w64-mingw32/mingw/bin/../lib/gcc/i686-w64-mingw32/4.5.0/../../../../i686-w64-mingw32/lib/libmsvcrt.a(dyifs00682.o):(.text+0x0): multiple definition of `localeconv'
    clocale.o:clocale.c:(.text+0x0): first defined here

    mpfr has 3 testsuite failures:
    Error in test #8: mpfr_printf printed td characters instead of 22
    FAIL: tprintf.exe
    Error in mpfr_vsprintf (s, "%.*Zi, %R*e, %Lf", ...);
    expected: "00000010610209857723, -1.2345678875e+07, 0.032258"
    got:      "00000010610209857723, -1.2345678875e+07, -0.000000"
    FAIL: tsprintf.exe
    Error in test #8: mpfr_vfprintf printed td characters instead of 22
    FAIL: tfprintf.exe

    mpc testsuite is clean.

    ppl doesn't build:
    libtool: compile:  i686-w64-mingw32-g++ -DHAVE_CONFIG_H -I. -I../../../../../src/ppl-0.10.2/src -I.. -I.. -I../../../../../src/ppl-0.10.2/src -I/mingw/gcc/gcc-4.5.0/i686-w64-mingw32/mingw/include -g -O2 -frounding-math -W -Wall -MT fpu-ia32.lo -MD -MP -MF .deps/fpu-ia32.Tpo -c ../../../../../src/ppl-0.10.2/src/fpu-ia32.cc -o fpu-ia32.o
    ../../../../../src/ppl-0.10.2/src/fpu-ia32.cc: In Funktion »void Parma_Polyhedra_Library::detect_sse_unit()«:
    ../../../../../src/ppl-0.10.2/src/fpu-ia32.cc:51:7: Fehler: »NULL« wurde in diesem Gültigkeitsbereich nicht definiert
    make[3]: *** [fpu-ia32.lo] Error 1

    So, gcc is configured without cloog_ppl backend.
    gcc is built using --enable-checking=release --enable-languages=c,ada,c++,fortran,java,objc,obj-c++ --enable-libgomp --disable-werror BOOT_CFLAGS="-g -O0" CFLAGS="-g -O0" CXXFLAGS="-g -O0" CFLAGS_FOR_BUILD="-g -O0" CFLAGS_FOR_TARGET="-O0" CXXFLAGS_FOR_TARGET="-O0"
    This builds and works.
    Using this compiler I built all the support libraries with the same result as for the cross-compiler!
    Using this compiler I was even able to do a 3 stage bootstrap for a --build=i686-w64-mingw32 --host=i686-w64-mingw32 --target=i686-w64-mingw32 configuration! Only ada and libgcj doesn't build.
    And this configuration is able to bootstrap itself.
    If wanted I will provide this toolchain.

    3.) x86_64-w64-mingw32 and x86_64_pc_mingw32

    The cross-compilers build fine. Attempt to build libgcj fails in boehm-gc.

    The support libraries for the native configurations are also built completely static.

    gmp tessuite has the same issues as for i686-w64-mingw32.

    mpfr tessuite has the same issues as for i686-w64-mingw32.

    mpc testsuite is clean.

    ppl testsuite has some issues:

    ../../../../../../src/ppl-0.10.2/tests/Polyhedron/dualhypercubes.cc:70:28: Fehler: Umformung von »const Parma_Polyhedra_Library::dimension_type« in »const Parma_Polyhedra_Library::GMP_Integer« ist nicht eindeutig
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:1563:3: Anmerkung: Kandidaten sind: __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(double)
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:1562:3: Anmerkung:                  __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(float)
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:1560:3: Anmerkung:                  __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(long unsigned int)
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:1559:3: Anmerkung:                  __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(long int)
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:1557:3: Anmerkung:                  __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(short unsigned int)
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:1556:3: Anmerkung:                  __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(short int)
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:1554:3: Anmerkung:                  __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(unsigned int)
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:1553:3: Anmerkung:                  __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(int)
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:1551:3: Anmerkung:                  __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(unsigned char)
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:1550:3: Anmerkung:                  __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(signed char)
    ../../../../../../src/ppl-0.10.2/tests/Polyhedron/dualhypercubes.cc:74:28: Fehler: Umformung von »const Parma_Polyhedra_Library::dimension_type« in »const Parma_Polyhedra_Library::GMP_Integer« ist nicht eindeutig
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:1563:3: Anmerkung: Kandidaten sind: __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(double)
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:1562:3: Anmerkung:                  __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(float)
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:1560:3: Anmerkung:                  __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(long unsigned int)
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:1559:3: Anmerkung:                  __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(long int)
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:1557:3: Anmerkung:                  __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(short unsigned int)
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:1556:3: Anmerkung:                  __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(short int)
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:1554:3: Anmerkung:                  __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(unsigned int)
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:1553:3: Anmerkung:                  __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(int)
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:1551:3: Anmerkung:                  __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(unsigned char)
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:1550:3: Anmerkung:                  __gmp_expr<__mpz_struct [1], __mpz_struct [1]>::__gmp_expr(signed char)
    mv -f .deps/contains2.Tpo .deps/contains2.Po
    make[3]: *** [dualhypercubes.o] Error 1

    ../../../../../../src/ppl-0.10.2/tests/Grid/generator1.cc: In Funktion »bool<unnamed>::test17()«:
    ../../../../../../src/ppl-0.10.2/tests/Grid/generator1.cc:363:45: Fehler: ambiguous overload für »operator*« in »(i + 1u) * a.Parma_Polyhedra_Library::Grid_Generator::coefficient(Parma_Polyhedra_Library::Variable(i))«
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:3138:1: Anmerkung: Kandidaten sind: __gmp_expr<T, __gmp_binary_expr<long int, __gmp_expr<T, U>, __gmp_binary_multiplies> > operator*(signed char, const __gmp_expr<T, U>&) [with T = __mpz_struct [1], U = __mpz_struct [1]]
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:3138:1: Anmerkung:                  __gmp_expr<T, __gmp_binary_expr<long unsigned int, __gmp_expr<T, U>, __gmp_binary_multiplies> > operator*(unsigned char, const __gmp_expr<T, U>&) [with T = __mpz_struct [1], U = __mpz_struct [1]]
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:3138:1: Anmerkung:                  __gmp_expr<T, __gmp_binary_expr<long int, __gmp_expr<T, U>, __gmp_binary_multiplies> > operator*(int, const __gmp_expr<T, U>&) [with T = __mpz_struct [1], U = __mpz_struct [1]]
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:3138:1: Anmerkung:                  __gmp_expr<T, __gmp_binary_expr<long unsigned int, __gmp_expr<T, U>, __gmp_binary_multiplies> > operator*(unsigned int, const __gmp_expr<T, U>&) [with T = __mpz_struct [1], U = __mpz_struct [1]]
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:3138:1: Anmerkung:                  __gmp_expr<T, __gmp_binary_expr<long int, __gmp_expr<T, U>, __gmp_binary_multiplies> > operator*(short int, const __gmp_expr<T, U>&) [with T = __mpz_struct [1], U = __mpz_struct [1]]
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:3138:1: Anmerkung:                  __gmp_expr<T, __gmp_binary_expr<long unsigned int, __gmp_expr<T, U>, __gmp_binary_multiplies> > operator*(short unsigned int, const __gmp_expr<T, U>&) [with T = __mpz_struct [1], U = __mpz_struct [1]]
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:3138:1: Anmerkung:                  __gmp_expr<T, __gmp_binary_expr<long int, __gmp_expr<T, U>, __gmp_binary_multiplies> > operator*(long int, const __gmp_expr<T, U>&) [with T = __mpz_struct [1], U = __mpz_struct [1]]
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:3138:1: Anmerkung:                  __gmp_expr<T, __gmp_binary_expr<long unsigned int, __gmp_expr<T, U>, __gmp_binary_multiplies> > operator*(long unsigned int, const __gmp_expr<T, U>&) [with T = __mpz_struct [1], U = __mpz_struct [1]]
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:3138:1: Anmerkung:                  __gmp_expr<T, __gmp_binary_expr<double, __gmp_expr<T, U>, __gmp_binary_multiplies> > operator*(float, const __gmp_expr<T, U>&) [with T = __mpz_struct [1], U = __mpz_struct [1]]
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:3138:1: Anmerkung:                  __gmp_expr<T, __gmp_binary_expr<double, __gmp_expr<T, U>, __gmp_binary_multiplies> > operator*(double, const __gmp_expr<T, U>&) [with T = __mpz_struct [1], U = __mpz_struct [1]]
    C:/MinGW/gcc/gcc-4.5.0/x86_64-w64-mingw32/mingw/include/gmpxx.h:3138:1: Anmerkung:                  __gmp_expr<T, __gmp_binary_expr<long double, __gmp_expr<T, U>, __gmp_binary_multiplies> > operator*(long double, const __gmp_expr<T, U>&) [with T = __mpz_struct [1], U = __mpz_struct [1]]
    make[3]: *** [generator1.o] Error 1

    cloog testsuite is clean.

    gcc is built using --enable-checking=release --enable-languages=c,c++,fortran,java,objc,obj-c++ --enable-libgomp --disable-werror BOOT_CFLAGS="-g -O0" CFLAGS="-g -O0" CXXFLAGS="-g -O0" CFLAGS_FOR_BUILD="-g -O0" CFLAGS_FOR_TARGET="-O0" CXXFLAGS_FOR_TARGET="-O0"
    This builds and works. ada and libgcj doesn't build.
    Using this compilers I built all the support libraries with the same result as for the cross-compilers!
    Attempt to do a 3 stage bootstrap for --build=x86_64-w64-mingw32 or --build=x86_64-pc-mingw32 fails the same way for both cases.
    Configuration of libgcc in stage 1 fails:
    configure: error: in `/home/rainer/software/build/x86_64-w64-mingw32-native/gcc-4.5.0/gcc/x86_64-w64-mingw32/libgcc':
    configure: error: cannot compute suffix of object files: cannot compile
    See `config.log' for more details.

    configure:2610: checking for suffix of object files
    configure:2631: /home/rainer/software/build/x86_64-w64-mingw32-native/gcc-4.5.0/gcc/./gcc/xgcc -B/home/rainer/software/build/x86_64-w64-mingw32-native/gcc-4.5.0/gcc/./gcc/ -L/home/rainer/software/build/x86_64-w64-mingw32-native/gcc-4.5.0/gcc/x86_64-w64-mingw32/winsup/mingw -L/home/rainer/software/build/x86_64-w64-mingw32-native/gcc-4.5.0/gcc/x86_64-w64-mingw32/winsup/w32api/lib -isystem /home/rainer/software/src/gcc-4.5.0/winsup/mingw/include -isystem /home/rainer/software/src/gcc-4.5.0/winsup/w32api/include -B/mingw/gcc/gcc-4.5.0/x86_64-w64-mingw32-native/mingw/x86_64-w64-mingw32/bin/ -B/mingw/gcc/gcc-4.5.0/x86_64-w64-mingw32-native/mingw/x86_64-w64-mingw32/lib/ -isystem /mingw/gcc/gcc-4.5.0/x86_64-w64-mingw32-native/mingw/x86_64-w64-mingw32/include -isystem /mingw/gcc/gcc-4.5.0/x86_64-w64-mingw32-native/mingw/x86_64-w64-mingw32/sys-include    -c -O0  conftest.c >&5
    D:\MSYS\bin\sh.exe: *** fork: can't reserve memory for stack 0x4D0000 - 0x6D0000, Win32 error 0
          0 [main] sh" 5880 sync_with_child: child 1948(0x224) died before initialization with status code 0x1
        628 [main] sh" 5880 sync_with_child: *** child state waiting for longjmp
    D:/MSYS/home/rainer/software/build/x86_64-w64-mingw32-native/gcc-4.5.0/gcc/gcc/as: fork: Resource temporarily unavailable
    configure:2634: $? = 1
    configure: failed program was:
    | /* confdefs.h.  */
    |
    | #define PACKAGE_NAME "GNU C Runtime Library"
    | #define PACKAGE_TARNAME "libgcc"
    | #define PACKAGE_VERSION "1.0"
    | #define PACKAGE_STRING "GNU C Runtime Library 1.0"
    | #define PACKAGE_BUGREPORT ""
    | /* end confdefs.h.  */
    |
    | int
    | main ()
    | {
    |
    |   ;
    |   return 0;
    | }

    That's all for the moment, comments are wellcome.

    Cheers,
    Rainer

     
    • drangonzhou

      drangonzhou - 2009-08-11

      I cross compile the x86_64-w64-mingw32 under linux x86_64 platform, the build ffmpeg, and wxWidgets, and application using wxWidgets and ffmpeg.

      ffmpeg built with -O3, read data success, but when call write frame function, the program crashed. the AVFormatContext pointer value is 1, not a valid pointer.

      wxWidgets built with -O0, simple application using wxWidgets compiles and runs well, but when call LoadLibrary(), the application crashed.

       
      • Kai Tietz

        Kai Tietz - 2009-08-11

        Hmm, do you get specific strict aliasing message, when you build with option -Wstrict-aliasing=2 option?
        This smells for me like an strict-aliasing issue.

        Kai

         
    • Kai Tietz

      Kai Tietz - 2009-08-12

      Ok, for the libjava build failure I posted a patch to MLs. The dwarf2 ICE I have to investigate.

      Cheers,
      Kai

       
    • Kai Tietz

      Kai Tietz - 2009-08-14

      Patch for x86 java is applied on gcc trunk. The x64 version can't be build as the update of boehm-gc is necessary for it and there are a lot of issues in libjava to be fixed, most pointer<->scalar casts, and issues about HANDLEs.

      Cheers,
      Kai

       

Log in to post a comment.