Skip to content

Fails to build on MinGW 64-index #4611

Closed

Description

@MehdiChinoune

It succeeds to with 32-index, but fails with 64-index
It was configured with:

cmake -G"Ninja" -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DUSE_THREAD=ON -DNUM_THREADS=64 -DUSE_OPENMP=ON -DTARGET=CORE2 -DDYNAMIC_ARCH=ON -DBINARY=64 -DINTERFACE64=1

Error message:

[8526/19197] Building C object kernel/CMakeFiles/kernel_PRESCOTT.dir/CMakeFiles/dgemv_t_PRESCOTT.c.obj
 FAILED: kernel/CMakeFiles/kernel_PRESCOTT.dir/CMakeFiles/dgemv_t_PRESCOTT.c.obj 
 D:\M\msys64\ucrt64\bin\gcc.exe -DUSE_GEMM3M -IC:/_/B/src/OpenBLAS-0.3.27/lapack-netlib/LAPACKE/include -IC:/_/B/src/OpenBLAS-0.3.27 -IC:/_/B/src/build-UCRT64-64/kernel_config/PRESCOTT -DHAVE_C11 -DMS_ABI -fopenmp -DUSE_OPENMP -Wall -m64 -DF_INTERFACE_GFORT -DSMALL_MATRIX_OPT -DDYNAMIC_ARCH -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=64 -DMAX_PARALLEL_NUMBER=1 -DNO_AFFINITY -DVERSION="\"0.3.27\"" -DBUILD_SINGLE -DBUILD_DOUBLE -DBUILD_COMPLEX -DBUILD_COMPLEX16 -O3 -DNDEBUG -DBUILD_KERNEL -DTABLE_NAME=gotoblas_PRESCOTT  -DTS=_PRESCOTT -msse -msse2 -msse3 -MD -MT kernel/CMakeFiles/kernel_PRESCOTT.dir/CMakeFiles/dgemv_t_PRESCOTT.c.obj -MF kernel\CMakeFiles\kernel_PRESCOTT.dir\CMakeFiles\dgemv_t_PRESCOTT.c.obj.d -o kernel/CMakeFiles/kernel_PRESCOTT.dir/CMakeFiles/dgemv_t_PRESCOTT.c.obj -c C:/_/B/src/build-UCRT64-64/kernel/CMakeFiles/dgemv_t_PRESCOTT.c
 In file included from C:/_/B/src/OpenBLAS-0.3.27/common.h:423,
                  from C:/_/B/src/OpenBLAS-0.3.27/kernel/x86_64/dgemv_t_4.c:29,
                  from C:/_/B/src/build-UCRT64-64/kernel/CMakeFiles/dgemv_t_PRESCOTT.c:9:
 C:/_/B/src/OpenBLAS-0.3.27/common_x86_64.h: In function 'rpcc':
 C:/_/B/src/OpenBLAS-0.3.27/common_x86_64.h:107:40: warning: left shift count >= width of type [-Wshift-count-overflow]
   107 |   return ((BLASULONG)a + ((BLASULONG)d << 32));
       |                                        ^~
 D:\M\msys64\tmp\cc9d1ABt.s: Assembler messages:
 D:\M\msys64\tmp\cc9d1ABt.s:261: Error: incorrect register `%ecx' used with `q' suffix
 D:\M\msys64\tmp\cc9d1ABt.s:263: Error: `(%r9,%eax,8)' is not a valid base/index expression
 D:\M\msys64\tmp\cc9d1ABt.s:264: Error: `(%rdx,%eax,8)' is not a valid base/index expression
 D:\M\msys64\tmp\cc9d1ABt.s:265: Error: `(%r8,%eax,8)' is not a valid base/index expression
 D:\M\msys64\tmp\cc9d1ABt.s:268: Error: incorrect register `%eax' used with `q' suffix
 D:\M\msys64\tmp\cc9d1ABt.s:270: Error: incorrect register `%ecx' used with `q' suffix
 D:\M\msys64\tmp\cc9d1ABt.s:273: Error: incorrect register `%ecx' used with `q' suffix
 D:\M\msys64\tmp\cc9d1ABt.s:276: Error: `(%r9,%eax,8)' is not a valid base/index expression
 D:\M\msys64\tmp\cc9d1ABt.s:277: Error: `(%rdx,%eax,8)' is not a valid base/index expression
 D:\M\msys64\tmp\cc9d1ABt.s:278: Error: `(%r8,%eax,8)' is not a valid base/index expression
 D:\M\msys64\tmp\cc9d1ABt.s:283: Error: `16(%r9,%eax,8)' is not a valid base/index expression
 D:\M\msys64\tmp\cc9d1ABt.s:284: Error: `16(%rdx,%eax,8)' is not a valid base/index expression
 D:\M\msys64\tmp\cc9d1ABt.s:285: Error: `16(%r8,%eax,8)' is not a valid base/index expression
 D:\M\msys64\tmp\cc9d1ABt.s:290: Error: incorrect register `%eax' used with `q' suffix
 D:\M\msys64\tmp\cc9d1ABt.s:291: Error: incorrect register `%ecx' used with `q' suffix
 D:\M\msys64\tmp\cc9d1ABt.s:334: Error: incorrect register `%ecx' used with `q' suffix
 D:\M\msys64\tmp\cc9d1ABt.s:336: Error: `(%rdx,%eax,8)' is not a valid base/index expression
 D:\M\msys64\tmp\cc9d1ABt.s:337: Error: `(%r8,%eax,8)' is not a valid base/index expression
 D:\M\msys64\tmp\cc9d1ABt.s:339: Error: incorrect register `%eax' used with `q' suffix
 D:\M\msys64\tmp\cc9d1ABt.s:341: Error: incorrect register `%ecx' used with `q' suffix
 D:\M\msys64\tmp\cc9d1ABt.s:343: Error: incorrect register `%ecx' used with `q' suffix
 D:\M\msys64\tmp\cc9d1ABt.s:346: Error: `(%rdx,%eax,8)' is not a valid base/index expression
 D:\M\msys64\tmp\cc9d1ABt.s:347: Error: `16(%rdx,%eax,8)' is not a valid base/index expression
 D:\M\msys64\tmp\cc9d1ABt.s:348: Error: `(%r8,%eax,8)' is not a valid base/index expression
 D:\M\msys64\tmp\cc9d1ABt.s:349: Error: `16(%r8,%eax,8)' is not a valid base/index expression
 D:\M\msys64\tmp\cc9d1ABt.s:352: Error: incorrect register `%eax' used with `q' suffix
 D:\M\msys64\tmp\cc9d1ABt.s:354: Error: incorrect register `%ecx' used with `q' suffix
 D:\M\msys64\tmp\cc9d1ABt.s:453: Error: `(%r8,%edx,8)' is not a valid base/index expression
 D:\M\msys64\tmp\cc9d1ABt.s:454: Error: `(%r9,%edx,8)' is not a valid base/index expression
 D:\M\msys64\tmp\cc9d1ABt.s:456: Error: incorrect register `%edx' used with `q' suffix
 D:\M\msys64\tmp\cc9d1ABt.s:458: Error: incorrect register `%eax' used with `q' suffix
 D:\M\msys64\tmp\cc9d1ABt.s:459: Error: `-16(%r9,%edx,8)' is not a valid base/index expression
 D:\M\msys64\tmp\cc9d1ABt.s:562: Error: `(%rdx,%eax,8)' is not a valid base/index expression
 D:\M\msys64\tmp\cc9d1ABt.s:563: Error: `(%r8,%eax,8)' is not a valid base/index expression
 D:\M\msys64\tmp\cc9d1ABt.s:565: Error: incorrect register `%eax' used with `q' suffix
 
 D:\M\msys64\tmp\cc9d1ABt.s:567: Error: incorrect register `%ecx' used with `q' suffix

Activity

  1. martin-frbg commented on Apr 5, 2024

    @martin-frbg
    Collaborator

    Hmm strange, I don't think there have been any recent changes in that part of the code. Could this be a (msys)gcc or binutils version problem ?

  2. MehdiChinoune commented on Apr 5, 2024

    @MehdiChinoune
    ContributorAuthor

    Hmm strange, I don't think there have been any recent changes in that part of the code. Could this be a (msys)gcc or binutils version problem ?

    The same with LLVM toolchain 18.1.3 (clang+lld+llvm tools).

  3. martin-frbg commented on Apr 5, 2024

    @martin-frbg
    Collaborator

    neither dgemv_t_4.c nor common_x86_64.h changed in recent releases, so either tools got pickier (which version of msys/gcc is this ?) or there might be something else wrong with the setup (I have not gotten around to building the usual Windows binaries yet, but I do not see any corresponding fault in our CI jobs)

  4. MehdiChinoune commented on Apr 5, 2024

    @MehdiChinoune
    ContributorAuthor

    MSYS2
    UCRT64: GCC 13.2.0 + Bintuils 2.42
    CLANG64: LLVM 18.1.3

  5. MehdiChinoune commented on Apr 5, 2024

    @MehdiChinoune
    ContributorAuthor

    0.3.26 builds successfully, so the failure is due some changes in 0.3.27

  6. martin-frbg commented on Apr 5, 2024

    @martin-frbg
    Collaborator

    no obvious candidate unfortunately - wild guess it might be #4502 that added USE_GEMM3M as a compile definition for CMAKE (if the way it adds the definition happens to overwrite what is already there, instead of adding to it)

  7. martin-frbg commented on Apr 5, 2024

    @martin-frbg
    Collaborator

    (still seems to build fine with gmake, on the other hand the cmake documentation claims that target_compile_definitions only adds to any existing definitions)

  8. martin-frbg commented on Apr 5, 2024

    @martin-frbg
    Collaborator

    also CI in what looks like basically the same configuration (gcc-13.2, cmake, dynamic_arch, interface64) appears to pass
    https://github.com/OpenMathLib/OpenBLAS/actions/runs/8560317475/job/23459009078

  9. MehdiChinoune commented on Apr 5, 2024

    @MehdiChinoune
    ContributorAuthor

    also CI in what looks like basically the same configuration (gcc-13.2, cmake, dynamic_arch, interface64) appears to pass https://github.com/OpenMathLib/OpenBLAS/actions/runs/8560317475/job/23459009078

    The difference I see is -DUSE_OPENMP=ON in our configuration, maybe something related to openmp?

  10. MehdiChinoune commented on Apr 6, 2024

    @MehdiChinoune
    ContributorAuthor

    It looks It was my fault as I unintentionally passed -DBINARY=64 without -DINTERFACE64=1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions