CMAKE with error by compiling on Windows with mingw32-make

Now i want to compile the code of libtorch by using the mingw32-make.
First i compiled the blas_libraries with the openblas what contains the laplack libraries.
But the cmake cant find the laplack libraries,tips like:

CMake Error at cmake/Modules/FindLAPACK.cmake:137 (check_function_exists):
  Unknown CMake command "check_function_exists".
Call Stack (most recent call first):
  cmake/Dependencies.cmake:1745 (find_package)
  CMakeLists.txt:708 (include)

And other

CMake Error at cmake/Dependencies.cmake:1562 (add_subdirectory):
  The source directory

    C:/proj/libpytorch/third_party/onnx

  does not contain a CMakeLists.txt file.
Call Stack (most recent call first):
  CMakeLists.txt:708 (include)


CMake Error at cmake/Dependencies.cmake:1564 (add_subdirectory):
  The source directory

    C:/proj/libpytorch/third_party/foxi

  does not contain a CMakeLists.txt file.
Call Stack (most recent call first):
  CMakeLists.txt:708 (include)


CMake Error at cmake/public/utils.cmake:226 (get_target_property):
  get_target_property() called with non-existent target "onnx".
Call Stack (most recent call first):
  cmake/Dependencies.cmake:1574 (caffe2_interface_library)
  CMakeLists.txt:708 (include)


CMake Error at cmake/Dependencies.cmake:1579 (target_compile_options):
  Cannot specify compile options for target "onnx" which is not built by this
  project.
Call Stack (most recent call first):
  CMakeLists.txt:708 (include)

There are so many options could choose for the compiling.I just dont know to or is there some guider could looked for

This is often caused by a missing:

INCLUDE(CheckFunctionExists)

in the cmake files so you might want to add it to FindLAPACK.cmake and see if it would solve the issue.

In fact.I just compiled successfully with the other machine learning library by using the laplack.
Now i just wondered if there any possible to compile the pytorch with mingw32-make and for x86_62 arch on win32 platforms(not x86_64 for win64),cause I seen that the manual books are designed for the x86_64 os platforms.And some topics in this forum also mentioned that it would take a lot of works by using the compile tool of mingw32-make.

I didn"t realize you are trying to compile for 32bit architectures and don’t think that’s possible, but others can correct me if I’m wrong.

Yeah,I agreed with you.When i just viewed the CMAKELIST,I saw that there’re no options of the x86_32,only supported ARM64/x86_64 arm and so on.
One of the questions is why?
And the other is that any possible to compile with the mingw32-make on win64?

Wouldn’t 32bit applications be limited by 2GB RAM by default and 4GB if they are linked with /LARGEADDRESSAWARE? If so, this would make their use cases quite limited and I would believe not many users would care about it, which is probably why this path is not maintained.

I don’t think it’s possible to compile LibTorch with mingw make. With some work you might be able to compile the CPU version but definitely not the CUDA version.