Skip to content

error while building on windows #2806

@ekdnam

Description

@ekdnam

I am trying to build OpenBLAS on windows, following this.

After this command,

cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON -DCMAKE_BUILD_TYPE=Release

some errors are seen in the cmd. I am posting the entire output on the cmd here:

(base) C:\openblas\OpenBLAS-0.3.10\build>cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is Clang 5.0.0 with MSVC-like command-line
-- The ASM compiler identification is MSVC
-- Found assembler: C:/Users/adeet/miniconda3/Library/bin/clang-cl.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Users/adeet/miniconda3/Library/bin/clang-cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Warning at CMakeLists.txt:66 (message):
  CMake support is experimental.  It does not yet support all build options
  and may not produce the same Makefiles that OpenBLAS ships with.


-- GEMM multithread threshold set to 4.
-- Multi-threading enabled with 4 threads.
-- The Fortran compiler identification is Flang 99.99.1
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: C:/Users/adeet/miniconda3/Library/bin/flang.exe - skipped
-- Checking whether C:/Users/adeet/miniconda3/Library/bin/flang.exe supports Fortran 90
-- Checking whether C:/Users/adeet/miniconda3/Library/bin/flang.exe supports Fortran 90 - yes
CMake Warning (dev) at cmake/prebuild.cmake:472 (if):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "MSVC" will no longer be dereferenced when the policy
  is set to NEW.  Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
  cmake/system.cmake:157 (include)
  CMakeLists.txt:69 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Running getarch
-- GETARCH results:
CORE=HASWELL
LIBCORE=haswell
NUM_CORES=4
HAVE_MMX=1
HAVE_SSE=1
HAVE_SSE2=1
HAVE_SSE3=1
HAVE_SSSE3=1
HAVE_SSE4_1=1
HAVE_SSE4_2=1
HAVE_AVX=1
HAVE_AVX2=1
HAVE_FMA3=1
MAKE += -j 4

CMake Error at cmake/prebuild.cmake:529 (MESSAGE):
  Compiling getarch_2nd failed Change Dir:
  C:/openblas/OpenBLAS-0.3.10/build/getarch2_build/CMakeFiles/CMakeTmp



  Run Build Command(s):C:/Users/adeet/miniconda3/Library/bin/ninja.exe
  cmTC_28152 && [1/2] Building C object
  CMakeFiles\cmTC_28152.dir\getarch_2nd.c.obj

  FAILED: CMakeFiles/cmTC_28152.dir/getarch_2nd.c.obj

  C:\Users\adeet\miniconda3\Library\bin\clang-cl.exe /nologo /DWIN32
  /D_WINDOWS /W3 /MDd /Zi /Ob0 /Od /RTC1 -march=native
  -DGEMM_MULTITHREAD_THRESHOLD=4 -DNO_PARALLEL_MAKE=0
  -I"C:/openblas/OpenBLAS-0.3.10/build/getarch2_build"
  -I"C:/openblas/OpenBLAS-0.3.10" -I"C:/openblas/OpenBLAS-0.3.10/build"
  /showIncludes /FoCMakeFiles\cmTC_28152.dir\getarch_2nd.c.obj
  /FdCMakeFiles\cmTC_28152.dir\ -c C:\openblas\OpenBLAS-0.3.10\getarch_2nd.c

  clang-cl.exe: warning: unknown argument ignored in clang-cl:
  '-march=native' [-Wunknown-argument]

  C:\openblas\OpenBLAS-0.3.10\getarch_2nd.c(14,35): error: use of undeclared
  identifier 'SGEMM_DEFAULT_UNROLL_M'

      printf("SGEMM_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M);
                                    ^

  C:\openblas\OpenBLAS-0.3.10\getarch_2nd.c(15,35): error: use of undeclared
  identifier 'SGEMM_DEFAULT_UNROLL_N'

      printf("SGEMM_UNROLL_N=%d\n", SGEMM_DEFAULT_UNROLL_N);
                                    ^

  C:\openblas\OpenBLAS-0.3.10\getarch_2nd.c(16,35): error: use of undeclared
  identifier 'DGEMM_DEFAULT_UNROLL_M'

      printf("DGEMM_UNROLL_M=%d\n", DGEMM_DEFAULT_UNROLL_M);
                                    ^

  C:\openblas\OpenBLAS-0.3.10\getarch_2nd.c(17,35): error: use of undeclared
  identifier 'DGEMM_DEFAULT_UNROLL_N'

      printf("DGEMM_UNROLL_N=%d\n", DGEMM_DEFAULT_UNROLL_N);
                                    ^

  C:\openblas\OpenBLAS-0.3.10\getarch_2nd.c(21,35): error: use of undeclared
  identifier 'CGEMM_DEFAULT_UNROLL_M'

      printf("CGEMM_UNROLL_M=%d\n", CGEMM_DEFAULT_UNROLL_M);
                                    ^

  C:\openblas\OpenBLAS-0.3.10\getarch_2nd.c(22,35): error: use of undeclared
  identifier 'CGEMM_DEFAULT_UNROLL_N'

      printf("CGEMM_UNROLL_N=%d\n", CGEMM_DEFAULT_UNROLL_N);
                                    ^

  C:\openblas\OpenBLAS-0.3.10\getarch_2nd.c(23,35): error: use of undeclared
  identifier 'ZGEMM_DEFAULT_UNROLL_M'

      printf("ZGEMM_UNROLL_M=%d\n", ZGEMM_DEFAULT_UNROLL_M);
                                    ^

  C:\openblas\OpenBLAS-0.3.10\getarch_2nd.c(24,35): error: use of undeclared
  identifier 'ZGEMM_DEFAULT_UNROLL_N'

      printf("ZGEMM_UNROLL_N=%d\n", ZGEMM_DEFAULT_UNROLL_N);
                                    ^

  C:\openblas\OpenBLAS-0.3.10\getarch_2nd.c(31,37): error: use of undeclared
  identifier 'SGEMM_DEFAULT_UNROLL_M'

      printf("CGEMM3M_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M);
                                      ^

  C:\openblas\OpenBLAS-0.3.10\getarch_2nd.c(37,37): error: use of undeclared
  identifier 'SGEMM_DEFAULT_UNROLL_N'

      printf("CGEMM3M_UNROLL_N=%d\n", SGEMM_DEFAULT_UNROLL_N);
                                      ^

  C:\openblas\OpenBLAS-0.3.10\getarch_2nd.c(43,37): error: use of undeclared
  identifier 'DGEMM_DEFAULT_UNROLL_M'

      printf("ZGEMM3M_UNROLL_M=%d\n", DGEMM_DEFAULT_UNROLL_M);
                                      ^

  C:\openblas\OpenBLAS-0.3.10\getarch_2nd.c(49,37): error: use of undeclared
  identifier 'DGEMM_DEFAULT_UNROLL_N'

      printf("ZGEMM3M_UNROLL_N=%d\n", DGEMM_DEFAULT_UNROLL_N);
                                      ^

  C:\openblas\OpenBLAS-0.3.10\getarch_2nd.c(71,50): error: use of undeclared
  identifier 'SGEMM_DEFAULT_Q'

      printf("#define SLOCAL_BUFFER_SIZE\t%ld\n", (SGEMM_DEFAULT_Q * SGEMM_DEFAULT_UNROLL_N * 4 * 1 *  sizeof(float)));
                                                   ^

  C:\openblas\OpenBLAS-0.3.10\getarch_2nd.c(71,68): error: use of undeclared
  identifier 'SGEMM_DEFAULT_UNROLL_N'

      printf("#define SLOCAL_BUFFER_SIZE\t%ld\n", (SGEMM_DEFAULT_Q * SGEMM_DEFAULT_UNROLL_N * 4 * 1 *  sizeof(float)));
                                                                     ^

  C:\openblas\OpenBLAS-0.3.10\getarch_2nd.c(72,50): error: use of undeclared
  identifier 'DGEMM_DEFAULT_Q'

      printf("#define DLOCAL_BUFFER_SIZE\t%ld\n", (DGEMM_DEFAULT_Q * DGEMM_DEFAULT_UNROLL_N * 2 * 1 *  sizeof(double)));
                                                   ^

  C:\openblas\OpenBLAS-0.3.10\getarch_2nd.c(72,68): error: use of undeclared
  identifier 'DGEMM_DEFAULT_UNROLL_N'

      printf("#define DLOCAL_BUFFER_SIZE\t%ld\n", (DGEMM_DEFAULT_Q * DGEMM_DEFAULT_UNROLL_N * 2 * 1 *  sizeof(double)));
                                                                     ^

  C:\openblas\OpenBLAS-0.3.10\getarch_2nd.c(73,50): error: use of undeclared
  identifier 'CGEMM_DEFAULT_Q'

      printf("#define CLOCAL_BUFFER_SIZE\t%ld\n", (CGEMM_DEFAULT_Q * CGEMM_DEFAULT_UNROLL_N * 4 * 2 *  sizeof(float)));
                                                   ^

  C:\openblas\OpenBLAS-0.3.10\getarch_2nd.c(73,68): error: use of undeclared
  identifier 'CGEMM_DEFAULT_UNROLL_N'

      printf("#define CLOCAL_BUFFER_SIZE\t%ld\n", (CGEMM_DEFAULT_Q * CGEMM_DEFAULT_UNROLL_N * 4 * 2 *  sizeof(float)));
                                                                     ^

  C:\openblas\OpenBLAS-0.3.10\getarch_2nd.c(74,50): error: use of undeclared
  identifier 'ZGEMM_DEFAULT_Q'

      printf("#define ZLOCAL_BUFFER_SIZE\t%ld\n", (ZGEMM_DEFAULT_Q * ZGEMM_DEFAULT_UNROLL_N * 2 * 2 *  sizeof(double)));
                                                   ^

  fatal error: too many errors emitted, stopping now [-ferror-limit=]

  20 errors generated.

  ninja: build stopped: subcommand failed.



Call Stack (most recent call first):
  cmake/system.cmake:157 (include)
  CMakeLists.txt:69 (include)


-- Configuring incomplete, errors occurred!
See also "C:/openblas/OpenBLAS-0.3.10/build/CMakeFiles/CMakeOutput.log".
See also "C:/openblas/OpenBLAS-0.3.10/build/CMakeFiles/CMakeError.log".

What should be done to resolve this issue?

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