Skip to content

OpenBLAS build for Win x86 with cmake + VC fails when -DDYNAMIC_ARCH=ON #2826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
realgarik opened this issue Sep 7, 2020 · 38 comments
Closed

Comments

@realgarik
Copy link

realgarik commented Sep 7, 2020

Hi,

I'm trying to build openBLAS for Windows x86 platform as it is described in build page:
CMake and Visual Studio
To build OpenBLAS for the 32-bit architecture, you'll need to use the builtin Visual Studio compilers.

Here is the cmake command that I'm running on my "Haswell" host machine. Afterwards build with VS17 completes successfully:
cmake -G "Visual Studio 15 2017" -A Win32 -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DCMAKE_BUILD_TYPE=Release

but once I'm adding the DYNAMIC_ARCH feature enabling like this:
cmake -G "Visual Studio 15 2017" -A Win32 -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON -DCMAKE_BUILD_TYPE=Release
the build fails with some errors without generating the output library.
Note: that the same feature set mentioned above is working for x64 architecture using "1. Native (MSVC) ABI" build option.

Is it a known issue, or am I missed something?

@martin-frbg
Copy link
Collaborator

You certainly missed to mention what the "some error" messages are...

@realgarik
Copy link
Author

realgarik commented Sep 7, 2020

Definitely I've missed, because I'm facing some strange behavior so I don't know what to attach

Now I've received the full error list:
Severity Code Description Project File Line Suppression State
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syrk_kernel.c 65
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\syr2k_kernel.c 50
Error C2054 expected '(' to follow 'inline' kernel_ATOM C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_ATOM.c 940
Error C2085 'get_l2_size': not in formal parameter list kernel_ATOM C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_ATOM.c 940
Error C2143 syntax error: missing ';' before '{' kernel_ATOM C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_ATOM.c 940
Error C2054 expected '(' to follow 'inline' kernel_ATOM C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_ATOM.c 963
Error C2085 'get_l3_size': not in formal parameter list kernel_ATOM C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_ATOM.c 963
Error C2143 syntax error: missing ';' before '{' kernel_ATOM C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_ATOM.c 963
Error C2054 expected '(' to follow 'inline' kernel_CORE2 C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_CORE2.c 940
Error C2085 'get_l2_size': not in formal parameter list kernel_CORE2 C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_CORE2.c 940
Error C2143 syntax error: missing ';' before '{' kernel_CORE2 C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_CORE2.c 940
Error C2054 expected '(' to follow 'inline' kernel_CORE2 C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_CORE2.c 963
Error C2085 'get_l3_size': not in formal parameter list kernel_CORE2 C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_CORE2.c 963
Error C2143 syntax error: missing ';' before '{' kernel_CORE2 C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_CORE2.c 963
Error C2054 expected '(' to follow 'inline' kernel_DUNNINGTON C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_DUNNINGTON.c 940
Error C2085 'get_l2_size': not in formal parameter list kernel_DUNNINGTON C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_DUNNINGTON.c 940
Error C2143 syntax error: missing ';' before '{' kernel_DUNNINGTON C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_DUNNINGTON.c 940
Error C2054 expected '(' to follow 'inline' kernel_DUNNINGTON C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_DUNNINGTON.c 963
Error C2085 'get_l3_size': not in formal parameter list kernel_DUNNINGTON C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_DUNNINGTON.c 963
Error C2143 syntax error: missing ';' before '{' kernel_DUNNINGTON C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_DUNNINGTON.c 963
Error C2054 expected '(' to follow 'inline' kernel_COPPERMINE C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_COPPERMINE.c 940
Error C2085 'get_l2_size': not in formal parameter list kernel_COPPERMINE C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_COPPERMINE.c 940
Error C2143 syntax error: missing ';' before '{' kernel_COPPERMINE C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_COPPERMINE.c 940
Error C2054 expected '(' to follow 'inline' kernel_COPPERMINE C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_COPPERMINE.c 963
Error C2085 'get_l3_size': not in formal parameter list kernel_COPPERMINE C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_COPPERMINE.c 963
Error C2143 syntax error: missing ';' before '{' kernel_COPPERMINE C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_COPPERMINE.c 963
Error C2054 expected '(' to follow 'inline' kernel_BANIAS C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_BANIAS.c 940
Error C2085 'get_l2_size': not in formal parameter list kernel_BANIAS C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_BANIAS.c 940
Error C2143 syntax error: missing ';' before '{' kernel_BANIAS C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_BANIAS.c 940
Error C2054 expected '(' to follow 'inline' kernel_BANIAS C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_BANIAS.c 963
Error C2085 'get_l3_size': not in formal parameter list kernel_BANIAS C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_BANIAS.c 963
Error C2143 syntax error: missing ';' before '{' kernel_BANIAS C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_BANIAS.c 963
Error C2054 expected '(' to follow 'inline' kernel_BOBCAT C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_BOBCAT.c 940
Error C2085 'get_l2_size': not in formal parameter list kernel_BOBCAT C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_BOBCAT.c 940
Error C2143 syntax error: missing ';' before '{' kernel_BOBCAT C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_BOBCAT.c 940
Error C2054 expected '(' to follow 'inline' kernel_BOBCAT C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_BOBCAT.c 963
Error C2054 expected '(' to follow 'inline' kernel_BARCELONA C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_BARCELONA.c 940
Error C2085 'get_l2_size': not in formal parameter list kernel_BARCELONA C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_BARCELONA.c 940
Error C2085 'get_l3_size': not in formal parameter list kernel_BOBCAT C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_BOBCAT.c 963
Error C2143 syntax error: missing ';' before '{' kernel_BOBCAT C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_BOBCAT.c 963
Error C2143 syntax error: missing ';' before '{' kernel_BARCELONA C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_BARCELONA.c 940
Error C2054 expected '(' to follow 'inline' kernel_BARCELONA C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_BARCELONA.c 963
Error C2085 'get_l3_size': not in formal parameter list kernel_BARCELONA C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_BARCELONA.c 963
Error C2143 syntax error: missing ';' before '{' kernel_BARCELONA C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_BARCELONA.c 963
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2054 expected '(' to follow 'inline' kernel_ATHLON C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_ATHLON.c 940
Error C2085 'get_l2_size': not in formal parameter list kernel_ATHLON C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_ATHLON.c 940
Error C2143 syntax error: missing ';' before '{' kernel_ATHLON C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_ATHLON.c 940
Error C2054 expected '(' to follow 'inline' kernel_ATHLON C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_ATHLON.c 963
Error C2085 'get_l3_size': not in formal parameter list kernel_ATHLON C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_ATHLON.c 963
Error C2143 syntax error: missing ';' before '{' kernel_ATHLON C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_ATHLON.c 963
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zherk_kernel.c 56
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2057 expected constant expression driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2466 cannot allocate an array of constant size 0 driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2133 'subbuffer': unknown size driver_level3 C:\home\Algebra_libs\OpenBLAS-develop\driver\level3\zher2k_kernel.c 55
Error C2054 expected '(' to follow 'inline' kernel_KATMAI C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_KATMAI.c 940
Error C2085 'get_l2_size': not in formal parameter list kernel_KATMAI C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_KATMAI.c 940
Error C2143 syntax error: missing ';' before '{' kernel_KATMAI C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_KATMAI.c 940
Error C2054 expected '(' to follow 'inline' kernel_KATMAI C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_KATMAI.c 963
Error C2085 'get_l3_size': not in formal parameter list kernel_KATMAI C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_KATMAI.c 963
Error C2143 syntax error: missing ';' before '{' kernel_KATMAI C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_KATMAI.c 963
Error C2054 expected '(' to follow 'inline' kernel_NANO C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_NANO.c 940
Error C2085 'get_l2_size': not in formal parameter list kernel_NANO C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_NANO.c 940
Error C2143 syntax error: missing ';' before '{' kernel_NANO C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_NANO.c 940
Error C2054 expected '(' to follow 'inline' kernel_NANO C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_NANO.c 963
Error C2085 'get_l3_size': not in formal parameter list kernel_NANO C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_NANO.c 963
Error C2143 syntax error: missing ';' before '{' kernel_NANO C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_NANO.c 963
Error C2054 expected '(' to follow 'inline' kernel_NEHALEM C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_NEHALEM.c 940
Error C2085 'get_l2_size': not in formal parameter list kernel_NEHALEM C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_NEHALEM.c 940
Error C2143 syntax error: missing ';' before '{' kernel_NEHALEM C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_NEHALEM.c 940
Error C2054 expected '(' to follow 'inline' kernel_NEHALEM C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_NEHALEM.c 963
Error C2085 'get_l3_size': not in formal parameter list kernel_NEHALEM C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_NEHALEM.c 963
Error C2143 syntax error: missing ';' before '{' kernel_NEHALEM C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_NEHALEM.c 963
Error C2054 expected '(' to follow 'inline' kernel_NORTHWOOD C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_NORTHWOOD.c 940
Error C2085 'get_l2_size': not in formal parameter list kernel_NORTHWOOD C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_NORTHWOOD.c 940
Error C2143 syntax error: missing ';' before '{' kernel_NORTHWOOD C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_NORTHWOOD.c 940
Error C2054 expected '(' to follow 'inline' kernel_NORTHWOOD C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_NORTHWOOD.c 963
Error C2085 'get_l3_size': not in formal parameter list kernel_NORTHWOOD C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_NORTHWOOD.c 963
Error C2143 syntax error: missing ';' before '{' kernel_NORTHWOOD C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_NORTHWOOD.c 963
Error C2054 expected '(' to follow 'inline' kernel_PENRYN C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_PENRYN.c 940
Error C2085 'get_l2_size': not in formal parameter list kernel_PENRYN C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_PENRYN.c 940
Error C2143 syntax error: missing ';' before '{' kernel_PENRYN C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_PENRYN.c 940
Error C2054 expected '(' to follow 'inline' kernel_PENRYN C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_PENRYN.c 963
Error C2085 'get_l3_size': not in formal parameter list kernel_PENRYN C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_PENRYN.c 963
Error C2143 syntax error: missing ';' before '{' kernel_PENRYN C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_PENRYN.c 963
Error C2054 expected '(' to follow 'inline' kernel_PRESCOTT C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_PRESCOTT.c 940
Error C2085 'get_l2_size': not in formal parameter list kernel_PRESCOTT C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_PRESCOTT.c 940
Error C2143 syntax error: missing ';' before '{' kernel_PRESCOTT C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_PRESCOTT.c 940
Error C2054 expected '(' to follow 'inline' kernel_PRESCOTT C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_PRESCOTT.c 963
Error C2085 'get_l3_size': not in formal parameter list kernel_PRESCOTT C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_PRESCOTT.c 963
Error C2143 syntax error: missing ';' before '{' kernel_PRESCOTT C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_PRESCOTT.c 963
Error C2054 expected '(' to follow 'inline' kernel_OPTERON C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_OPTERON.c 940
Error C2085 'get_l2_size': not in formal parameter list kernel_OPTERON C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_OPTERON.c 940
Error C2143 syntax error: missing ';' before '{' kernel_OPTERON C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_OPTERON.c 940
Error C2054 expected '(' to follow 'inline' kernel_OPTERON C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_OPTERON.c 963
Error C2085 'get_l3_size': not in formal parameter list kernel_OPTERON C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_OPTERON.c 963
Error C2143 syntax error: missing ';' before '{' kernel_OPTERON C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_OPTERON.c 963
Error C2054 expected '(' to follow 'inline' kernel_OPTERON_SSE3 C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_OPTERON_SSE3.c 940
Error C2085 'get_l2_size': not in formal parameter list kernel_OPTERON_SSE3 C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_OPTERON_SSE3.c 940
Error C2143 syntax error: missing ';' before '{' kernel_OPTERON_SSE3 C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_OPTERON_SSE3.c 940
Error C2054 expected '(' to follow 'inline' kernel_OPTERON_SSE3 C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_OPTERON_SSE3.c 963
Error C2085 'get_l3_size': not in formal parameter list kernel_OPTERON_SSE3 C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_OPTERON_SSE3.c 963
Error C2143 syntax error: missing ';' before '{' kernel_OPTERON_SSE3 C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\kernel\CMakeFiles\setparam_OPTERON_SSE3.c 963
Error LNK1181 cannot open input file 'C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\driver\level3\driver_level3.dir\Release\ssyrk_kernel_U.obj' openblas C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\LINK 1
Error LNK1181 cannot open input file '..\lib\RELEASE\openblas.lib' openblas_utest C:\home\Algebra_libs\OpenBLAS-develop\vs_dynamic_x86\utest\LINK 1

@martin-frbg
Copy link
Collaborator

That seems to be the same error as in #2746, somehow the preprocessor does not get run or does not insert the relevant constants e.g. for the size of "subbuffer" into the source files before compiling. (In #2746 I had assumed it was a problem with the build system not working with the Intel compiler, but perhaps this is/was actually an x86 build problem as well.) Offhand I do not see why x86 should behave differently, I will see if I can reproduce this.

@isuruf
Copy link
Contributor

isuruf commented Sep 7, 2020

DYNAMIC_ARCH is not supported when building with Visual Studio compilers since the compiler doesn't understand the assembly syntax used in OpenBLAS. You can only build the TARGET=generic kernel.

@realgarik
Copy link
Author

realgarik commented Sep 7, 2020

Thanks for support!
So do I need just add TARGET=generic to my cmake command and remove DYNAMIC_ARCH=on?

Also is there any other way to build x86 to use the static lib with VS?

@isuruf
Copy link
Contributor

isuruf commented Sep 7, 2020

yes

@martin-frbg
Copy link
Collaborator

DYNAMIC_ARCH is not supported when building with Visual Studio compilers

Of course... where's my head today ?

@realgarik
Copy link
Author

I didn't know this, maybe it will be nice to highlight that line in build page for x86.
I did builds with minGW and conda with enabled DYNAMIC_ARCH, so I thought it will be applicable with x86 build as well))

Ok guys, thank you very much for your support, I was able to successfully build the lib by removing DYNAMIC_ARC and adding -DTARGET=generic to my build command.

@realgarik
Copy link
Author

@martin-frbg, @isuruf ,

Is there any way to build x86 like it was done for x64?

  1. Native (MSVC) ABI with Miniconda3 ninja, LLVM etc.

As with VS build version I see significant performance loss, about 5x times worse compared to #1 build for x64

@isuruf
Copy link
Contributor

isuruf commented Sep 7, 2020

You can, but you'll have to disable LAPACK and LAPACKE. Are you using BLAS and CBLAS only?

@realgarik
Copy link
Author

Yes, I'm using BLAS only

for x64 I did with the following configuration

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

and it works well, but the same I've tried by setting VS tools for x86 and providing -A Win32 to cmake but it failed to configure

@realgarik
Copy link
Author

The following error I received for x86:

cmake .. -G "Ninja" -A Win32 -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
CMake Error at CMakeLists.txt:6 (project):
Generator

Ninja

does not support platform specification, but platform

Win32

was specified.

CMake Error: CMAKE_ASM_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

@isuruf
Copy link
Contributor

isuruf commented Sep 7, 2020

The same build command line should work. (You don't need -A Win32) Did you activate the x86 tools in a new cmd?

@realgarik
Copy link
Author

ok thanks, I will try one more time without -A Win32 and making sure to activate x86.

@realgarik
Copy link
Author

The following I did:

"c:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvars32.bat"


** Visual Studio 2017 Developer Command Prompt v15.9.24
** Copyright (c) 2017 Microsoft Corporation


[vcvarsall.bat] Environment initialized for: 'x86'

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/Admin/anaconda3/Library/bin/clang-cl.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Users/Admin/anaconda3/Library/bin/clang-cl.exe
-- Check for working C compiler: C:/Users/Admin/anaconda3/Library/bin/clang-cl.exe - broken
CMake Error at C:/Users/Admin/anaconda3/Library/share/cmake-3.18/Modules/CMakeTestCCompiler.cmake:66 (message):
The C compiler

"C:/Users/Admin/anaconda3/Library/bin/clang-cl.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/home/Algebra_libs/OpenBLAS-develop/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Users/Admin/anaconda3/Library/bin/ninja.exe cmTC_470d1 && [1/2] Building C object CMakeFiles\cmTC_470d1.dir\testCCompiler.c.obj
[2/2] Linking C executable cmTC_470d1.exe
FAILED: cmTC_470d1.exe
cmd.exe /C "cd . && C:\Users\Admin\anaconda3\Library\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_470d1.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x86\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x86\mt.exe --manifests  -- C:\PROGRA~2\MICROS~4\2017\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\Hostx86\x86\link.exe /nologo CMakeFiles\cmTC_470d1.dir\testCCompiler.c.obj  /out:cmTC_470d1.exe /implib:cmTC_470d1.lib /pdb:cmTC_470d1.pdb /version:0.0 /machine:x64  /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "C:\PROGRA~2\MICROS~4\2017\COMMUN~1\VC\Tools\MSVC\1416~1.270\bin\Hostx86\x86\link.exe /nologo CMakeFiles\cmTC_470d1.dir\testCCompiler.c.obj /out:cmTC_470d1.exe /implib:cmTC_470d1.lib /pdb:cmTC_470d1.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\cmTC_470d1.dir/intermediate.manifest CMakeFiles\cmTC_470d1.dir/manifest.res" failed (exit code 1120) with the following output:
LINK : error LNK2001: unresolved external symbol mainCRTStartup
C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x86\kernel32.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x86\user32.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x86\gdi32.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x86\winspool.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x86\shell32.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x86\ole32.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x86\oleaut32.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x86\uuid.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x86\comdlg32.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x86\advapi32.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x86\msvcrtd.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
cmTC_470d1.exe : fatal error LNK1120: 1 unresolved externals
ninja: build stopped: subcommand failed.

@isuruf
Copy link
Contributor

isuruf commented Sep 7, 2020

Can you do the following,

set CC=clang-cl
set CFLAGS=-m32
set CXX=clang-cl
set CXXFLAGS=-m32

clean the build directory and start again?

@realgarik
Copy link
Author

I've cleaned the build directory, set above mentioned variables and run the same command, here is the result:

The Fortran compiler

"C:/Users/Admin/anaconda3/Library/bin/flang.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/home/Algebra_libs/OpenBLAS-develop/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Users/Admin/anaconda3/Library/bin/ninja.exe cmTC_8aa66 && [1/4] Building Fortran preprocessed CMakeFiles\cmTC_8aa66.dir\testFortranCompiler.f-pp.f
[2/4] Generating Fortran dyndep file CMakeFiles\cmTC_8aa66.dir\Fortran.dd
[3/4] Building Fortran object CMakeFiles\cmTC_8aa66.dir\testFortranCompiler.f.obj
[4/4] Linking Fortran executable cmTC_8aa66.exe
FAILED: cmTC_8aa66.exe
cmd.exe /C "cd . && C:\Users\Admin\anaconda3\Library\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_8aa66.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x86\rc.exe --mt="" --manifests  -- link /nologo CMakeFiles\cmTC_8aa66.dir\testFortranCompiler.f.obj  /out:cmTC_8aa66.exe /implib:cmTC_8aa66.lib /pdb:cmTC_8aa66.exe.dbg /version:0.0 /debug /INCREMENTAL /subsystem:console   && cd ."
LINK Pass 1: command "link /nologo CMakeFiles\cmTC_8aa66.dir\testFortranCompiler.f.obj /out:cmTC_8aa66.exe /implib:cmTC_8aa66.lib /pdb:cmTC_8aa66.exe.dbg /version:0.0 /debug /INCREMENTAL /subsystem:console /MANIFEST /MANIFESTFILE:CMakeFiles\cmTC_8aa66.dir/intermediate.manifest CMakeFiles\cmTC_8aa66.dir/manifest.res" failed (exit code 1120) with the following output:
LINK : error LNK2001: unresolved external symbol mainCRTStartup
c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x86\msvcrt.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
cmTC_8aa66.exe : fatal error LNK1120: 1 unresolved externals
ninja: build stopped: subcommand failed.

@isuruf
Copy link
Contributor

isuruf commented Sep 7, 2020

You need to do the following to disable fortran

cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DBUILD_WITHOUT_LAPACK=yes -DNOFORTRAN=1 -DDYNAMIC_ARCH=ON 

@realgarik
Copy link
Author

realgarik commented Sep 7, 2020

ok, now it passed some steps and now fails with the following:

FAILED: cmTC_3fd63.exe

cmd.exe /C "cd . && C:\Users\Admin\anaconda3\Library\bin\cmake.exe -E
vs_link_exe --intdir=CMakeFiles\cmTC_3fd63.dir
--rc=C:\PROGRA2\WI3CF21\10\bin\1001831.0\x86\rc.exe
--mt=C:\PROGRA
2\WI3CF21\10\bin\1001831.0\x86\mt.exe --manifests --
C:\PROGRA2\MICROS4\2017\COMMUN1\VC\Tools\MSVC\14161.270\bin\Hostx86\x86\link.exe
/nologo CMakeFiles\cmTC_3fd63.dir\getarch.c.obj
CMakeFiles\cmTC_3fd63.dir\cpuid.S.obj /out:cmTC_3fd63.exe
/implib:cmTC_3fd63.lib /pdb:cmTC_3fd63.pdb /version:0.0 /machine:X86
/subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd
."

LINK: command
"C:\PROGRA2\MICROS4\2017\COMMUN1\VC\Tools\MSVC\14161.270\bin\Hostx86\x86\link.exe
/nologo CMakeFiles\cmTC_3fd63.dir\getarch.c.obj
CMakeFiles\cmTC_3fd63.dir\cpuid.S.obj /out:cmTC_3fd63.exe
/implib:cmTC_3fd63.lib /pdb:cmTC_3fd63.pdb /version:0.0 /machine:X86
/subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
/MANIFEST /MANIFESTFILE:cmTC_3fd63.exe.manifest" failed (exit code 1112)
with the following output:

CMakeFiles\cmTC_3fd63.dir\cpuid.S.obj : fatal error LNK1112: module machine
type 'x64' conflicts with target machine type 'x86'

@isuruf
Copy link
Contributor

isuruf commented Sep 7, 2020

Can you clean and rebuild with ninja VERBOSE=1 and send the full output?

@realgarik
Copy link
Author

Sure, here is the results:

cmake .. -G "Ninja" -DVERBOSE=1 -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DBUILD_WITHOUT_LAPACK=yes -DNOFORTRAN=1 -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/Admin/anaconda3/Library/bin/clang-cl.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Users/Admin/anaconda3/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.

-- Looking for stdatomic.h
-- Looking for stdatomic.h - found
-- foundstdatomic.h
-- GEMM multithread threshold set to 4.
-- Multi-threading enabled with 12 threads.
CMake Warning (dev) at cmake/prebuild.cmake:504 (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.

CMake Error at cmake/prebuild.cmake:533 (MESSAGE):
Compiling getarch failed Change Dir:
C:/home/Algebra_libs/OpenBLAS-develop/build/getarch_build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Users/Admin/anaconda3/Library/bin/ninja.exe
cmTC_c3ca9 && [1/3] Building ASM object
CMakeFiles\cmTC_c3ca9.dir\cpuid.S.obj

[2/3] Building C object CMakeFiles\cmTC_c3ca9.dir\getarch.c.obj

In file included from
C:\home\Algebra_libs\OpenBLAS-develop\getarch.c:1246:

C:/home/Algebra_libs/OpenBLAS-develop/cpuid_x86.c(284,7): warning: unused
variable 'extend_model' [-Wunused-variable]

int extend_model, model;
    ^

C:/home/Algebra_libs/OpenBLAS-develop/cpuid_x86.c(284,21): warning: unused
variable 'model' [-Wunused-variable]

int extend_model, model;
                  ^

C:/home/Algebra_libs/OpenBLAS-develop/cpuid_x86.c(283,7): warning: unused
variable 'extend_family' [-Wunused-variable]

int extend_family, family;
    ^

C:/home/Algebra_libs/OpenBLAS-develop/cpuid_x86.c(285,7): warning: unused
variable 'type' [-Wunused-variable]

int type, stepping;
    ^

C:/home/Algebra_libs/OpenBLAS-develop/cpuid_x86.c(283,22): warning: unused
variable 'family' [-Wunused-variable]

int extend_family, family;
                   ^

C:/home/Algebra_libs/OpenBLAS-develop/cpuid_x86.c(285,13): warning: unused
variable 'stepping' [-Wunused-variable]

int type, stepping;
          ^

C:/home/Algebra_libs/OpenBLAS-develop/cpuid_x86.c(2057,4): warning: add
explicit braces to avoid dangling else [-Wdangling-else]

        else
        ^

C:/home/Algebra_libs/OpenBLAS-develop/cpuid_x86.c(2074,4): warning: add
explicit braces to avoid dangling else [-Wdangling-else]

        else
        ^

8 warnings generated.
[3/3] Linking C executable cmTC_c3ca9.exe

FAILED: cmTC_c3ca9.exe

cmd.exe /C "cd . && C:\Users\Admin\anaconda3\Library\bin\cmake.exe -E
vs_link_exe --intdir=CMakeFiles\cmTC_c3ca9.dir
--rc=C:\PROGRA2\WI3CF21\10\bin\1001831.0\x86\rc.exe
--mt=C:\PROGRA
2\WI3CF21\10\bin\1001831.0\x86\mt.exe --manifests --
C:\PROGRA2\MICROS4\2017\COMMUN1\VC\Tools\MSVC\14161.270\bin\Hostx86\x86\link.exe
/nologo CMakeFiles\cmTC_c3ca9.dir\getarch.c.obj
CMakeFiles\cmTC_c3ca9.dir\cpuid.S.obj /out:cmTC_c3ca9.exe
/implib:cmTC_c3ca9.lib /pdb:cmTC_c3ca9.pdb /version:0.0 /machine:X86
/subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd
."
LINK: command
"C:\PROGRA2\MICROS4\2017\COMMUN1\VC\Tools\MSVC\14161.270\bin\Hostx86\x86\link.exe
/nologo CMakeFiles\cmTC_c3ca9.dir\getarch.c.obj
CMakeFiles\cmTC_c3ca9.dir\cpuid.S.obj /out:cmTC_c3ca9.exe
/implib:cmTC_c3ca9.lib /pdb:cmTC_c3ca9.pdb /version:0.0 /machine:X86
/subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
/MANIFEST /MANIFESTFILE:cmTC_c3ca9.exe.manifest" failed (exit code 1112)
with the following output:

CMakeFiles\cmTC_c3ca9.dir\cpuid.S.obj : fatal error LNK1112: module machine
type 'x64' conflicts with target machine type 'x86'

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:/home/Algebra_libs/OpenBLAS-develop/build/CMakeFiles/CMakeOutput.log".
See also "C:/home/Algebra_libs/OpenBLAS-develop/build/CMakeFiles/CMakeError.log".

In the error logs the following

Checking whether the ASM compiler is GNU using "--version" did not match "(GNU assembler)|(GCC)|(Free Software Foundation)":
clang-cl.exe: warning: unknown argument ignored in clang-cl: '--version' [-Wunknown-argument]
clang-cl.exe: error: no input files
Checking whether the ASM compiler is Clang using "--version" did not match "(clang version)":
clang-cl.exe: warning: unknown argument ignored in clang-cl: '--version' [-Wunknown-argument]
clang-cl.exe: error: no input files
Checking whether the ASM compiler is AppleClang using "--version" did not match "(Apple LLVM version)":
clang-cl.exe: warning: unknown argument ignored in clang-cl: '--version' [-Wunknown-argument]
clang-cl.exe: error: no input files
Checking whether the ASM compiler is ARMClang using "--version" did not match "armclang":
clang-cl.exe: warning: unknown argument ignored in clang-cl: '--version' [-Wunknown-argument]
clang-cl.exe: error: no input files
Checking whether the ASM compiler is HP using "-V" did not match "HP C":
clang-cl.exe: error: no input files
Checking whether the ASM compiler is Intel using "--version" did not match "(ICC)":
clang-cl.exe: warning: unknown argument ignored in clang-cl: '--version' [-Wunknown-argument]
clang-cl.exe: error: no input files
Checking whether the ASM compiler is SunPro using "-V" did not match "Sun C":
clang-cl.exe: error: no input files
Checking whether the ASM compiler is XL using "-qversion" did not match "XL C":
clang-cl.exe: warning: unknown argument ignored in clang-cl: '-qversion' [-Wunknown-argument]
clang-cl.exe: error: no input files

@martin-frbg
Copy link
Collaborator

@isuruf seems the problem is with linking the getarch tool (which wants to be built for the x64 compile host as it needs to run as part of the build). I do not recall this being a problem but maybe something got broken fairly recently (or nobody actually tried this quasi-crosscompile on Win10) ?

@realgarik
Copy link
Author

If this build is broken recently, then maybe reasonable to try with an older version instead of using the latest one?

@isuruf
Copy link
Contributor

isuruf commented Sep 8, 2020

@realgarik, can you try downloading clang for 32-bit from https://llvm.org and add it to the front of the PATH?

@realgarik
Copy link
Author

Let me download it, if I understand it correctly, I need to build clang for windows...

@isuruf
Copy link
Contributor

isuruf commented Sep 8, 2020

Here's a pre-built binary, https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/LLVM-10.0.0-win32.exe

@isuruf
Copy link
Contributor

isuruf commented Sep 8, 2020

@martin-frbg, do you know if CMAKE_CXX_FLAGS is passed when compiling getarch?

@martin-frbg
Copy link
Collaborator

@isuruf it is not explicitly passed at least - cmake/prebuild.cmake from line 500 would be the place to check. (I do not think anything with a CMAKE_CXX_ prefix is used anywhere in the build ?)

@isuruf
Copy link
Contributor

isuruf commented Sep 8, 2020

Sorry, I meant CMAKE_C_FLAGS. I'll have a look.

@martin-frbg
Copy link
Collaborator

Hmm. I see CMAKE_C_FLAGS_DEBUG conditionally appended to GETARCH_FLAGS in system.cmake, but no explicit passing or adding of CMAKE_C_FLAGS in either file.

@realgarik
Copy link
Author

@isuruf today I've built the clang for Win32 arch. Did the same variable initialization that you provided before for CC and CXX variables to set to my newly built clang-cl.exe and here is the result for cmake build:

FAILED: cmTC_5ce47.exe

cmd.exe /C "cd . && C:\Users\Admin\anaconda3\Library\bin\cmake.exe -E
vs_link_exe --intdir=CMakeFiles\cmTC_5ce47.dir
--rc=C:\PROGRA2\WI3CF21\10\bin\1001831.0\x86\rc.exe
--mt=C:\PROGRA
2\WI3CF21\10\bin\1001831.0\x86\mt.exe --manifests --
C:\PROGRA2\MICROS4\2017\COMMUN1\VC\Tools\MSVC\14161.270\bin\Hostx86\x86\link.exe
/nologo CMakeFiles\cmTC_5ce47.dir\getarch.c.obj
CMakeFiles\cmTC_5ce47.dir\cpuid.S.obj /out:cmTC_5ce47.exe
/implib:cmTC_5ce47.lib /pdb:cmTC_5ce47.pdb /version:0.0 /machine:X86
/subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd
."

LINK: command
"C:\PROGRA2\MICROS4\2017\COMMUN1\VC\Tools\MSVC\14161.270\bin\Hostx86\x86\link.exe
/nologo CMakeFiles\cmTC_5ce47.dir\getarch.c.obj
CMakeFiles\cmTC_5ce47.dir\cpuid.S.obj /out:cmTC_5ce47.exe
/implib:cmTC_5ce47.lib /pdb:cmTC_5ce47.pdb /version:0.0 /machine:X86
/subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
/MANIFEST /MANIFESTFILE:cmTC_5ce47.exe.manifest" failed (exit code 1112)
with the following output:

CMakeFiles\cmTC_5ce47.dir\cpuid.S.obj : fatal error LNK1112: module machine
type 'x64' conflicts with target machine type 'x86'

@isuruf
Copy link
Contributor

isuruf commented Sep 12, 2020

@realgarik, can you send the full output after a clean build? I suspect that the correct clang-cl was not picked up.

@realgarik
Copy link
Author

@isuruf ,

Actually by correctly setting CC, CXX flags to refer to my newly built clang-cl.exe

set CC="C:/home/llvm-project-master/build/Release/bin/clang-cl.exe"
set CFLAGS=-m32
set CXX="C:/home/llvm-project-master/build/Release/bin/clang-cl.exe"
set CXXFLAGS=-m32

and providing the same .exe to cmake command line:

cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER="C:/home/llvm-project-master/build/Release/bin/clang-cl.exe" -DCMAKE_C_COMPILER="C:/home/llvm-project-master/build/Release/bin/clang-cl.exe" -DBUILD_WITHOUT_LAPACK=yes -DNOFORTRAN=1 -DDYNAMIC_ARCH=ON

I was able to complete build, but now I am receiving the linker errors:

Below is the log for Target=generic

FAILED: utest/openblas_utest.exe
cmd.exe /C "cd . && C:\Users\Admin\anaconda3\Library\bin\cmake.exe -E vs_link_exe --intdir=utest\CMakeFiles\openblas_utest.dir --rc=C:\PROGRA2\WI3CF21\10\bin\1001831.0\x86\rc.exe --mt=C:\PROGRA2\WI3CF21\10\bin\1001831.0\x86\mt.exe --manifests -- C:\PROGRA2\MICROS4\2017\COMMUN1\VC\Tools\MSVC\14161.270\bin\Hostx86\x86\link.exe /nologo utest\CMakeFiles\openblas_utest.dir\utest_main2.c.obj /out:utest\openblas_utest.exe /implib:lib\openblas_utest.lib /pdb:utest\openblas_utest.pdb /version:0.0 /machine:X86 /debug /INCREMENTAL /subsystem:console lib\openblas.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "C:\PROGRA2\MICROS4\2017\COMMUN1\VC\Tools\MSVC\14161.270\bin\Hostx86\x86\link.exe /nologo utest\CMakeFiles\openblas_utest.dir\utest_main2.c.obj /out:utest\openblas_utest.exe /implib:lib\openblas_utest.lib /pdb:utest\openblas_utest.pdb /version:0.0 /machine:X86 /debug /INCREMENTAL /subsystem:console lib\openblas.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:utest\CMakeFiles\openblas_utest.dir/intermediate.manifest utest\CMakeFiles\openblas_utest.dir/manifest.res" failed (exit code 1120) with the following output:
openblas.lib(samax.c.obj) : error LNK2019: unresolved external symbol _samax_k referenced in function samax
openblas.lib(damax.c.obj) : error LNK2019: unresolved external symbol _damax_k referenced in function damax
openblas.lib(daxpy.c.obj) : error LNK2019: unresolved external symbol _daxpy_k referenced in function daxpy
openblas.lib(zaxpy.c.obj) : error LNK2019: unresolved external symbol _zaxpy_k referenced in function zaxpy
openblas.lib(saxpy.c.obj) : error LNK2019: unresolved external symbol _saxpy_k referenced in function saxpy
openblas.lib(caxpy.c.obj) : error LNK2019: unresolved external symbol _caxpy_k referenced in function caxpy
openblas.lib(drot.c.obj) : error LNK2019: unresolved external symbol _drot_k referenced in function drot
openblas.lib(zdrot.c.obj) : error LNK2019: unresolved external symbol _zdrot_k referenced in function zdrot
openblas.lib(srot.c.obj) : error LNK2019: unresolved external symbol _srot_k referenced in function srot
openblas.lib(csrot.c.obj) : error LNK2019: unresolved external symbol _csrot_k referenced in function csrot
openblas.lib(dswap.c.obj) : error LNK2019: unresolved external symbol _dswap_k referenced in function dswap
openblas.lib(zswap.c.obj) : error LNK2019: unresolved external symbol _zswap_k referenced in function zswap
openblas.lib(sswap.c.obj) : error LNK2019: unresolved external symbol _sswap_k referenced in function sswap
openblas.lib(cswap.c.obj) : error LNK2019: unresolved external symbol _cswap_k referenced in function cswap
openblas.lib(smin.c.obj) : error LNK2019: unresolved external symbol _smin_k referenced in function smin
openblas.lib(dmin.c.obj) : error LNK2019: unresolved external symbol _dmin_k referenced in function dmin
openblas.lib(smax.c.obj) : error LNK2019: unresolved external symbol _smax_k referenced in function smax
openblas.lib(dmax.c.obj) : error LNK2019: unresolved external symbol _dmax_k referenced in function dmax
openblas.lib(parameter.c.obj) : error LNK2019: unresolved external symbol _cpuid referenced in function _get_L2_size
utest\openblas_utest.exe : fatal error LNK1120: 19 unresolved externals
ninja: build stopped: subcommand failed.

and here is the log for DYNAMIC_ARCH enabled:

[9373/9373] Linking C executable utest\openblas_utest.exe
FAILED: utest/openblas_utest.exe
cmd.exe /C "cd . && C:\Users\Admin\anaconda3\Library\bin\cmake.exe -E vs_link_exe --intdir=utest\CMakeFiles\openblas_utest.dir --rc=C:\PROGRA2\WI3CF21\10\bin\1001831.0\x86\rc.exe --mt=C:\PROGRA2\WI3CF21\10\bin\1001831.0\x86\mt.exe --manifests -- C:\PROGRA2\MICROS4\2017\COMMUN1\VC\Tools\MSVC\14161.270\bin\Hostx86\x86\link.exe /nologo utest\CMakeFiles\openblas_utest.dir\utest_main2.c.obj /out:utest\openblas_utest.exe /implib:lib\openblas_utest.lib /pdb:utest\openblas_utest.pdb /version:0.0 /machine:X86 /debug /INCREMENTAL /subsystem:console lib\openblas.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "C:\PROGRA2\MICROS4\2017\COMMUN1\VC\Tools\MSVC\14161.270\bin\Hostx86\x86\link.exe /nologo utest\CMakeFiles\openblas_utest.dir\utest_main2.c.obj /out:utest\openblas_utest.exe /implib:lib\openblas_utest.lib /pdb:utest\openblas_utest.pdb /version:0.0 /machine:X86 /debug /INCREMENTAL /subsystem:console lib\openblas.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:utest\CMakeFiles\openblas_utest.dir/intermediate.manifest utest\CMakeFiles\openblas_utest.dir/manifest.res" failed (exit code 1120) with the following output:
openblas.lib(setparam_ATHLON.c.obj) : error LNK2001: unresolved external symbol _cpuid
openblas.lib(setparam_BARCELONA.c.obj) : error LNK2001: unresolved external symbol _cpuid
openblas.lib(setparam_PRESCOTT.c.obj) : error LNK2001: unresolved external symbol _cpuid
openblas.lib(setparam_BANIAS.c.obj) : error LNK2001: unresolved external symbol _cpuid
openblas.lib(setparam_NEHALEM.c.obj) : error LNK2001: unresolved external symbol _cpuid
openblas.lib(setparam_CORE2.c.obj) : error LNK2001: unresolved external symbol _cpuid
openblas.lib(dynamic.c.obj) : error LNK2001: unresolved external symbol _cpuid
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _cpuid
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _cpuid
openblas.lib(setparam_NORTHWOOD.c.obj) : error LNK2001: unresolved external symbol _cpuid
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _samax_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _samin_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _smax_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _smin_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _isamax_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _isamin_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ismax_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ismin_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _snrm2_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _sasum_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ssum_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _scopy_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _sdot_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _srot_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _saxpy_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _sscal_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _sswap_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _sgemm_kernel_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _strsm_kernel_LN_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _strsm_kernel_LT_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _strsm_kernel_RN_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _strsm_kernel_RT_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _strmm_kernel_RN_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _strmm_kernel_RT_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _strmm_kernel_LN_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _strmm_kernel_LT_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _damax_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _damin_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _dmax_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _dmin_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _idamax_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _idamin_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _idmax_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _idmin_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _dnrm2_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _dasum_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _dsum_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _dcopy_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ddot_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _drot_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _daxpy_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _dscal_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _dswap_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _dgemm_kernel_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _dtrsm_kernel_LN_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _dtrsm_kernel_LT_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _dtrsm_kernel_RN_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _dtrsm_kernel_RT_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _dtrmm_kernel_RN_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _dtrmm_kernel_RT_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _dtrmm_kernel_LN_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _dtrmm_kernel_LT_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _camax_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _camin_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _icamax_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _icamin_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _cnrm2_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _casum_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _csum_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ccopy_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _cdotu_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _cdotc_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _csrot_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _caxpy_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _caxpyc_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _cscal_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _cswap_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _cgemv_n_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _cgemv_t_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _cgemv_r_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _cgemv_c_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _cgemv_o_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _cgemv_u_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _cgemv_s_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _cgemv_d_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _cgemm_kernel_n_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _cgemm_kernel_l_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _cgemm_kernel_r_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _cgemm_kernel_b_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ctrsm_kernel_LN_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ctrsm_kernel_LT_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ctrsm_kernel_LR_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ctrsm_kernel_LC_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ctrsm_kernel_RN_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ctrsm_kernel_RT_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ctrsm_kernel_RR_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ctrsm_kernel_RC_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ctrmm_kernel_RN_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ctrmm_kernel_RT_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ctrmm_kernel_RR_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ctrmm_kernel_RC_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ctrmm_kernel_LN_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ctrmm_kernel_LT_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ctrmm_kernel_LR_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ctrmm_kernel_LC_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _zamax_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _zamin_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _izamax_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _izamin_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _zasum_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _zsum_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _zcopy_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _zdrot_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _zaxpy_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _zaxpyc_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _zscal_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _zswap_k_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _zgemv_n_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _zgemv_r_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _zgemv_o_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _zgemv_s_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _zgemm_kernel_n_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _zgemm_kernel_l_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _zgemm_kernel_r_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _zgemm_kernel_b_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ztrsm_kernel_LN_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ztrsm_kernel_LT_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ztrsm_kernel_LR_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ztrsm_kernel_LC_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ztrsm_kernel_RN_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ztrsm_kernel_RT_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ztrsm_kernel_RR_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ztrsm_kernel_RC_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ztrmm_kernel_RN_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ztrmm_kernel_RT_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ztrmm_kernel_RR_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ztrmm_kernel_RC_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ztrmm_kernel_LN_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ztrmm_kernel_LT_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ztrmm_kernel_LR_KATMAI
openblas.lib(setparam_KATMAI.c.obj) : error LNK2001: unresolved external symbol _ztrmm_kernel_LC_KATMAI
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _samax_k_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _samin_k_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _smax_k_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _smin_k_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _isamax_k_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _isamin_k_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _ismax_k_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _ismin_k_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _snrm2_k_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _sasum_k_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _ssum_k_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _scopy_k_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _sdot_k_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _srot_k_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _saxpy_k_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _sscal_k_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _sswap_k_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _sgemm_kernel_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _strsm_kernel_LN_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _strsm_kernel_LT_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _strsm_kernel_RN_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _strsm_kernel_RT_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _strmm_kernel_RN_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _strmm_kernel_RT_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _strmm_kernel_LN_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _strmm_kernel_LT_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _damax_k_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _damin_k_COPPERMINE
openblas.lib(setparam_COPPERMINE.c.obj) : error LNK2001: unresolved external symbol _dmax_k_COPPERMINE

The list is long for dynamic arch, so I will mention just module names which are failing:
setparam_KATMAI.c.obj
setparam_COPPERMINE.c.obj
setparam_NORTHWOOD.c.obj
setparam_PRESCOTT.c.obj
setparam_BANIAS.c.obj
setparam_NEHALEM.c.obj
setparam_CORE2.c.obj
setparam_ATHLON.c.obj
setparam_BARCELONA.c.obj

@realgarik
Copy link
Author

@isuruf , @martin-frbg ,

do you have any clue for these link issues?
have you ever faced such an issue?

@martin-frbg
Copy link
Collaborator

Sorry; I have no idea what is happening here. I trust you started from a clean build directory every time you changed cmake options (?) Perhaps a complete build log would help (and perhaps you could add CMAKE_VERBOSE_MAKEFILE=ON to your
cmake options for additional information, though it will increase the size of the log) ?

@LYP951018
Copy link
Contributor

Maybe unrelated, but MSVC does not support VLA and AT&T assembly which are required by DYNAMIC_ARCH.

@martin-frbg
Copy link
Collaborator

Maybe unrelated, but MSVC does not support VLA and AT&T assembly which are required by DYNAMIC_ARCH.

Yes, this was clarified in #2826 (comment) , then TARGET=generic was used instead with MSVC and the discussion moved on to building with LLVM (clang-cl) for better performance - which worked for x64 but failed for 32bit. (Maybe the "wrong" linker got called, or 64bit object files got picked up from an earlier build attempt, but at that point it seems everybody ran out of time or energy)

@realgarik
Copy link
Author

Sorry guys I didn't have time to dig into the issue so finally it was decided to drop the x86.
Thank you very much for your support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants